mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1296492 Part1: Refine PE mochitest helpers to ignore the checks of synthesized pointer id. r=smaug
MozReview-Commit-ID: 5blUsJMnDfg
This commit is contained in:
parent
1a2aee5585
commit
9e03cc7af8
@ -203,7 +203,7 @@ function sendTouchEvent(int_win, elemId, touchEventType, params) {
|
||||
}
|
||||
|
||||
// Helper function to run Point Event test in a new tab.
|
||||
function runTestInNewWindow(aFile) {
|
||||
function runTestInNewWindow(aFile, aSuppressPointerIdCheck = false) {
|
||||
var testURL = location.href.substring(0, location.href.lastIndexOf('/') + 1) + aFile;
|
||||
var testWindow = window.open(testURL, "_blank");
|
||||
var testDone = false;
|
||||
@ -212,6 +212,7 @@ function runTestInNewWindow(aFile) {
|
||||
// to the test case after DOM elements are constructed and before the load
|
||||
// event is fired.
|
||||
testWindow.addEventListener("DOMContentLoaded", function() {
|
||||
testWindow.suppressPointerIdCheck = aSuppressPointerIdCheck;
|
||||
var e = testWindow.document.createElement('script');
|
||||
e.type = 'text/javascript';
|
||||
e.src = "mochitest_support_internal.js";
|
||||
|
@ -69,12 +69,13 @@ function addListeners(elem) {
|
||||
}[event.pointerType];
|
||||
|
||||
// Compare the pointerId.
|
||||
if (!suppressPointerIdCheck) {
|
||||
resultCallback({
|
||||
name: "Mismatched event.pointerId recieved.",
|
||||
status: event.pointerId,
|
||||
PASS: pointerId
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user