2 # Copyright (c) 2012 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.
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.
9 # The extension registers the nacl module as a content handler for foo/bar.
13 env.Prepend(CPPDEFINES=['XP_UNIX'])
14 env.Replace(TEST_DIR='${SOURCE_ROOT}/ppapi/native_client/tests/ppapi_browser/' +
15 'extension_mime_handler')
17 nexe = env.ProgramNameForNmf('ppapi_extension_mime_handler')
21 ['ppapi_extension_mime_handler.cc'],
28 # Copy the extension into place (as a subdir in the staging dir).
29 dest_copy = env.Replicate('$STAGING_DIR/ppapi_extension_mime_handler',
31 env.File('$STAGING_DIR/' + nexe + '$PROGSUFFIX')])
32 dest_copy.append(env.CopyLibsForExtension(
33 '$STAGING_DIR/ppapi_extension_mime_handler',
34 '$STAGING_DIR/ppapi_extension_mime_handler.nmf'))
36 env.Depends(env.Alias(nexe), dest_copy)
38 # Publish the html and dat.
39 env.Publish(nexe, 'run',
40 ['ppapi_extension_mime_handler.html',
41 'mime_test_data.dat'])
43 node = env.PPAPIBrowserTester('ppapi_extension_mime_handler.out',
44 url='ppapi_extension_mime_handler.html',
45 nmfs=['${TEST_DIR}/ppapi_extension_mime_handler.nmf'],
46 extensions=[env.Dir('$STAGING_DIR/ppapi_extension_mime_handler')],
47 mime_types=[('dat', 'foo/bar')],
48 files=env.ExtractPublishedFiles(nexe))
50 env.Depends(node, dest_copy)
52 env.AddNodeToTestSuite(node,
53 ['chrome_browser_tests'],
54 'run_ppapi_extension_mime_handler_browser_test',
55 is_broken=env.PPAPIBrowserTesterIsBroken())