OLD | NEW |
(Empty) | |
| 1 # -*- python -*- |
| 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 |
| 6 # Test loading a NaCl-enabled Chrome Extension. This also covers parts |
| 7 # of {ppb,ppp}_instance interfaces that are not testable any other way. |
| 8 |
| 9 # The extension registers the nacl module as a content handler for |
| 10 # application/pdf because it's easy to override that known type, but the |
| 11 # actual file we use is a plain text file with a .pdf file extension. |
| 12 |
| 13 Import('env') |
| 14 |
| 15 env.Prepend(CPPDEFINES=['XP_UNIX']) |
| 16 |
| 17 nexe = 'ppapi_extension_mime_handler_%s' % env.get('TARGET_FULLARCH') |
| 18 |
| 19 env.ComponentProgram( |
| 20 nexe, |
| 21 ['ppapi_extension_mime_handler.cc'], |
| 22 EXTRA_LIBS=['${PPAPI_LIBS}', |
| 23 'ppapi_test_lib', |
| 24 'pthread', |
| 25 'platform', |
| 26 'gio']) |
| 27 |
| 28 # Copy the extension into place (as a subdir in the staging dir). |
| 29 dest_copy = env.Replicate('$STAGING_DIR/ppapi_extension_mime_handler', |
| 30 ['ppapi_extension_mime_handler.nmf', |
| 31 'manifest.json', |
| 32 env.File('$STAGING_DIR/' + nexe + '$PROGSUFFIX')]) |
| 33 |
| 34 env.Depends(env.Alias(nexe), dest_copy) |
| 35 |
| 36 # Publish the html,js, and pdf. |
| 37 env.Publish(nexe, 'run', |
| 38 ['ppapi_extension_mime_handler.html', |
| 39 'mime_test_data.pdf']) |
| 40 |
| 41 node = env.PPAPIBrowserTester('ppapi_extension_mime_handler.out', |
| 42 url='ppapi_extension_mime_handler.html', |
| 43 extensions=[env.Dir('$STAGING_DIR/ppapi_extension_mime_handler')], |
| 44 files=env.ExtractPublishedFiles(nexe)) |
| 45 |
| 46 env.Depends(node, dest_copy) |
| 47 |
| 48 env.AddNodeToTestSuite(node, |
| 49 ['chrome_browser_tests'], |
| 50 'run_ppapi_extension_mime_handler_browser_test', |
| 51 is_broken=env.PPAPIBrowserTesterIsBroken()) |
OLD | NEW |