mojo/public/tools/mojom/check_stable_mojom_compatibility_unittest.py
def testRename(self):
    """We can do checks for renamed types."""
    self.assertBackwardCompatible([
        Change('foo/foo.mojom',
               old='[Stable] struct S {};',
               new='[Stable, RenamedFrom="S"] struct T {};')
    ])
    self.assertNotBackwardCompatible([
        Change('foo/foo.mojom',
               old='[Stable] struct S {};',
               new='[Stable, RenamedFrom="S"] struct T { int32 x; };')
    ])
    self.assertBackwardCompatible([
        Change('foo/foo.mojom',
               old='[Stable] struct S {};',
               new="""\
               [Stable, RenamedFrom="S"]
               struct T { [MinVersion=1] int32 x; };
               """)
    ])
We can do checks for renamed types.
We can do checks for renamed types.
We can do checks for renamed types .
def testRename(self):
    self.assertBackwardCompatible([
        Change('foo/foo.mojom',
               old='[Stable] struct S {};',
               new='[Stable, RenamedFrom="S"] struct T {};')
    ])
    self.assertNotBackwardCompatible([
        Change('foo/foo.mojom',
               old='[Stable] struct S {};',
               new='[Stable, RenamedFrom="S"] struct T { int32 x; };')
    ])
    self.assertBackwardCompatible([
        Change('foo/foo.mojom',
               old='[Stable] struct S {};',
               new="""\
               [Stable, RenamedFrom="S"]
               struct T { [MinVersion=1] int32 x; };
               """)
    ])
def testRename ( self ) : self . assertBackwardCompatible ( [ Change ( 'foo/foo.mojom' , old = '[Stable] struct S {};' , new = '[Stable, RenamedFrom="S"] struct T {};' ) ] ) self . assertNotBackwardCompatible ( [ Change ( 'foo/foo.mojom' , old = '[Stable] struct S {};' , new = '[Stable, RenamedFrom="S"] struct T { int32 x; };' ) ] ) self . assertBackwardCompatible ( [ Change ( 'foo/foo.mojom' , old = '[Stable] struct S {};' , new = """\
               [Stable, RenamedFrom="S"]
               struct T { [MinVersion=1] int32 x; };
               """ ) ] )
We can do checks for renamed types.
We can do checks for renamed types .
"""We can do checks for renamed types."""
self