def is_non_wpt_test_file(self, dirname, filename):
        # Convert dirname to a relative path to web_tests with slashes
        # normalized and ensure it has a trailing slash.
        normalized_test_dir = self.relative_test_filename(
            dirname) + self.TEST_PATH_SEPARATOR
        if any(
                normalized_test_dir.startswith(d + self.TEST_PATH_SEPARATOR)
                for d in self.WPT_DIRS):
            return False
        extension = self._filesystem.splitext(filename)[1]
        if 'inspector-protocol' in dirname and extension == '.js':
            return True
        if 'devtools' in dirname and extension == '.js':
            return True
        return (self._has_supported_extension(filename)
                and not Port.is_reference_html_file(self._filesystem, dirname,
                                                    filename))