author Guido Urdaneta <>
Wed, 06 Mar 2019 12:35:06 +0000
changeset 522276 fff147f5ba18269e1d3d1dc1861718f42c4aefe0
parent 474666 314e3ae1520f8e1b17e85982e8e2c515dced30a9
permissions -rw-r--r--
Bug 1526801 [wpt PR 15292] - [PeerConnection] Fire signalingstatechange event at the right time, a=testonly Automatic update from web-platform-tests [PeerConnection] Fire signalingstatechange event at the right time Prior to this CL, the event was fired before the transceiver state was updated, in contradiction with the spec, which says it should be fired after the transceiver state is updated. Bug: 920200 Change-Id: I757cc0161a5da4888cd628619180e24a54dc732b Reviewed-on: Commit-Queue: Guido Urdaneta <> Reviewed-by: Henrik Boström <> Cr-Commit-Position: refs/heads/master@{#634609} -- wpt-commits: 0f4203743c56377734f9682abb015d56d6a1a71e wpt-pr: 15292

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at

'''Parses a given application.ini file and outputs the corresponding
   StaticXREAppData structure as a C++ header file'''

import ConfigParser
import sys

def main(output, file):
    config = ConfigParser.RawConfigParser()
    flags = set()
        if config.getint('XRE', 'EnableProfileMigrator') == 1:
    except Exception:
        if config.getint('Crash Reporter', 'Enabled') == 1:
    except Exception:
    appdata = dict(("%s:%s" % (s, o), config.get(s, o))
                   for s in config.sections() for o in config.options(s))
    appdata['flags'] = ' | '.join(flags) if flags else '0'
    appdata['App:profile'] = ('"%s"' % appdata['App:profile']
                              if 'App:profile' in appdata else 'NULL')
    expected = ('App:vendor', 'App:name', 'App:remotingname', 'App:version', 'App:buildid',
                'App:id', 'Gecko:minversion', 'Gecko:maxversion')
    missing = [var for var in expected if var not in appdata]
    if missing:
        print >>sys.stderr, \
            "Missing values in %s: %s" % (file, ', '.join(missing))

    if 'Crash Reporter:serverurl' not in appdata:
        appdata['Crash Reporter:serverurl'] = ''

    if 'App:sourcerepository' in appdata and 'App:sourcestamp' in appdata:
        appdata['App:sourceurl'] = '"%(App:sourcerepository)s/rev/%(App:sourcestamp)s"' % appdata
        appdata['App:sourceurl'] = 'NULL'

    output.write('''#include "mozilla/XREAppData.h"
             static const mozilla::StaticXREAppData sAppData = {
                 NULL, // copyright
                 "%(Crash Reporter:serverurl)s",
                 NULL, // UAName
             };''' % appdata)

if __name__ == '__main__':
    if len(sys.argv) != 1:
        main(sys.stdout, sys.argv[1])
        print >>sys.stderr, "Usage: %s /path/to/application.ini" % sys.argv[0]