| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 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 | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # Test loading a NaCl-enabled Chrome Extension. | 6 # Test loading a NaCl-enabled Chrome Extension. |
| 7 | 7 |
| 8 Import('env') | 8 Import('env') |
| 9 | 9 |
| 10 # BUG(adonovan): test is breaking on ARM. Disable in haste... | 10 # BUG(adonovan): test is breaking on ARM. Disable in haste... |
| 11 if env.Bit('target_arm'): | 11 if env.Bit('target_arm'): |
| 12 Return() | 12 Return() |
| 13 | 13 env.Replace(TEST_DIR='${SOURCE_ROOT}/ppapi/native_client/tests/' + |
| 14 'ppapi_test_example') |
| 14 | 15 |
| 15 nexe = 'ppapi_test_example_${TARGET_FULLARCH}${PROGSUFFIX}' | 16 nexe = 'ppapi_test_example_${TARGET_FULLARCH}${PROGSUFFIX}' |
| 16 | 17 |
| 17 # Note: this test uses the nexe, manifest.json, background.html and | 18 # Note: this test uses the nexe, manifest.json, background.html and |
| 18 # test_bridge.js, but these files are loaded from the disk as part of the | 19 # test_bridge.js, but these files are loaded from the disk as part of the |
| 19 # installed Chrome extension and not loaded through the tester's web server. | 20 # installed Chrome extension and not loaded through the tester's web server. |
| 20 # These files need their own install command. | 21 # These files need their own install command. |
| 21 dest_copy = env.Replicate('$STAGING_DIR/chrome_extension', | 22 dest_copy = env.Replicate('$STAGING_DIR/chrome_extension', |
| 22 [env.File('$STAGING_DIR/%s' % nexe), | 23 [env.File('$STAGING_DIR/%s' % nexe), |
| 23 env.File('$STAGING_DIR/ppapi_test_example.nmf'), | |
| 24 'background.html', | 24 'background.html', |
| 25 'manifest.json', | 25 'manifest.json', |
| 26 'test_bridge.js']) | 26 'test_bridge.js']) |
| 27 dest_copy.append(env.CopyLibsForExtension( |
| 28 '$STAGING_DIR/chrome_extension', |
| 29 '$STAGING_DIR/ppapi_test_example.nmf')) |
| 27 | 30 |
| 28 node = env.PPAPIBrowserTester( | 31 node = env.PPAPIBrowserTester( |
| 29 'chrome_extension_test.out', | 32 'chrome_extension_test.out', |
| 30 url='chrome_extension_test.html', | 33 url='chrome_extension_test.html', |
| 34 nmfs=['${TEST_DIR}/ppapi_test_example.nmf'], |
| 31 extensions=[env.Dir('$STAGING_DIR/chrome_extension')], | 35 extensions=[env.Dir('$STAGING_DIR/chrome_extension')], |
| 32 files=[env.File('chrome_extension_test.html')] | 36 files=[env.File('chrome_extension_test.html')] |
| 33 ) | 37 ) |
| 34 env.Depends(node, dest_copy) | 38 env.Depends(node, dest_copy) |
| 35 env.Alias('all_programs', dest_copy) | 39 env.Alias('all_programs', dest_copy) |
| 36 | 40 |
| 37 env.AddNodeToTestSuite( | 41 env.AddNodeToTestSuite( |
| 38 node, | 42 node, |
| 39 ['chrome_browser_tests'], | 43 ['chrome_browser_tests'], |
| 40 'run_chrome_extension_test', | 44 'run_chrome_extension_test', |
| 41 is_broken=env.PPAPIBrowserTesterIsBroken()) | 45 is_broken=env.PPAPIBrowserTesterIsBroken()) |
| OLD | NEW |