Fix _CheckNoDISABLETypoInTests when test file is deleted.

[email protected]

Bug: 888425
Change-Id: I8ff979ae3d969ccff7ca9cbb1ec1deb86f65535a
Reviewed-on: https://chromium-review.googlesource.com/1241956
Commit-Queue: Katie Dektar <[email protected]>
Reviewed-by: Dominic Battré <[email protected]>
Cr-Commit-Position: refs/heads/master@{#593847}
diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py
index a6c31b71..0fbda0c 100755
--- a/PRESUBMIT_test.py
+++ b/PRESUBMIT_test.py
@@ -2072,6 +2072,15 @@
                                                    MockOutputApi())
     self.assertEqual(0, len(results))
 
+  def testIngoreDeletedFiles(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+        MockFile('some/path/foo.cc', 'TEST_F(FoobarTest, Foo)', action='D'),
+    ]
+
+    results = PRESUBMIT._CheckNoDISABLETypoInTests(mock_input_api,
+                                                   MockOutputApi())
+    self.assertEqual(0, len(results))
 
 if __name__ == '__main__':
   unittest.main()