| OLD | NEW |
| 1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions | 4 # modification, are permitted provided that the following conditions |
| 5 # are met: | 5 # are met: |
| 6 # | 6 # |
| 7 # 1. Redistributions of source code must retain the above | 7 # 1. Redistributions of source code must retain the above |
| 8 # copyright notice, this list of conditions and the following | 8 # copyright notice, this list of conditions and the following |
| 9 # disclaimer. | 9 # disclaimer. |
| 10 # 2. Redistributions in binary form must reproduce the above | 10 # 2. Redistributions in binary form must reproduce the above |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 22 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 23 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | 23 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |
| 24 # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF | 24 # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
| 25 # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 25 # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 26 # SUCH DAMAGE. | 26 # SUCH DAMAGE. |
| 27 | 27 |
| 28 import HTMLParser | 28 import HTMLParser |
| 29 import logging | 29 import logging |
| 30 import re | 30 import re |
| 31 | 31 |
| 32 from webkitpy.common.host import Host | |
| 33 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup | 32 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup |
| 34 | 33 |
| 35 | 34 |
| 36 _log = logging.getLogger(__name__) | 35 _log = logging.getLogger(__name__) |
| 37 | 36 |
| 38 | 37 |
| 39 class TestParser(object): | 38 class TestParser(object): |
| 40 | 39 |
| 41 def __init__(self, filename, host): | 40 def __init__(self, filename, host): |
| 42 self.filename = filename | 41 self.filename = filename |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 href_paths = [href_tag['href'] for href_tag in elements_with_href_attrib
utes] | 162 href_paths = [href_tag['href'] for href_tag in elements_with_href_attrib
utes] |
| 164 | 163 |
| 165 paths = src_paths + href_paths + urls | 164 paths = src_paths + href_paths + urls |
| 166 for path in paths: | 165 for path in paths: |
| 167 if not path.startswith('http:') and not path.startswith('mailto:'): | 166 if not path.startswith('http:') and not path.startswith('mailto:'): |
| 168 uri_scheme_pattern = re.compile(r'[A-Za-z][A-Za-z+.-]*:') | 167 uri_scheme_pattern = re.compile(r'[A-Za-z][A-Za-z+.-]*:') |
| 169 if not uri_scheme_pattern.match(path): | 168 if not uri_scheme_pattern.match(path): |
| 170 support_files.append(path) | 169 support_files.append(path) |
| 171 | 170 |
| 172 return support_files | 171 return support_files |
| OLD | NEW |