build/dumpScreen.py
author Masayuki Nakano <masayuki@d-toybox.com>
Fri, 05 Jun 2015 18:28:20 +0900
changeset 279723 cc9201883c30f2b20463f9ec6b77a2e8deea2412
parent 164764 ef2d30255b7a36799fcb5d2729375cb6bb6911c4
permissions -rw-r--r--
Bug 1166436 part.15 ContentCache::CacheTextRects() should refer TextComposition::LastData() because TextComposition::String() may not be modified yet when it's called r=m_kato

#!/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()