<commit_before>#!/usr/bin/env python
# Copyright (c) 2012 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.

import copy
import ctypes
from distutils import version
import fnmatch
import glob
import hashlib
import logging
import os
import platform
import re
import shutil
import subprocess
import sys
import tempfile
import urllib2
import xml.dom.minidom
import zipfile

import pyauto_functional  # Must be imported before pyauto.
import pyauto
import pyauto_utils
import test_utils


class NaClSDKTest(pyauto.PyUITest):
  """Tests for the NaCl SDK."""
  _isExamplesTest = False
  _extracted_sdk_path = None
  _temp_dir = None
  _updated_pepper_versions = []
  _latest_updated_pepper_versions = []
  _settings = {
      'post_sdk_download_url': 'http://code.google.com/chrome/nativeclient/'
          'docs/download.html',
      'post_sdk_zip': 'http://commondatastorage.googleapis.com/'
          'nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip',
      'min_required_chrome_build': 14,
  }

  def tearDown(self):
    pyauto.PyUITest.tearDown(self)
    if not self._isExamplesTest:
      self._RemoveDownloadedTestFile()

  def testNaClSDK(self):
    """Verify that NaCl SDK is working properly."""
    if not self._HasAllSystemRequirements():
      logging.info('System does not meet the requirements.')
      return
    self._extracted_sdk_path = tempfile.mkdtemp()
    self._VerifyDownloadLinks()
    self._VerifyNaClSDKInstaller()
    self._VerifyInstall()
    self._VerifyUpdate()
    self._LaunchServerAndVerifyExamplesAllPepperVersions()<commit_msg>Updating the NaCl download zip url in nacl_sdk test  BUG: 154074<commit_after>#!/usr/bin/env python
# Copyright (c) 2012 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.

import copy
import ctypes
from distutils import version
import fnmatch
import glob
import hashlib
import logging
import os
import platform
import re
import shutil
import subprocess
import sys
import tempfile
import urllib2
import xml.dom.minidom
import zipfile

import pyauto_functional  # Must be imported before pyauto.
import pyauto
import pyauto_utils
import test_utils


class NaClSDKTest(pyauto.PyUITest):
  """Tests for the NaCl SDK."""
  _isExamplesTest = False
  _extracted_sdk_path = None
  _temp_dir = None
  _updated_pepper_versions = []
  _latest_updated_pepper_versions = []
  _settings = {
      'post_sdk_download_url': 'http://code.google.com/chrome/nativeclient/'
          'docs/download.html',
      'post_sdk_zip': 'http://storage.googleapis.com/'
          'nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip',
      'min_required_chrome_build': 14,
  }

  def tearDown(self):
    pyauto.PyUITest.tearDown(self)
    if not self._isExamplesTest:
      self._RemoveDownloadedTestFile()

  def testNaClSDK(self):
    """Verify that NaCl SDK is working properly."""
    if not self._HasAllSystemRequirements():
      logging.info('System does not meet the requirements.')
      return
    self._extracted_sdk_path = tempfile.mkdtemp()
    self._VerifyDownloadLinks()
    self._VerifyNaClSDKInstaller()
    self._VerifyInstall()
    self._VerifyUpdate()
    self._LaunchServerAndVerifyExamplesAllPepperVersions()
{'fraction_non_alphanumeric': 0.08226144181872569, 'fraction_numerical': 0.005982650314089142, 'mean_word_length': 4.144615384615385, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '800556', 'n_tokens_mistral': 1067, 'n_tokens_neox': 1016, 'n_words': 281}