I used Moq to determine what members of HttpContextBase are used in GetRouteData(). They are:
- Request
- AppRelativeCurrentExecutionFilePath
- PathInfo
 
Request.AppRelativeCurrentExecutionFilePath should return path with ~, what I exactly need, so utility class may be like this one:
public static class RouteUtils
{
    public static RouteData GetRouteDataByUrl(string url)
    {
        return RouteTable.Routes.GetRouteData(new RewritedHttpContextBase(url));
    }
    private class RewritedHttpContextBase : HttpContextBase
    {
        private readonly HttpRequestBase mockHttpRequestBase;
        public RewritedHttpContextBase(string appRelativeUrl)
        {
            this.mockHttpRequestBase = new MockHttpRequestBase(appRelativeUrl);
        }
        public override HttpRequestBase Request
        {
            get
            {
                return mockHttpRequestBase;
            }
        }
        private class MockHttpRequestBase : HttpRequestBase
        {
            private readonly string appRelativeUrl;
            public MockHttpRequestBase(string appRelativeUrl)
            {
                this.appRelativeUrl = appRelativeUrl;
            }
            public override string AppRelativeCurrentExecutionFilePath
            {
                get { return appRelativeUrl; }
            }
            public override string PathInfo
            {
                get { return ""; }
            }
        }
    }
}
If you pass ~/Error/NotFound, for example, RouteUtils.GetRouteByUrl("~/Error/NotFound") returns something like
RouteData.Values
{
    controller = "Error",
    action = "NotFound"
}
Maybe this will be helpful for anybody.