Example #1
0
 def test_parse_baseline_all_pass(self):
     """A WPT test with an all-pass baseline doesn't get metadata."""
     # Here we use a test_name that is actually in the test manifest
     test_name = "external/wpt/dir/zzzz.html"
     # Manually initialize the baseline file and its contents
     baseline_filename = self.port.expected_filename(test_name, '.txt')
     self.host.filesystem.write_text_file(
         baseline_filename,
         "This is a test\nPASS some subtest\nPASS another subtest\n")
     expectations = TestExpectations(self.port)
     metadata_builder = WPTMetadataBuilder(expectations, self.port)
     test_and_status_list = metadata_builder.get_tests_with_baselines()
     self.assertFalse(test_and_status_list)
Example #2
0
 def test_parse_baseline_harness_error(self):
     """Test parsing a baseline with a harness error."""
     # Here we use a test_name that is actually in the test manifest
     test_name = "external/wpt/dir/zzzz.html"
     # Manually initialize the baseline file and its contents
     baseline_filename = self.port.expected_filename(test_name, '.txt')
     self.host.filesystem.write_text_file(
         baseline_filename, "This is a test\nHarness Error. some stuff\n")
     expectations = TestExpectations(self.port)
     metadata_builder = WPTMetadataBuilder(expectations, self.port)
     test_and_status_list = metadata_builder.get_tests_with_baselines()
     self.assertEqual(1, len(test_and_status_list))
     test_entry = test_and_status_list[0]
     self.assertEqual(test_name, test_entry[0])
     self.assertEqual(HARNESS_ERROR, test_entry[1])
Example #3
0
 def test_parse_baseline_subtest_timeout(self):
     """Test parsing a baseline with a timeout subtest."""
     # Here we use a test_name that is actually in the test manifest
     test_name = "external/wpt/dir/zzzz.html"
     # Manually initialize the baseline file and its contents
     baseline_filename = self.port.expected_filename(test_name, '.txt')
     self.host.filesystem.write_text_file(
         baseline_filename,
         "This is a test\nTIMEOUT some subtest\nPASS another subtest\n")
     expectations = TestExpectations(self.port)
     metadata_builder = WPTMetadataBuilder(expectations, self.port)
     test_and_status_list = metadata_builder.get_tests_with_baselines()
     self.assertEqual(1, len(test_and_status_list))
     test_entry = test_and_status_list[0]
     self.assertEqual(test_name, test_entry[0])
     self.assertEqual(SUBTEST_FAIL, test_entry[1])