summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authordbeam <dbeam@chromium.org>2015-05-04 18:24:13 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-05 01:24:42 +0000
commit7c1c22d0c4d586be20771411d2dc43cb13619fb9 (patch)
tree771a2349c72f540c1ce314f82a13ff81cf70b79b /third_party
parent5cdeee231d1a02b03bad6d2975f03b2d2f51d815 (diff)
downloadchromium_src-7c1c22d0c4d586be20771411d2dc43cb13619fb9.zip
chromium_src-7c1c22d0c4d586be20771411d2dc43cb13619fb9.tar.gz
chromium_src-7c1c22d0c4d586be20771411d2dc43cb13619fb9.tar.bz2
Fix style nits in compiler_customization_test.py after bot fix:
https://codereview.chromium.org/1118223003/ Also import the right module (/facepalm). Checker.py got renamed to compile.py recently. Still had a checker.pyc on my computer :(. R=tbreisacher@chromium.org BUG=393873 NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1123803004 Cr-Commit-Position: refs/heads/master@{#328247}
Diffstat (limited to 'third_party')
-rwxr-xr-xthird_party/closure_compiler/compiler_customization_test.py25
1 files changed, 11 insertions, 14 deletions
diff --git a/third_party/closure_compiler/compiler_customization_test.py b/third_party/closure_compiler/compiler_customization_test.py
index f7e5658..10aee9c 100755
--- a/third_party/closure_compiler/compiler_customization_test.py
+++ b/third_party/closure_compiler/compiler_customization_test.py
@@ -7,27 +7,24 @@ import os
from sys import path as sys_path
import unittest
-SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
-sys_path.insert(0, SCRIPT_PATH)
+_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+sys_path.insert(0, _SCRIPT_DIR)
-from checker import Checker
+from compile import Checker
from processor import FileCache, Processor
-ASSERT_FILE = os.path.join("..", "..", "ui", "webui", "resources", "js",
- "assert.js")
-CR_FILE = os.path.join("..", "..", "ui", "webui", "resources", "js", "cr.js")
-UI_FILE = os.path.join("..", "..", "ui", "webui", "resources", "js", "cr",
- "ui.js")
-
-def rel_to_abs(rel_path):
- return os.path.join(SCRIPT_PATH, rel_path)
+_SRC_DIR = os.path.join(_SCRIPT_DIR, os.pardir, os.pardir)
+_RESOURCES_DIR = os.path.join(_SRC_DIR, "ui", "webui", "resources", "js")
+_ASSERT_JS = os.path.join(_RESOURCES_DIR, "assert.js")
+_CR_JS = os.path.join(_RESOURCES_DIR, "cr.js")
+_CR_UI_JS = os.path.join(_RESOURCES_DIR, "cr", "ui.js")
class CompilerCustomizationTest(unittest.TestCase):
- _ASSERT_DEFINITION = Processor(rel_to_abs(ASSERT_FILE)).contents
- _CR_DEFINE_DEFINITION = Processor(rel_to_abs(CR_FILE)).contents
- _CR_UI_DECORATE_DEFINITION = Processor(rel_to_abs(UI_FILE)).contents
+ _ASSERT_DEFINITION = Processor(_ASSERT_JS).contents
+ _CR_DEFINE_DEFINITION = Processor(_CR_JS).contents
+ _CR_UI_DECORATE_DEFINITION = Processor(_CR_UI_JS).contents
def setUp(self):
self._checker = Checker()