Commit 1b1820da authored by Roger McFarlane's avatar Roger McFarlane Committed by Commit Bot

[autofill] Add missing form_structure_browsertest cases to iOS

Tests 148 through 151 were not included in the test case bundle (copy
step for dependendent data) in the iOS build, so these tests were not
being run on that platform.

This CL adds the input and output files to the unit_tests_bundle_data.

Bug: 865864,857488
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ib501fe2644c7961f2d6bcee80f7388a7daef8623
Reviewed-on: https://chromium-review.googlesource.com/1146769Reviewed-by: default avatarMoe Ahmadi <mahmadi@chromium.org>
Commit-Queue: Roger McFarlane <rogerm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577214}
parent 9c9b30bf
...@@ -297,6 +297,10 @@ bundle_data("unit_tests_bundle_data") { ...@@ -297,6 +297,10 @@ bundle_data("unit_tests_bundle_data") {
"//components/test/data/autofill/heuristics/input/145_hal-india.com.html", "//components/test/data/autofill/heuristics/input/145_hal-india.com.html",
"//components/test/data/autofill/heuristics/input/146_checkout_store.scholastic.com.html", "//components/test/data/autofill/heuristics/input/146_checkout_store.scholastic.com.html",
"//components/test/data/autofill/heuristics/input/147_panera.custhelp.com_app_ask.html", "//components/test/data/autofill/heuristics/input/147_panera.custhelp.com_app_ask.html",
"//components/test/data/autofill/heuristics/input/148_payment_dickblick.com.html",
"//components/test/data/autofill/heuristics/input/149_checkout_qvc.com_non_hidden.html",
"//components/test/data/autofill/heuristics/input/150_checkout_venus.com_search_field.html",
"//components/test/data/autofill/heuristics/input/151_ticketmaster.com.html",
"//components/test/data/autofill/heuristics/output/000_i18n_de.out", "//components/test/data/autofill/heuristics/output/000_i18n_de.out",
"//components/test/data/autofill/heuristics/output/001_i18n_de2.out", "//components/test/data/autofill/heuristics/output/001_i18n_de2.out",
"//components/test/data/autofill/heuristics/output/002_i18n_en.out", "//components/test/data/autofill/heuristics/output/002_i18n_en.out",
...@@ -445,6 +449,10 @@ bundle_data("unit_tests_bundle_data") { ...@@ -445,6 +449,10 @@ bundle_data("unit_tests_bundle_data") {
"//components/test/data/autofill/heuristics/output/145_hal-india.com.out", "//components/test/data/autofill/heuristics/output/145_hal-india.com.out",
"//components/test/data/autofill/heuristics/output/146_checkout_store.scholastic.com.out", "//components/test/data/autofill/heuristics/output/146_checkout_store.scholastic.com.out",
"//components/test/data/autofill/heuristics/output/147_panera.custhelp.com_app_ask.out", "//components/test/data/autofill/heuristics/output/147_panera.custhelp.com_app_ask.out",
"//components/test/data/autofill/heuristics/output/148_payment_dickblick.com.out",
"//components/test/data/autofill/heuristics/output/149_checkout_qvc.com_non_hidden.out",
"//components/test/data/autofill/heuristics/output/150_checkout_venus.com_search_field.out",
"//components/test/data/autofill/heuristics/output/151_ticketmaster.com.out",
] ]
outputs = [ outputs = [
"{{bundle_resources_dir}}/" + "{{bundle_resources_dir}}/" +
......
...@@ -84,12 +84,6 @@ const std::vector<base::FilePath> GetTestFiles() { ...@@ -84,12 +84,6 @@ const std::vector<base::FilePath> GetTestFiles() {
return files; return files;
} }
const std::set<std::string>& GetFailingTestNames() {
static std::set<std::string>* failing_test_names =
new std::set<std::string>{};
return *failing_test_names;
}
} // namespace } // namespace
// Test fixture for verifying Autofill heuristics. Each input is an HTML // Test fixture for verifying Autofill heuristics. Each input is an HTML
...@@ -209,8 +203,23 @@ std::string FormStructureBrowserTest::FormStructuresToString( ...@@ -209,8 +203,23 @@ std::string FormStructureBrowserTest::FormStructuresToString(
return forms_string; return forms_string;
} }
// Crashes on iPhone 6 Plus. https://crbug.com/857488 namespace {
TEST_P(FormStructureBrowserTest, DISABLED_DataDrivenHeuristics) {
// To disable a data driven test, please add the name of the test file
// (i.e., "NNN_some_site.html") as a literal to the initializer_list given
// to the failing_test_names constructor.
const std::set<std::string>& GetFailingTestNames() {
static std::set<std::string>* failing_test_names =
new std::set<std::string>{};
return *failing_test_names;
}
} // namespace
// If disabling a test, prefer to add the name names of the specific test cases
// to GetFailingTestNames(), directly above, instead of renaming the test to
// DISABLED_DataDrivenHeuristics.
TEST_P(FormStructureBrowserTest, DataDrivenHeuristics) {
bool is_expected_to_pass = bool is_expected_to_pass =
!base::ContainsKey(GetFailingTestNames(), GetParam().BaseName().value()); !base::ContainsKey(GetFailingTestNames(), GetParam().BaseName().value());
RunOneDataDrivenTest(GetParam(), GetIOSOutputDirectory(), RunOneDataDrivenTest(GetParam(), GetIOSOutputDirectory(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment