diff --git a/tests/test_compatibility.py b/tests/test_compatibility.py index 6cbeaf4aa..aa0db4570 100644 --- a/tests/test_compatibility.py +++ b/tests/test_compatibility.py @@ -338,6 +338,16 @@ def test_fx9_navigator_taintEnabled(): futureCompatWarning('alert(navigator.taintEnabled);', '9.0a1') +def test_fx9_691569(): + """ + baseURIObject, nodePrincipal, documentURIObject are flagged as + unavailable in non-chrome contexts in FX9. + """ + futureCompatWarning('alert(document.documentURIObject);', '9.0a1') + futureCompatWarning('alert(document.nodePrincipal);', '9.0a1') + futureCompatWarning('alert(document.baseURIObject);', '9.0a1') + + def test_tb6_nsIImapMailFolderSink(): """Test that nsIImapMailFolderSink.setUrlState is flagged.""" diff --git a/validator/testcases/regex.py b/validator/testcases/regex.py index 0e6ad9175..f284dcee3 100644 --- a/validator/testcases/regex.py +++ b/validator/testcases/regex.py @@ -323,6 +323,31 @@ def _compat_test(pattern, title, message, compatibility_type=None, "information, please see %s.") % TAINTENABLED_BUG, compatibility_type="warning", appversions=FX9_DEFINITION) + XRAYPROPS_BUG = BUGZILLA_BUG % 660233 + _compat_test( + re.compile(r"\.nodePrincipal"), + ("nodePrincipal only available in chrome context"), + ("The nodePrincipal property is no longer accessible from " + "untrusted scripts. For more information, please see %s." + ) % XRAYPROPS_BUG, + compatibility_type="warning", + appversions=FX9_DEFINITION) + _compat_test( + re.compile(r"\.documentURIObject"), + ("documentURIObject only available in chrome context"), + ("The documentURIObject property is no longer accessible from " + "untrusted scripts. For more information, please see %s." + ) % XRAYPROPS_BUG, + compatibility_type="warning", + appversions=FX9_DEFINITION) + _compat_test( + re.compile(r"\.baseURIObject"), + ("baseURIObject only available in chrome context"), + ("The baseURIObject property is no longer accessible from " + "untrusted scripts. For more information, please see %s." + ) % XRAYPROPS_BUG, + compatibility_type="warning", + appversions=FX9_DEFINITION) # Thunderbird 7 Compatibility rdf:addressdirectory if err.supports_version(TB7_DEFINITION):