Add PRESUBMIT check for set_owned_by_client().

Bug: 1044687
Change-Id: I698ba7bba434d30c6f2ed0928cc9c2059eb6a586
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2097834
Reviewed-by: Robert Liao <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Jochen Eisinger <[email protected]>
Commit-Queue: Allen Bauer <[email protected]>
Cr-Commit-Position: refs/heads/master@{#749738}
diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py
index 827b4a4..8d3ef19 100755
--- a/PRESUBMIT_test.py
+++ b/PRESUBMIT_test.py
@@ -1983,6 +1983,8 @@
                ['GetInterfaceProvider()']),
       MockFile('some/cpp/ok/file.cc',
                ['using std::string;']),
+      MockFile('some/cpp/problematic/file2.cc',
+               ['set_owned_by_client()']),
     ]
 
     results = PRESUBMIT._CheckNoBannedFunctions(input_api, MockOutputApi())
@@ -1993,6 +1995,7 @@
     self.assertTrue(
         'third_party/blink/problematic/file.cc' in results[0].message)
     self.assertTrue('some/cpp/ok/file.cc' not in results[1].message)
+    self.assertTrue('some/cpp/problematic/file2.cc' in results[0].message)
 
   def testBannedBlinkDowncastHelpers(self):
     input_api = MockInputApi()