def is_js_test(self, test_path): """Checks whether a given file is a testharness.js test. Args: test_path: A file path relative to the layout tests directory. This might correspond to a deleted file or a non-test. """ absolute_path = self.host.filesystem.join(self.finder.layout_tests_dir(), test_path) test_parser = TestParser(absolute_path, self.host) if not test_parser.test_doc: return False return test_parser.is_jstest()
def is_js_test(self, test_path): """Checks whether a given file is a testharness.js test. TODO(qyearsley): This may not behave how we want it to for virtual tests. TODO(qyearsley): Avoid using TestParser; maybe this should use Port.test_type, or Port.reference_files to see whether it's not a reference test? Args: test_path: A file path relative to the layout tests directory. This might correspond to a deleted file or a non-test. """ absolute_path = self.host.filesystem.join(self.finder.layout_tests_dir(), test_path) test_parser = TestParser(absolute_path, self.host) if not test_parser.test_doc: return False return test_parser.is_jstest()