Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Commit

Permalink
Java entity flags for FX16 (bug 795428)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbasta committed Oct 3, 2012
1 parent 09fc2f1 commit d59b6c9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
12 changes: 12 additions & 0 deletions tests/compat/test_gecko16.py
Expand Up @@ -30,3 +30,15 @@ def test_mozIndexedDB(self):
self.run_script_for_compat("mozIndexedDB.foo.bar;")
self.assert_silent()
self.assert_compat_error()

def test_java(self):
"""Test that `java` is flagged in Gecko 16."""
self.run_script_for_compat("var x = java;")
self.assert_silent()
self.assert_compat_error()

def test_Packages(self):
"""Test that `Packages` is flagged in Gecko 16."""
self.run_script_for_compat("var x = Packages;")
self.assert_silent()
self.assert_compat_error()
10 changes: 8 additions & 2 deletions validator/testcases/javascript/entity_values.py
@@ -1,6 +1,6 @@
from call_definitions import open_in_chrome_context
from validator.compat import (FX10_DEFINITION, FX14_DEFINITION, TB14_DEFINITION,
TB15_DEFINITION)
from validator.compat import (FX10_DEFINITION, FX14_DEFINITION, FX16_DEFINITION,
TB14_DEFINITION, TB15_DEFINITION)
from validator.constants import BUGZILLA_BUG


Expand Down Expand Up @@ -53,6 +53,12 @@ def wrap(traverser):
deprecated_entity(name="importHTMLFromURI", version=FX14_DEFINITION,
message=DEP_IHF_MESSAGE, bug=482911)

JAVA_MESSAGE = "The global variables related to Java have been removed."
deprecated_entity(name="java", version=FX16_DEFINITION,
message=JAVA_MESSAGE, bug=748343)
deprecated_entity(name="Packages", version=FX16_DEFINITION,
message=JAVA_MESSAGE, bug=748343)


@register_entity("document.xmlEncoding")
def xmlEncoding(traverser):
Expand Down
3 changes: 3 additions & 0 deletions validator/testcases/javascript/predefinedentities.py
Expand Up @@ -573,6 +573,9 @@ def build_quick_xpcom(method, interface, traverser):
"Consider using a different API if it is "
"available in order to achieve similar "
"functionality."},

u"java": entity("java"),
u"Packages": entity("Packages"),
}

CONTENT_DOCUMENT = GLOBAL_ENTITIES[u"content"]["value"][u"document"]

0 comments on commit d59b6c9

Please sign in to comment.