def testAndroidChangeMissing(self): mock_input_api = MockInputApi() mock_input_api.files = [ MockAffectedFile('content/test/data/accessibility/event/foo.html', [''], action='A'), ] msgs = PRESUBMIT.CheckAccessibilityEventsTestIncludesAndroid( mock_input_api, MockOutputApi()) self.assertEqual( 1, len(msgs), 'Expected %d messages, found %d: %s' % (1, len(msgs), msgs))
def testIgnoreNonRelatedHtmlFiles(self): mock_input_api = MockInputApi() mock_input_api.files = [ MockAffectedFile('content/test/data/accessibility/aria/foo.html', [''], action='A'), MockAffectedFile('content/test/data/accessibility/html/foo.html', [''], action='A'), MockAffectedFile('chrome/tests/data/accessibility/foo.html', [''], action='A') ] msgs = PRESUBMIT.CheckAccessibilityEventsTestIncludesAndroid( mock_input_api, MockOutputApi()) self.assertEqual( 0, len(msgs), 'Expected %d messages, found %d: %s' % (0, len(msgs), msgs))