mojo/public/tools/mojom/version_compatibility_unittest.py
def _GetTypeCompatibilityMap(self, old_mojom, new_mojom):
    """Helper to support the implementation of assertBackwardCompatible and
    assertNotBackwardCompatible."""

    old = self.ExtractTypes(old_mojom)
    new = self.ExtractTypes(new_mojom)
    self.assertEqual(set(old.keys()), set(new.keys()),
                     'Old and new test mojoms should use the same type names.')

    checker = module.BackwardCompatibilityChecker()
    compatibility_map = {}
    for name in old.keys():
      compatibility_map[name] = checker.IsBackwardCompatible(
          new[name], old[name])
    return compatibility_map
Helper to support the implementation of assertBackwardCompatible and
    assertNotBackwardCompatible.
Helper to support the implementation of assertBackwardCompatible and
assertNotBackwardCompatible.
Helper to support the implementation of assertBackwardCompatible and assertNotBackwardCompatible .
def _GetTypeCompatibilityMap(self, old_mojom, new_mojom):
    old = self.ExtractTypes(old_mojom)
    new = self.ExtractTypes(new_mojom)
    self.assertEqual(set(old.keys()), set(new.keys()),
                     'Old and new test mojoms should use the same type names.')
    checker = module.BackwardCompatibilityChecker()
    compatibility_map = {}
    for name in old.keys():
      compatibility_map[name] = checker.IsBackwardCompatible(
          new[name], old[name])
    return compatibility_map
def _GetTypeCompatibilityMap ( self , old_mojom , new_mojom ) : old = self . ExtractTypes ( old_mojom ) new = self . ExtractTypes ( new_mojom ) self . assertEqual ( set ( old . keys ( ) ) , set ( new . keys ( ) ) , 'Old and new test mojoms should use the same type names.' ) checker = module . BackwardCompatibilityChecker ( ) compatibility_map = { } for name in old . keys ( ) : compatibility_map [ name ] = checker . IsBackwardCompatible ( new [ name ] , old [ name ] ) return compatibility_map
Helper to support the implementation of assertBackwardCompatible and
assertNotBackwardCompatible.
Helper to support the implementation of assertBackwardCompatible and assertNotBackwardCompatible .
"""Helper to support the implementation of assertBackwardCompatible and
    assertNotBackwardCompatible."""
self
old_mojom
new_mojom