Index: third_party/WebKit/Tools/Scripts/webkitpy/bindings/bindings_path_finder.py |
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/bindings/bindings_path_finder.py b/third_party/WebKit/Tools/Scripts/webkitpy/bindings/bindings_path_finder.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..73ea8d70317d12f3888cca9557e10b3baa37ed1b |
--- /dev/null |
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/bindings/bindings_path_finder.py |
@@ -0,0 +1,31 @@ |
+# Copyright 2016 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. |
+ |
+# Source/ path is needed both to find input IDL files, and to import other |
+# Python modules. |
+ |
+"""Tiny utility to find various paths, relevant for running bindings |
+tests. |
+""" |
+ |
+import os |
+ |
+ |
+def get_blink_source(): |
+ return os.path.normpath( |
+ os.path.join( |
+ os.path.dirname(__file__), os.pardir, os.pardir, os.pardir, |
+ os.pardir, 'Source')) |
+ |
+ |
+def get_bindings_scripts(): |
+ return os.path.join(get_blink_source(), 'bindings', 'scripts') |
+ |
+ |
+def get_test_input(): |
+ return os.path.join(get_blink_source(), 'bindings', 'tests', 'idls') |
+ |
+ |
+def get_test_results(): |
+ return os.path.join(get_blink_source(), 'bindings', 'tests', 'results') |