1 // Copyright 2013 The Chromium 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.
5 var startTest = function(testDir) {
6 LOG('startTest: ' + testDir);
7 // load bootstrap script.
8 var script = document.createElement('script');
9 var scriptPath = testDir + '/bootstrap.js';
10 script.type = 'text/javascript';
11 script.src = scriptPath;
12 document.getElementsByTagName('head')[0].appendChild(script);
14 script.addEventListener('error', function(e) {
15 // This is mostly for debugging, e.g. if you specify an incorrect path
16 // for guest bootstrap.js script.
17 window.console.log('Error in loading guest script from path: ' +
19 ', Possibly misspelled path?');
24 var onloadFunction = function() {
25 window.console.log('app.onload');
26 chrome.test.getConfig(function(config) {
27 LOG('embeder.common got config: ' + config);
28 LOG('customArg: ' + config.customArg);
30 window['startTest'](config.customArg);
34 onload = onloadFunction;