Unbreak test-webkitpy.
The wpt_github code imports libhttp2, which is not part of the
standard Python libraries (at least on Mac). Luckily, we have
a hermetic instance of it in depot_tools, so let's use that instead.
R=jeffcarp
BUG=
Review-Url: https://codereview.chromium.org/2548163002
Cr-Commit-Position: refs/heads/master@{#436183}
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py
index c648dc0..b9ea558 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py
@@ -4,8 +4,21 @@
import base64
import json
-import httplib2
import logging
+import os
+import sys
+
+from webkitpy.common.system.filesystem import FileSystem
+from webkitpy.common.webkit_finder import WebKitFinder
+
+# httplib2 is part of the hermetic depot_tools install,
+# but we first need to find a path to it.
+# TODO(dglazkov): libhttp2 needs to be imported into thirdparty dir.
+# See http://crbug.com/670987 for details.
+_DEPOT_TOOLS_ROOT = WebKitFinder(FileSystem()).depot_tools_base()
+sys.path.append(os.path.join(_DEPOT_TOOLS_ROOT, 'third_party'))
+
+import httplib2
_log = logging.getLogger(__name__)
API_BASE = 'https://api.github.com'