Last modified: 2011-08-23 18:11:37 UTC
during tests for http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js?view=markup&pathrev=95262 I found by chance that - a wrong expected result may no always result in "test fails" on Firefox or Chrome This is documented in the comments on http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95262#c21311 .
Isn't that a false positive? As in, the test comes out positive while it's really not?
(In reply to comment #1) > Isn't that a false positive? As in, the test comes out positive while it's > really not? When using the Firefox (or Chrome), test cases 100 and 101 are *not* detected, which is the problem. Both test cases should fail on all browsers, but do not.
Yup, so that's a false positive. Tweaking summary.
So... it doesn't seem to be a false positive, as far as I can tell it's a true positive. What makes it look like a false positive exactly, Tom? Your expected text *is* bogus, but gets parsed the way we'd reasonably expect: <nowiki></span this wrong tag is not detected as test failure in Firefox 6.0 or Chrome></nowiki> gets parsed into the expected actual structure: <nowiki></span></nowiki> which of course matches the <nowiki></span></nowiki> that we'd expect. This doesn't look like a useful test case at all; are you trying to test the browser's HTML fragment parser? This won't be exercised in real usages -- you're not even testing on the output, you're testing on your given sample text. Recommend removing these test cases for being useless.
bah pretend those <nowiki> bits are not there. I can't remember where I'm commenting anymore. :P
(In reply to comment #5) > bah pretend those <nowiki> bits are not there. I can't remember where I'm > commenting anymore. :P So you want to say: everything is fine, when I remove test "cases" 100 and 101 ?
Removed them in r95315. Thomas, if you need to do quick 'supposed to fail' test case, be sure to put in something that won't normalize back to the real expected value. For instance add some new elements, or add some text nodes which will be preserved after HTML parsing. But of course don't commit such a test case, since you wouldn't want failing test cases for no reason.
(In reply to comment #7) > Removed them in r95315. > > Thomas, if you need to do quick 'supposed to fail' test case, (My test cases 100 and 101 were simply added by mistake. resolved-invalid, luckily.)