def test_has_console_errors_or_warnings_negative_cases(self): self.assertFalse(testharness_results.has_console_errors_or_warnings( 'This is a testharness.js-based test.\n' 'CONSOLE MESSAGE: This is not error.')) self.assertFalse(testharness_results.has_console_errors_or_warnings( 'This is a testharness.js-based test.\n' 'No errors here.')) self.assertFalse(testharness_results.has_console_errors_or_warnings( 'This is not a CONSOLE ERROR, sorry.')) self.assertFalse(testharness_results.has_console_errors_or_warnings( 'This is not a CONSOLE WARNING, sorry.'))
def test_has_console_errors_or_warnings_negative_cases(self): self.assertFalse(testharness_results.has_console_errors_or_warnings( 'This is a testharness.js-based test.\n' 'CONSOLE MESSAGE: This is not error.')) self.assertFalse(testharness_results.has_console_errors_or_warnings( 'This is a testharness.js-based test.\n' 'No errors here.')) self.assertFalse(testharness_results.has_console_errors_or_warnings( 'This is not a CONSOLE ERROR, sorry.')) self.assertFalse(testharness_results.has_console_errors_or_warnings( 'This is not a CONSOLE WARNING, sorry.'))
def test_has_console_errors_or_warnings_positive_cases(self): self.assertTrue( testharness_results.has_console_errors_or_warnings( 'This is a testharness.js-based test.\n' 'CONSOLE ERROR: This is an error.\n' 'Test ran to completion.')) self.assertTrue( testharness_results.has_console_errors_or_warnings( 'This is a testharness.js-based test.\n' 'CONSOLE WARNING: This is a warning.\n' 'Test ran to completion.')) self.assertTrue( testharness_results.has_console_errors_or_warnings( 'CONSOLE ERROR: This is an error.\n' 'Test ran to completion.')) self.assertTrue( testharness_results.has_console_errors_or_warnings( 'CONSOLE WARNING: This is a warning.\n' 'Test ran to completion.')) self.assertTrue( testharness_results.has_console_errors_or_warnings( 'This is a testharness.js-based test.\n' 'CONSOLE ERROR: This is an error.')) self.assertTrue( testharness_results.has_console_errors_or_warnings( 'CONSOLE ERROR: This is an error.')) self.assertTrue( testharness_results.has_console_errors_or_warnings( 'CONSOLE WARNING: This is a warning.'))
def test_has_console_errors_or_warnings_positive_cases(self): self.assertTrue(testharness_results.has_console_errors_or_warnings( 'This is a testharness.js-based test.\n' 'CONSOLE ERROR: This is an error.\n' 'Test ran to completion.')) self.assertTrue(testharness_results.has_console_errors_or_warnings( 'This is a testharness.js-based test.\n' 'CONSOLE WARNING: This is a warning.\n' 'Test ran to completion.')) self.assertTrue(testharness_results.has_console_errors_or_warnings( 'CONSOLE ERROR: This is an error.\n' 'Test ran to completion.')) self.assertTrue(testharness_results.has_console_errors_or_warnings( 'CONSOLE WARNING: This is a warning.\n' 'Test ran to completion.')) self.assertTrue(testharness_results.has_console_errors_or_warnings( 'This is a testharness.js-based test.\n' 'CONSOLE ERROR: This is an error.')) self.assertTrue(testharness_results.has_console_errors_or_warnings( 'CONSOLE ERROR: This is an error.')) self.assertTrue(testharness_results.has_console_errors_or_warnings( 'CONSOLE WARNING: This is a warning.'))