gecko-dev/content/base/test/test_mozMatchesSelector.html
Ms2ger 5b546538b2 Bug 1048780 - Call the standard matches() rather than the proprietary mozMatchesSelector(); r=jst
This also includes a test that mozMatchesSelector is still exposed and works.

--HG--
rename : js/xpconnect/tests/chrome/test_mozMatchesSelector.xul => js/xpconnect/tests/chrome/test_matches.xul
rename : js/xpconnect/tests/mochitest/file_mozMatchesSelector.html => js/xpconnect/tests/mochitest/file_matches.html
2014-08-12 14:30:59 +02:00

15 lines
444 B
HTML

<!doctype html>
<meta charset=utf-8>
<title>Test for legacy mozMatchesSelector</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<div id=test></div>
<script>
test(function() {
var element = document.getElementById("test");
assert_true(element.matches("#test"), "matches");
assert_true(element.mozMatchesSelector("#test"), "mozMatchesSelector");
});
</script>