message: test(bazel): allow no sandbox for protractor tests
  It specifies --no-sandbox flag when running the protractor tests as
  root. This is needed for running the tests inside a docker container.
  PR Close
diff: @@ -107,6 +107,11 @@ if (process.env['WEB_TEST_METADATA']) {
  if (headless) {
  args.push('--headless');
  args.push('--disable-gpu');
  + const isRoot = process.getuid && process.getuid() == 0;
  + if (isRoot) {
  + // Specify --no-sandbox if it is started by root.
  + args.push('--no-sandbox');
  + }
  }
  setConf(conf, 'directConnect', true, 'is set to true for chrome');
  setConf(
  