| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 3 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 4 # | 4 # |
| 5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
| 6 # modification, are permitted provided that the following conditions | 6 # modification, are permitted provided that the following conditions |
| 7 # are met: | 7 # are met: |
| 8 # | 8 # |
| 9 # 1. Redistributions of source code must retain the above | 9 # 1. Redistributions of source code must retain the above |
| 10 # copyright notice, this list of conditions and the following | 10 # copyright notice, this list of conditions and the following |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 22 # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 23 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 23 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 24 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 24 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |
| 26 # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF | 26 # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
| 27 # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 27 # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 28 # SUCH DAMAGE. | 28 # SUCH DAMAGE. |
| 29 | 29 |
| 30 import os | 30 import os |
| 31 import re | 31 import re |
| 32 import unittest2 as unittest | 32 from webkitpy.thirdparty import unittest2 as unittest |
| 33 | 33 |
| 34 from webkitpy.common.system.outputcapture import OutputCapture | 34 from webkitpy.common.system.outputcapture import OutputCapture |
| 35 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup | 35 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup |
| 36 from webkitpy.w3c.test_converter import W3CTestConverter | 36 from webkitpy.w3c.test_converter import W3CTestConverter |
| 37 | 37 |
| 38 | 38 |
| 39 DUMMY_FILENAME = 'dummy.html' | 39 DUMMY_FILENAME = 'dummy.html' |
| 40 | 40 |
| 41 class W3CTestConverterTest(unittest.TestCase): | 41 class W3CTestConverterTest(unittest.TestCase): |
| 42 | 42 |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 # through the list to replace the double-digit tokens first | 310 # through the list to replace the double-digit tokens first |
| 311 index = len(test_properties) - 1 | 311 index = len(test_properties) - 1 |
| 312 while index >= 0: | 312 while index >= 0: |
| 313 # Use the unprefixed version | 313 # Use the unprefixed version |
| 314 test_prop = test_properties[index].replace('-webkit-', '') | 314 test_prop = test_properties[index].replace('-webkit-', '') |
| 315 # Replace the token | 315 # Replace the token |
| 316 html = html.replace('@test' + str(index) + '@', test_prop) | 316 html = html.replace('@test' + str(index) + '@', test_prop) |
| 317 index -= 1 | 317 index -= 1 |
| 318 | 318 |
| 319 return (test_properties, html) | 319 return (test_properties, html) |
| OLD | NEW |