Skip to content

Commit

Permalink
Fix web platform test results are not correctly checked (#3055)
Browse files Browse the repository at this point in the history
Found Web platform tests result are not correctly being added to the
test_results. After fixed this issue, there are actually three more
tests failed in all Linux builds. Disable those tests first.

b/336799788
  • Loading branch information
sherryzy committed Apr 24, 2024
2 parents 27c6edd + 1e82190 commit ca8456e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cobalt/build/cobalt_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ def GetWebPlatformTestFilters(self):
'websockets/WebPlatformTest.Run/websockets_opening_handshake_003_html',
'websockets/WebPlatformTest.Run/websockets_opening_handshake_005_html',
'service_workers/WebPlatformTest.Run/service_workers_service_worker_register_wait_forever_in_install_worker_https_html',
'csp/WebPlatformTest.Run/content_security_policy_script_src_script_src_1_10_1_html',
'cors/WebPlatformTest.Run/cors_credentials_flag_htm',
'html/WebPlatformTest.Run/html_dom_documents_dom_tree_accessors_Document_currentScript_sub_html',
]
return filters

Expand Down
3 changes: 2 additions & 1 deletion cobalt/layout_tests/web_platform_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ HarnessResult ParseResults(const std::string& json_results) {

for (size_t i = 0; i < test_list->size(); ++i) {
TestResult result;
const base::Value::Dict* test_dict = (*test_list)[0].GetIfDict();
const base::Value::Dict* test_dict = (*test_list)[i].GetIfDict();
EXPECT_TRUE(!!test_dict);

auto result_status = test_dict->FindInt("status");
Expand All @@ -318,6 +318,7 @@ HarnessResult ParseResults(const std::string& json_results) {
if (result_stack) {
result.stack = *result_stack;
}
test_results.push_back(result);
}
return harness_result;
}
Expand Down

0 comments on commit ca8456e

Please sign in to comment.