dont update revision id when using upstream wpt

In a previous change we added use_upstream_wpt functionality which clones the upstream wpt and uses it, so we don't need to update the revision id as we're not using a local version of wpt/tests.

Bug: 1355911

Change-Id: I706a83228d3e9262c9892a2bca154d03525a5a12
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3842699
Reviewed-by: Jonathan Lee <jonathanjlee@google.com>
Reviewed-by: Weizhong Xia <weizhong@google.com>
Commit-Queue: Nihar Damarasingu <nihardamar@google.com>
Cr-Commit-Position: refs/heads/main@{#1038333}
diff --git a/third_party/blink/tools/blinkpy/w3c/test_importer.py b/third_party/blink/tools/blinkpy/w3c/test_importer.py
index 0c49ac9..2d53d65 100644
--- a/third_party/blink/tools/blinkpy/w3c/test_importer.py
+++ b/third_party/blink/tools/blinkpy/w3c/test_importer.py
@@ -193,9 +193,6 @@
         if not options.auto_update:
             return 0
 
-        if not self.record_version():
-            return 1
-
         if not self.run_commit_queue_for_cl():
             return 1
 
@@ -205,17 +202,6 @@
 
         return 0
 
-    def record_version(self):
-        _log.info('Update external/Version to record upstream ToT.')
-        path_to_version = self.finder.path_from_web_tests('external', 'Version')
-        with open(path_to_version, "w") as f:
-            f.write("Version: %s\n" % self.wpt_revision)
-
-        message = 'Update revision'
-        self._commit_changes(message)
-        self._upload_patchset(message)
-        return True
-
     def update_expectations_for_cl(self):
         """Performs the expectation-updating part of an auto-import job.
 
diff --git a/third_party/blink/tools/blinkpy/w3c/wpt_results_processor.py b/third_party/blink/tools/blinkpy/w3c/wpt_results_processor.py
index a5e8cd68..3dd54f7 100644
--- a/third_party/blink/tools/blinkpy/w3c/wpt_results_processor.py
+++ b/third_party/blink/tools/blinkpy/w3c/wpt_results_processor.py
@@ -568,24 +568,10 @@
         # Delete the current node if empty.
         return len(current_node) == 0
 
-    def _get_wpt_revision(self):
-        version_path = self.fs.join(self.web_tests_dir, 'external', 'Version')
-        target = 'Version:'
-        with self.fs.open_text_file_for_reading(version_path) as version_file:
-            for line in version_file:
-                if line.startswith(target):
-                    rev = line[len(target):].strip()
-                    return rev
-        return None
-
     def process_wpt_report(self, report_path):
         """Process and upload a wpt report to result sink."""
         with self.fs.open_text_file_for_reading(report_path) as report_file:
             report = json.load(report_file)
-        rev = self._get_wpt_revision()
-        # Update with upstream revision
-        if rev:
-            report['run_info']['revision'] = rev
         report_filename = self.fs.basename(report_path)
         artifact_path = self.fs.join(self.artifacts_dir, report_filename)
         with self.fs.open_text_file_for_writing(artifact_path) as report_file:
diff --git a/third_party/blink/tools/blinkpy/w3c/wpt_results_processor_unittest.py b/third_party/blink/tools/blinkpy/w3c/wpt_results_processor_unittest.py
index ba1a994..be33588 100644
--- a/third_party/blink/tools/blinkpy/w3c/wpt_results_processor_unittest.py
+++ b/third_party/blink/tools/blinkpy/w3c/wpt_results_processor_unittest.py
@@ -106,9 +106,6 @@
                                                    'results.html'),
             'results-viewer-body')
         self.fs.write_text_file(
-            self.fs.join(port.web_tests_dir(), 'external', 'Version'),
-            'Version: afd66ac5976672821b2788cd5f6ae57701240308\n')
-        self.fs.write_text_file(
             self.wpt_report_path,
             json.dumps({
                 'run_info': {
@@ -911,7 +908,7 @@
         self.assertEqual(run_info['os_version'], '18.04')
         self.assertEqual(run_info['product'], 'chrome')
         self.assertEqual(run_info['revision'],
-                         'afd66ac5976672821b2788cd5f6ae57701240308')
+                         '57a5dfb2d7d6253fbb7dbd7c43e7588f9339f431')
         artifacts = self.processor.sink.invocation_level_artifacts
         artifact_path = self.fs.join(self.processor.artifacts_dir,
                                      'wpt_report.json')