| Index: ppapi/native_client/tests/ppapi_browser/extension_mime_handler/nacl.scons
|
| ===================================================================
|
| --- ppapi/native_client/tests/ppapi_browser/extension_mime_handler/nacl.scons (revision 0)
|
| +++ ppapi/native_client/tests/ppapi_browser/extension_mime_handler/nacl.scons (revision 0)
|
| @@ -0,0 +1,51 @@
|
| +# -*- python -*-
|
| +# Copyright (c) 2011 The Native Client Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +# Test loading a NaCl-enabled Chrome Extension. This also covers parts
|
| +# of {ppb,ppp}_instance interfaces that are not testable any other way.
|
| +
|
| +# The extension registers the nacl module as a content handler for
|
| +# application/pdf because it's easy to override that known type, but the
|
| +# actual file we use is a plain text file with a .pdf file extension.
|
| +
|
| +Import('env')
|
| +
|
| +env.Prepend(CPPDEFINES=['XP_UNIX'])
|
| +
|
| +nexe = 'ppapi_extension_mime_handler_%s' % env.get('TARGET_FULLARCH')
|
| +
|
| +env.ComponentProgram(
|
| + nexe,
|
| + ['ppapi_extension_mime_handler.cc'],
|
| + EXTRA_LIBS=['${PPAPI_LIBS}',
|
| + 'ppapi_test_lib',
|
| + 'pthread',
|
| + 'platform',
|
| + 'gio'])
|
| +
|
| +# Copy the extension into place (as a subdir in the staging dir).
|
| +dest_copy = env.Replicate('$STAGING_DIR/ppapi_extension_mime_handler',
|
| + ['ppapi_extension_mime_handler.nmf',
|
| + 'manifest.json',
|
| + env.File('$STAGING_DIR/' + nexe + '$PROGSUFFIX')])
|
| +
|
| +env.Depends(env.Alias(nexe), dest_copy)
|
| +
|
| +# Publish the html,js, and pdf.
|
| +env.Publish(nexe, 'run',
|
| + ['ppapi_extension_mime_handler.html',
|
| + 'mime_test_data.pdf'])
|
| +
|
| +node = env.PPAPIBrowserTester('ppapi_extension_mime_handler.out',
|
| + url='ppapi_extension_mime_handler.html',
|
| + extensions=[env.Dir('$STAGING_DIR/ppapi_extension_mime_handler')],
|
| + files=env.ExtractPublishedFiles(nexe))
|
| +
|
| +env.Depends(node, dest_copy)
|
| +
|
| +env.AddNodeToTestSuite(node,
|
| + ['chrome_browser_tests'],
|
| + 'run_ppapi_extension_mime_handler_browser_test',
|
| + is_broken=env.PPAPIBrowserTesterIsBroken())
|
|
|