[webkit-patch] Use commit.webkit.org instead of remote SVN to compute identifier
[WebKit-https.git] / Tools / Scripts / webkitpy / tool / commands / download_unittest.py
index 596e9a1cbe71b96d2b6bc9fa7dbcb71f85ebb3a3..3dea713ceca77c226ce0139952257b92cd1abdb9 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright (C) 2009, 2011 Google Inc. All rights reserved.
+# Copyright (C) 2021 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are
@@ -35,7 +36,7 @@ from webkitpy.tool.mocktool import MockOptions, MockTool
 from webkitpy.common.checkout.checkout_mock import MockCheckout
 
 from webkitcorepy import OutputCapture
-from webkitscmpy import mocks, Commit
+from webkitcorepy import mocks
 
 
 class AbstractRevertPrepCommandTest(unittest.TestCase):
@@ -98,21 +99,12 @@ class DownloadCommandsTest(CommandsTest):
         return options
 
     def mock_svn_remote(self):
-        repo = mocks.remote.Svn('svn.webkit.org/repository/webkit')
-        repo.commits['trunk'].append(Commit(
-            author=dict(name='Dmitry Titov', emails=['dimich@chromium.org']),
-            identifier='5@trunk',
-            revision=49824,
-            timestamp=1601668000,
-            message=
-                'Manual Test for crash caused by JS accessing DOMWindow which is disconnected from the Frame.\n'
-                'https://bugs.webkit.org/show_bug.cgi?id=30544\n'
-                '\n'
-                'Reviewed by Darin Adler.\n'
-                '\n'
-                '    manual-tests/crash-on-accessing-domwindow-without-frame.html: Added.\n',
-        ))
-        return repo
+        return mocks.Requests('commits.webkit.org', **{
+            'r49824/json': mocks.Response.fromJson(dict(
+                identifier='5@main',
+                revision=49824,
+            )),
+        })
 
     def test_build(self):
         expected_logs = "Updating working directory\nBuilding WebKit\n"