<commit_before>// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/test/nacl/nacl_sandbox_test.h"

#include "base/file_util.h"
#include "base/path_service.h"
#include "chrome/common/chrome_switches.h"

namespace {

// Base url is specified in nacl_test.
const FilePath::CharType kSrpcHwHtmlFileName[] =
    FILE_PATH_LITERAL("srpc_hw.html");

}  // namespace

NaClSandboxTest::NaClSandboxTest() {
  // Append the --test-nacl-sandbox=$TESTDLL flag before launching.
  FilePath dylib_dir;
  PathService::Get(base::DIR_EXE, &dylib_dir);
#if defined(OS_MACOSX)
  dylib_dir = dylib_dir.AppendASCII("libnacl_security_tests.dylib");
  launch_arguments_.AppendSwitchPath(switches::kTestNaClSandbox, dylib_dir);
#elif defined(OS_WIN)
  // Let the NaCl process detect if it is 64-bit or not and hack on
  // the appropriate suffix to this dll.
  dylib_dir = dylib_dir.AppendASCII("nacl_security_tests");
  launch_arguments_.AppendSwitchPath(switches::kTestNaClSandbox, dylib_dir);
#elif defined(OS_LINUX)
  // We currently do not test the Chrome Linux SUID or seccomp sandboxes.
#endif
}

NaClSandboxTest::~NaClSandboxTest() {
}

// http://crbug.com/50121
TEST_F(NaClSandboxTest, FLAKY_NaClOuterSBTest) {
  // Load a helloworld .nexe to trigger the nacl loader test.
  FilePath test_file(kSrpcHwHtmlFileName);
  RunTest(test_file, action_max_timeout_ms());
}
<commit_msg>Remove flaky marker from nacl_sandbox_test now that it is fixed.<commit_after>// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/test/nacl/nacl_sandbox_test.h"

#include "base/file_util.h"
#include "base/path_service.h"
#include "chrome/common/chrome_switches.h"

namespace {

// Base url is specified in nacl_test.
const FilePath::CharType kSrpcHwHtmlFileName[] =
    FILE_PATH_LITERAL("srpc_hw.html");

}  // namespace

NaClSandboxTest::NaClSandboxTest() {
  // Append the --test-nacl-sandbox=$TESTDLL flag before launching.
  FilePath dylib_dir;
  PathService::Get(base::DIR_EXE, &dylib_dir);
#if defined(OS_MACOSX)
  dylib_dir = dylib_dir.AppendASCII("libnacl_security_tests.dylib");
  launch_arguments_.AppendSwitchPath(switches::kTestNaClSandbox, dylib_dir);
#elif defined(OS_WIN)
  // Let the NaCl process detect if it is 64-bit or not and hack on
  // the appropriate suffix to this dll.
  dylib_dir = dylib_dir.AppendASCII("nacl_security_tests");
  launch_arguments_.AppendSwitchPath(switches::kTestNaClSandbox, dylib_dir);
#elif defined(OS_LINUX)
  // We currently do not test the Chrome Linux SUID or seccomp sandboxes.
#endif
}

NaClSandboxTest::~NaClSandboxTest() {
}

TEST_F(NaClSandboxTest, NaClOuterSBTest) {
  // Load a helloworld .nexe to trigger the nacl loader test.
  FilePath test_file(kSrpcHwHtmlFileName);
  RunTest(test_file, action_max_timeout_ms());
}

{'fraction_non_alphanumeric': 0.10494852208568582, 'fraction_numerical': 0.005645964795748921, 'mean_word_length': 5.159509202453988, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4723196', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1064, 'n_words': 258}