mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1223937
- test_bug388794.html fails string match test due to off by one error in Fennec with C++APZ. r=roc
When C++APZ is enabled in Fennec, events that are generated by nsWindowUtil may result in off by one errors when received by the DOM. This is caused by the fact that the PresShell resolution must be applied to the event coordinates before being dispatched which introduces rounding errors. To work around the failure in test_bug388794.html it is necessary to convert the string compares to regex so that the off by one rounding errors may be accounted for. --HG-- extra : commitid : FCSDte8j1sG
This commit is contained in:
parent
4ea95b701d
commit
53f3fdea84
@ -50,14 +50,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=388794
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var pendingLoads = 0;
|
||||
|
||||
/* Use regex due to rounding error in Fennec with C++APZ enabled */
|
||||
var hrefs = {
|
||||
test1: "data:text/html,?testImage.x=0&testImage.y=0",
|
||||
test2: "data:text/html,?x=0&y=0",
|
||||
test3: "data:text/html,?testImage.x=0&testImage.y=0",
|
||||
test4: "data:text/html,?x=0&y=0",
|
||||
test5: "data:text/html,?testImage.x=5&testImage.y=5",
|
||||
test6: "data:text/html,?x=5&y=5",
|
||||
test1: /data:text\/html,\?testImage\.x=0&testImage\.y=0/,
|
||||
test2: /data:text\/html,\?x=0&y=0/,
|
||||
test3: /data:text\/html,\?testImage\.x=0&testImage\.y=0/,
|
||||
test4: /data:text\/html,\?x=0&y=0/,
|
||||
test5: /data:text\/html,\?testImage\.x=[4-6]&testImage\.y=[4-6]/,
|
||||
test6: /data:text\/html,\?x=[4-6]&y=[4-6]/,
|
||||
};
|
||||
|
||||
function submitForm(idNum) {
|
||||
@ -91,8 +91,8 @@ addLoadEvent(function() {
|
||||
});
|
||||
|
||||
function frameLoaded(frame) {
|
||||
is(frame.contentWindow.location.href, hrefs[frame.name],
|
||||
"Unexpected href for frame " + frame.name);
|
||||
ok(hrefs[frame.name].test(frame.contentWindow.location.href),
|
||||
"Unexpected href for frame " + frame.name, "expected to match: " + hrefs[frame.name].toString() + " got: " + frame.contentWindow.location.href);
|
||||
if (--pendingLoads == 0) {
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user