mojo/public/tools/mojom/mojom/parse/parser_unittest.py
def testInvalidHandleType(self):
    """Tests an invalid (unknown) handle type."""

    source = """\
        struct MyStruct {
          handle<wtf_is_this> foo;
        };
        """
    with self.assertRaisesRegexp(
        parser.ParseError, r"^my_file\.mojom:2: Error: "
        r"Invalid handle type 'wtf_is_this':\n"
        r" *handle<wtf_is_this> foo;$"):
      parser.Parse(source, "my_file.mojom")
Tests an invalid (unknown) handle type.
Tests an invalid (unknown) handle type.
Tests an invalid ( unknown ) handle type .
def testInvalidHandleType(self):
    source = """\
        struct MyStruct {
          handle<wtf_is_this> foo;
        };
        """
    with self.assertRaisesRegexp(
        parser.ParseError, r"^my_file\.mojom:2: Error: "
        r"Invalid handle type 'wtf_is_this':\n"
        r" *handle<wtf_is_this> foo;$"):
      parser.Parse(source, "my_file.mojom")
def testInvalidHandleType ( self ) : source = """\
        struct MyStruct {
          handle<wtf_is_this> foo;
        };
        """ with self . assertRaisesRegexp ( parser . ParseError , r"^my_file\.mojom:2: Error: " r"Invalid handle type 'wtf_is_this':\n" r" *handle<wtf_is_this> foo;$" ) : parser . Parse ( source , "my_file.mojom" )
Tests an invalid (unknown) handle type.
Tests an invalid ( unknown ) handle type .
"""Tests an invalid (unknown) handle type."""
self