Switch to main branch in test tools and documentation.

The main branch is now available in PDFium, so use that wherever

Change-Id: I349777aa2401f58624c70954b3c343d02f43c933
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/82771
Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
index 4c20a5d..b14a45a 100644
@@ -3,7 +3,7 @@
 [Chromium Contributing](https://chromium.googlesource.com/chromium/src/+/main/docs/contributing.md)
 guidelines in PDFium. The code review process, and the build tools are all very
 similar to Chromium. The PDFium
 outlines specific build and test information for PDFium.
 This document focuses on how the PDFium project operates and how we’d like it
@@ -56,7 +56,7 @@
 There are a lot of consumers of PDFium outside of Chromium. These include
 LibreOffice, Android and offline conversion tooling. As such, a lot of care is
 taken around the code in the
 folder. When planning on changing the public API, the change should be preceded
 by a bug being created and an email to the mailing list to gather feedback from
 other PDFium embedders.
@@ -161,7 +161,7 @@
 and send it to us as described on that page.
 Your first CL should add yourself to the
 file (unless you’re covered by one of the blanket entries).
 ### External contributor checklist for reviewers
@@ -170,7 +170,7 @@
    request on
  * Ensure the author is already listed in
-   [AUTHORS](https://pdfium.googlesource.com/pdfium/+/refs/heads/master/AUTHORS).
+   [AUTHORS](https://pdfium.googlesource.com/pdfium/+/refs/heads/main/AUTHORS).
    In some cases, the author's company might have a wildcard rule
    (e.g. \*@google.com).
  * If the author or their company is not listed, the CL should include a new
diff --git a/README.md b/README.md
index b6a0396..286bda8 100644
--- a/README.md
+++ b/README.md
@@ -167,7 +167,7 @@
 This saves space and also allows an easy way to reduce the test case to the
 essentials as you can simply remove everything that is not necessary.
-A simple example can be found [here](https://pdfium.googlesource.com/pdfium/+/refs/heads/master/testing/resources/rectangles.in).
+A simple example can be found [here](https://pdfium.googlesource.com/pdfium/+/refs/heads/main/testing/resources/rectangles.in).
 To transform this into a PDF, you can use the `fixup_pdf_template.py` tool:
diff --git a/docs/getting-started.md b/docs/getting-started.md
index e5b261b..6470f8a 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -182,6 +182,6 @@
 [chrome-plugin]: https://chromium.googlesource.com/chromium/src/+/main/pdf/
-[pdfium-public]: https://pdfium.googlesource.com/pdfium/+/master/public/
+[pdfium-public]: https://pdfium.googlesource.com/pdfium/+/main/public/
 [pdfium-v8]: /docs/v8-getting-started.md
 [pdfium-edit-guide]: /docs/pdfium-edit-guide.md
diff --git a/testing/tools/githelper.py b/testing/tools/githelper.py
index 91a6c71..4637ed7 100644
--- a/testing/tools/githelper.py
+++ b/testing/tools/githelper.py
@@ -20,8 +20,8 @@
     RunCommandPropagateErr(['git', 'checkout', branch], exit_status_on_error=1)
   def FetchOriginMaster(self):
-    """Fetches new changes on origin/master."""
-    RunCommandPropagateErr(['git', 'fetch', 'origin', 'master'],
+    """Fetches new changes on origin/main."""
+    RunCommandPropagateErr(['git', 'fetch', 'origin', 'main'],
   def StashPush(self):
diff --git a/testing/tools/safetynet_job.py b/testing/tools/safetynet_job.py
index 9b5cbfd..c1361c1 100755
--- a/testing/tools/safetynet_job.py
+++ b/testing/tools/safetynet_job.py
@@ -69,7 +69,7 @@
     if not self.args.no_checkout:
-      self.git.Checkout('origin/master')
+      self.git.Checkout('origin/main')
     # Make sure results dir exists
     if not os.path.exists(self.context.results_dir):
@@ -200,7 +200,7 @@
-      help='whether to skip checking out origin/master. Use '
+      help='whether to skip checking out origin/main. Use '
       'for script debugging.')
diff --git a/testing/tools/skia_gold/pdfium_skia_gold_properties.py b/testing/tools/skia_gold/pdfium_skia_gold_properties.py
index 525b212..bf1e924 100644
--- a/testing/tools/skia_gold/pdfium_skia_gold_properties.py
+++ b/testing/tools/skia_gold/pdfium_skia_gold_properties.py
@@ -16,7 +16,7 @@
   def _GetGitOriginMasterHeadSha1():
-      return subprocess.check_output(['git', 'rev-parse', 'origin/master'],
+      return subprocess.check_output(['git', 'rev-parse', 'origin/main'],
     except subprocess.CalledProcessError: