Skip to content

Commit 22ef225

Browse files
committed
test: update ada_extra_setters_tests too
1 parent 62abc7a commit 22ef225

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/wpt/ada_extra_setters_tests.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,16 @@
8787
"pathname": "/Users/yagiz/Developer/node/test/fixtures/loop.%25.js"
8888
}
8989
}
90+
],
91+
"search": [
92+
{
93+
"comment": "Remove non-existent param removes ? from URL",
94+
"href": "data:space ?test",
95+
"new_value": "",
96+
"expected": {
97+
"search": "",
98+
"pathname": "space"
99+
}
100+
}
90101
]
91102
}

tests/wpt_tests.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ bool setters_tests_encoding(const char *source) {
207207
std::string_view expected = element["expected"]["search"];
208208
base->set_search(new_value);
209209
TEST_ASSERT(base->get_search(), expected, "Search " + element_string + base->to_string());
210+
211+
std::string_view expected_pathname;
212+
if (!element["expected"]["pathname"].get(expected_pathname)) {
213+
TEST_ASSERT(base->get_pathname(), expected_pathname, "Pathname " + element_string);
214+
}
210215
}
211216
else if (category == "hash") {
212217
std::string_view expected = element["expected"]["hash"];

0 commit comments

Comments
 (0)