third_party/blink/web_tests/wpt_internal/prerender/PRESUBMIT.py
def _CheckTimeoutMetaTags(input_api, output_api):
    """ This function ensures that all WPTs for prerendering have meta tags
        to lengthen test timeout as some tests can possibly run out of time
        on windows platform.
    """
    results = []

    def file_filter(f):
        return (f.LocalPath().endswith(('html'))
                and (os.path.join('resources', '') not in f.LocalPath()))

    for f in input_api.AffectedFiles(include_deletes=False,
                                     file_filter=file_filter):
        if not _CheckFileTimeoutMetaTags(f):
            results.append(
                output_api.PresubmitError(
                    ('Missing long timeout.'
                     'Add `<meta name="timeout" content="long">` to %s.') %
                    f.LocalPath()))
    return results
 This function ensures that all WPTs for prerendering have meta tags
        to lengthen test timeout as some tests can possibly run out of time
        on windows platform.
    
This function ensures that all WPTs for prerendering have meta tags
to lengthen test timeout as some tests can possibly run out of time
on windows platform.
This function ensures that all WPTs for prerendering have meta tags to lengthen test timeout as some tests can possibly run out of time on windows platform .
def _CheckTimeoutMetaTags(input_api, output_api):
    results = []
    def file_filter(f):
        return (f.LocalPath().endswith(('html'))
                and (os.path.join('resources', '') not in f.LocalPath()))
    for f in input_api.AffectedFiles(include_deletes=False,
                                     file_filter=file_filter):
        if not _CheckFileTimeoutMetaTags(f):
            results.append(
                output_api.PresubmitError(
                    ('Missing long timeout.'
                     'Add `<meta name="timeout" content="long">` to %s.') %
                    f.LocalPath()))
    return results
def _CheckTimeoutMetaTags ( input_api , output_api ) : results = [ ] def file_filter ( f ) : return ( f . LocalPath ( ) . endswith ( ( 'html' ) ) and ( os . path . join ( 'resources' , '' ) not in f . LocalPath ( ) ) ) for f in input_api . AffectedFiles ( include_deletes = False , file_filter = file_filter ) : if not _CheckFileTimeoutMetaTags ( f ) : results . append ( output_api . PresubmitError ( ( 'Missing long timeout.' 'Add `<meta name="timeout" content="long">` to %s.' ) % f . LocalPath ( ) ) ) return results
This function ensures that all WPTs for prerendering have meta tags
to lengthen test timeout as some tests can possibly run out of time
on windows platform.
This function ensures that all WPTs for prerendering have meta tags to lengthen test timeout as some tests can possibly run out of time on windows platform .
""" This function ensures that all WPTs for prerendering have meta tags
        to lengthen test timeout as some tests can possibly run out of time
        on windows platform.
    """
input_api
output_api