build/dumpScreen.py
author Alexandre Poirot <poirot.alex@gmail.com>
Mon, 10 Feb 2014 09:16:57 -0500
changeset 186076 81f210d3ad52c0fe6f41a895444da1d91cb30b7a
parent 164764 ef2d30255b7a36799fcb5d2729375cb6bb6911c4
permissions -rw-r--r--
Bug 944451 - Land the simulator addon into mozilla-central. r=vingtetun, r=gps, r=paul

#!/usr/bin/env python

"""
test dumpScreen functionality
"""

import automationutils
import optparse
import os
import sys


def main(args=sys.argv[1:]):

    # parse CLI options
    usage = '%prog [options] path/to/OBJDIR/dist/bin'
    parser = optparse.OptionParser(usage=usage)
    options, args = parser.parse_args(args)
    if len(args) != 1:
        parser.error("Please provide utility path")
    utilityPath = args[0]

    # dump the screen to a data: URL
    uri = automationutils.dumpScreen(utilityPath)

    # print the uri
    print uri

if __name__ == '__main__':
    main()