Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(818)

Unified Diff: content/test/layout_tests/runner/TestCommon.h

Issue 110533009: Import TestRunner library into chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/test/layout_tests/runner/TestCommon.h
diff --git a/third_party/tcmalloc/vendor/src/base/linuxthreads.h b/content/test/layout_tests/runner/TestCommon.h
similarity index 66%
copy from third_party/tcmalloc/vendor/src/base/linuxthreads.h
copy to content/test/layout_tests/runner/TestCommon.h
index 5c318fed7ec4c47e7bf082e315992e102abcd620..ef33d40a79a58a0f1b20dcd037fe178d448b50e0 100644
--- a/third_party/tcmalloc/vendor/src/base/linuxthreads.h
+++ b/content/test/layout_tests/runner/TestCommon.h
@@ -1,5 +1,9 @@
-/* Copyright (c) 2005-2007, Google Inc.
- * All rights reserved.
+// Copyright 2013 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.
+
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -26,28 +30,29 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ---
- * Author: Markus Gutschke
*/
-#ifndef _LINUXTHREADS_H
-#define _LINUXTHREADS_H
-
-/* Include thread_lister.h to get the interface that we implement for linux.
- */
+#ifndef TestCommon_h
+#define TestCommon_h
-/* We currently only support x86-32 and x86-64 on Linux. Porting to other
- * related platforms should not be difficult.
- */
-#if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) || \
- defined(__mips__) || defined(__PPC__)) && defined(__linux)
+#include <stdio.h>
+#include <string>
-/* Define the THREADS symbol to make sure that there is exactly one core dumper
- * built into the library.
- */
-#define THREADS "Linux /proc"
+#include "base/compiler_specific.h"
+#include "third_party/WebKit/public/platform/WebCommon.h"
+#if defined(WIN32)
+#define snprintf(str, size, ...) _snprintf_s(str, size, size, __VA_ARGS__)
#endif
-#endif /* _LINUXTHREADS_H */
+namespace WebTestRunner {
+
+inline bool isASCIIAlpha(char ch) { return (ch | 0x20) >= 'a' && (ch | 0x20) <= 'z'; }
+
+inline bool isNotASCIIAlpha(char ch) { return !isASCIIAlpha(ch); }
+
+std::string normalizeLayoutTestURL(const std::string& url);
+
+}
+
+#endif // TestCommon_h

Powered by Google App Engine
This is Rietveld 408576698