| OLD | NEW |
| 1 # Copyright (C) 2011 Google Inc. All rights reserved. | 1 # Copyright (C) 2011 Google Inc. 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 are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 CSS FOR TEST | 49 CSS FOR TEST |
| 50 ]]></style> | 50 ]]></style> |
| 51 </head> | 51 </head> |
| 52 <body> | 52 <body> |
| 53 CONTENT OF TEST | 53 CONTENT OF TEST |
| 54 </body> | 54 </body> |
| 55 </html> | 55 </html> |
| 56 """ | 56 """ |
| 57 matches, mismatches = extract_reference_link.get_reference_link(html_1) | 57 matches, mismatches = extract_reference_link.get_reference_link(html_1) |
| 58 self.assertItemsEqual(matches, | 58 self.assertItemsEqual(matches, |
| 59 ["green-box-ref.xht", "blue-box-ref.xht"]) | 59 ['green-box-ref.xht', 'blue-box-ref.xht']) |
| 60 self.assertItemsEqual(mismatches, | 60 self.assertItemsEqual(mismatches, |
| 61 ["red-box-notref.xht", "red-box-notref.xht"]) | 61 ['red-box-notref.xht', 'red-box-notref.xht']) |
| 62 | 62 |
| 63 html_2 = "" | 63 html_2 = '' |
| 64 empty_tuple_1 = extract_reference_link.get_reference_link(html_2) | 64 empty_tuple_1 = extract_reference_link.get_reference_link(html_2) |
| 65 self.assertEqual(empty_tuple_1, ([], [])) | 65 self.assertEqual(empty_tuple_1, ([], [])) |
| 66 | 66 |
| 67 # Link does not have a "ref" attribute. | 67 # Link does not have a "ref" attribute. |
| 68 html_3 = """<link href="RELEVANT_SPEC_SECTION"/>""" | 68 html_3 = """<link href="RELEVANT_SPEC_SECTION"/>""" |
| 69 empty_tuple_2 = extract_reference_link.get_reference_link(html_3) | 69 empty_tuple_2 = extract_reference_link.get_reference_link(html_3) |
| 70 self.assertEqual(empty_tuple_2, ([], [])) | 70 self.assertEqual(empty_tuple_2, ([], [])) |
| 71 | 71 |
| 72 # Link does not have a "href" attribute. | 72 # Link does not have a "href" attribute. |
| 73 html_4 = """<link rel="match"/>""" | 73 html_4 = """<link rel="match"/>""" |
| 74 empty_tuple_3 = extract_reference_link.get_reference_link(html_4) | 74 empty_tuple_3 = extract_reference_link.get_reference_link(html_4) |
| 75 self.assertEqual(empty_tuple_3, ([], [])) | 75 self.assertEqual(empty_tuple_3, ([], [])) |
| 76 | 76 |
| 77 # Link does not have a "/" at the end. | 77 # Link does not have a "/" at the end. |
| 78 html_5 = """<link rel="help" href="RELEVANT_SPEC_SECTION">""" | 78 html_5 = """<link rel="help" href="RELEVANT_SPEC_SECTION">""" |
| 79 empty_tuple_4 = extract_reference_link.get_reference_link(html_5) | 79 empty_tuple_4 = extract_reference_link.get_reference_link(html_5) |
| 80 self.assertEqual(empty_tuple_4, ([], [])) | 80 self.assertEqual(empty_tuple_4, ([], [])) |
| OLD | NEW |