summaryrefslogtreecommitdiffstats
path: root/components/test_runner/test_common.h
blob: 973b85cbc21ae0aac724542849f57b7bd6e115d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2014 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.

#ifndef COMPONENTS_TEST_RUNNER_TEST_COMMON_H_
#define COMPONENTS_TEST_RUNNER_TEST_COMMON_H_

#include <string>

#include "components/test_runner/test_runner_export.h"

namespace test_runner {

inline bool IsASCIIAlpha(char ch) {
  return (ch | 0x20) >= 'a' && (ch | 0x20) <= 'z';
}

inline bool IsNotASCIIAlpha(char ch) {
  return !IsASCIIAlpha(ch);
}

TEST_RUNNER_EXPORT std::string NormalizeLayoutTestURL(const std::string& url);

}  // namespace test_runner

#endif  // COMPONENTS_TEST_RUNNER_TEST_COMMON_H_