Home | History | Annotate | Download | only in documentscan_AppTestWithFakeLorgnette
      1 # Copyright 2015 The Chromium OS Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 AUTHOR = 'pstew, kathrelkeld'
      6 NAME = 'documentscan_AppTestWithFakeLorgnette'
      7 TIME = 'SHORT'
      8 TEST_TYPE = 'client'
      9 
     10 
     11 DOC = """
     12 This test verifies that the Chrome APIs work correctly to acquire
     13 image data from a mocked version of the lorgnette document image
     14 capture daemon.  This test fails if:
     15 
     16   - The test extension cannot be installed
     17   - The extension is unable to interact with the Chrome scanning API
     18   - The Chrome scanning API cannot interact with the mock lorgnette
     19 
     20 This test is built up out of a number of interlocking components:
     21 
     22   - A chrome app that accesses the Document Scan API (in the
     23     "document_scan_test_app" directory).  The test launches this
     24     app in fullscreen mode.
     25 
     26   - An emulated mouse, implemented by subclassing touch_playback_test_base
     27     and using the "amazon_mouse.prop" file.
     28 
     29   - A mouse move and button click event stream stored in the
     30     "button_click.event" file.  The pair of this and the emulated mouse
     31     allows us to provide a gesture when clicking on the "Scan" button
     32     within the App.  Since the Chrome document scan API requires a user
     33     gesture, this method provides a viable option as opposed to
     34     triggering the scan from javascript.
     35 
     36   - The "mock_lorgnette" module that provides a fake lorgnette daemon
     37     that the Chrome process will communicate with for the purposes of
     38     this test.  It will accept the D-Bus RPC calls that Chrome makes
     39     and provide the "lorgnette-test.png" image in response to a scan
     40     request.
     41 
     42 """
     43 
     44 job.run_test('documentscan_AppTestWithFakeLorgnette', iface_name='all', tag='all')
     45