Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAvoid panics when using HTMLAnchorElement attribute setters #10903
Conversation
highfive
commented
Apr 28, 2016
|
Heads up! This PR modifies the following files:
|
| @@ -0,0 +1,3 @@ | |||
| [htmlanchorelment-search-attribute.html] | |||
| type: testharness | |||
| expected: OK | |||
This comment has been minimized.
This comment has been minimized.
KiChjang
Apr 28, 2016
Member
Yes, remove this. By default, tests are expected to PASS (or OK), so if there's no .ini file, the test framework will expect the test file to pass.
|
Speaking of which, why isn't this a WPT test? |
| <title>HTMLAnchorElement search setter crashes</title> | ||
| <script src="/resources/testharness.js"></script> | ||
| <script src="/resources/testharnessreport.js"></script> | ||
| <a>anchor</a> |
This comment has been minimized.
This comment has been minimized.
Ms2ger
Apr 29, 2016
Contributor
Please put this in the directory of upstream tests, add assert_*s that the setter works correctly, and also test all the other setters you changed.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
broesamle
Apr 29, 2016
Author
Contributor
to rephrase my question (making me hesitate to just move the test):
Is there a specific location where to put it, before it formally enters the WPT repo?
what you called:
the directory of upstream tests
This comment has been minimized.
This comment has been minimized.
Ms2ger
Apr 29, 2016
Contributor
tests/wpt/web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/ is perfect.
|
well, I tried to merge the the upstream(servo/servo) master into a local branch of my fork. The conflict in MANIFEST.json looks a bit awkward to resolve manually :-/ |
|
It would, but I recommend |
0aabe09
to
222278a
|
|
222278a
to
daf4fe2
|
done the rebase...at least the conflict is gone :-) |
|
Manually merged MANIFEST.json |
|
so, what is the best practice of resolving merge conflicts from MANIFEST.json? |
|
Huh, it should be enough to undo any changes to MANIFEST.json and run |
|
let's see ... this time I used the automatic update again. |
|
you were right, @jdm, I should not have merged MANIFEST.json by hand. |
|
Looking good! I think we can make the new test easier to read and modify, however. Reviewed 1 of 2 files at r2, 1 of 3 files at r4, 2 of 4 files at r5, 1 of 1 files at r6. tests/wpt/web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_attribute-getter-setter.html, line 11 [r6] (raw file): function test_setter(property, old, new) {
/* initialize a to known url */
assert_equals(a[property], old);
a[property] = new;
assert_equals(a[property], new);
}
var tests = [["hash", "#somehash", "#someother"], ...];
for (var i = 0; i < tests.length; i++) {
test(function() {
test_setter(tests[i][0], tests[i][1], tests[i][2]);
}, "Getter and setter for attribute of anchor element: " + tests[i][0])
}Comments from Reviewable |
|
agreed. I rewrote the test according to your suggestion -- with the slight 'complexication' that I have an additional check for the old and new url. Which already produced an unexpected (to me) fail in the search setter
Is it valid, if the setter adds the / after the hostname, here? otherwise all tests pass nicely. |
7ef4768
to
751733a
highfive
commented
May 11, 2016
|
New code was committed to pull request. |
|
did it. (forget my former concern) ... its late here in berlin. |
|
@bors-servo: r+ |
|
|
|
Thank you for your patience! I learned a lot about servo on the way :-) |
…panic, r=jdm Avoid panics when using HTMLAnchorElement attribute setters `expected: OK` still explicitly mentioned in .ini file. Shall I remove it? Fixes #10877. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10903) <!-- Reviewable:end -->
|
|
|
@bors-servo retry
|
…panic, r=jdm Avoid panics when using HTMLAnchorElement attribute setters `expected: OK` still explicitly mentioned in .ini file. Shall I remove it? Fixes #10877. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10903) <!-- Reviewable:end -->
|
|
broesamle commentedApr 28, 2016
•
edited by KiChjang
expected: OKstill explicitly mentioned in .ini file. Shall I remove it?Fixes #10877.
This change is