Add missing export and import source files to password_manager's browser target.
[chromium-blink-merge.git] / third_party / ots / test / test_malicious_fonts.sh
blob7a35f26340db1cbfc6d7235028871d6d74bd23bc
1 #!/bin/bash
3 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
7 # Usage: ./test_malicious_fonts.sh [ttf_or_otf_file_name]
9 BASE_DIR=~/malicious/
10 CHECKER=./validator-checker
12 if [ ! -x "$CHECKER" ] ; then
13 echo "$CHECKER is not found."
14 exit 1
17 if [ $# -eq 0 ] ; then
18 # No font file is specified. Apply this script to all TT/OT files under the
19 # BASE_DIR.
20 if [ ! -d $BASE_DIR ] ; then
21 echo "$BASE_DIR does not exist."
22 exit 1
25 # Recursively call this script.
26 find $BASE_DIR -type f -name '*tf' -exec "$0" {} \;
27 echo
28 exit 0
31 if [ $# -gt 1 ] ; then
32 echo "Usage: $0 [ttf_or_otf_file_name]"
33 exit 1
36 # Confirm that the malicious font file does not crash OTS nor OS font renderer.
37 base=`basename "$1"`
38 "$CHECKER" "$1" > /dev/null 2>&1 || (echo ; echo "\nFAIL: $1 (Run $CHECKER $1 for more information.)")
39 echo -n "."