Bug 1332527 - [Pointer Event] Remove redundent codes in PointerEvent test cases. r=masayuki
MozReview-Commit-ID: EiV7PvyFBTU
--- a/dom/events/test/pointerevents/bug1293174_implicit_pointer_capture_for_touch_1.html
+++ b/dom/events/test/pointerevents/bug1293174_implicit_pointer_capture_for_touch_1.html
@@ -3,17 +3,16 @@
<head>
<title>Pointer Events properties tests</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script>
<!--script src="/resources/testharnessreport.js"></script-->
<!-- Additional helper script for common checks across event types -->
<script type="text/javascript" src="pointerevent_support.js"></script>
- <script type="text/javascript" src="mochitest_support_internal.js"></script>
<script>
var detected_pointertypes = {};
var test_pointerEvent = async_test("implicit pointer capture for touch");
// showPointerTypes is defined in pointerevent_support.js
// Requirements: the callback function will reference the test_pointerEvent object and
// will fail unless the async_test is created with the var name "test_pointerEvent".
add_completion_callback(showPointerTypes);
--- a/dom/events/test/pointerevents/bug1293174_implicit_pointer_capture_for_touch_2.html
+++ b/dom/events/test/pointerevents/bug1293174_implicit_pointer_capture_for_touch_2.html
@@ -3,17 +3,16 @@
<head>
<title>Pointer Events properties tests</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script>
<!--script src="/resources/testharnessreport.js"></script-->
<!-- Additional helper script for common checks across event types -->
<script type="text/javascript" src="pointerevent_support.js"></script>
- <script type="text/javascript" src="mochitest_support_internal.js"></script>
<script>
var detected_pointertypes = {};
var test_pointerEvent = async_test("implicit pointer capture for touch");
// showPointerTypes is defined in pointerevent_support.js
// Requirements: the callback function will reference the test_pointerEvent object and
// will fail unless the async_test is created with the var name "test_pointerEvent".
add_completion_callback(showPointerTypes);
--- a/dom/events/test/pointerevents/mochitest_support_external.js
+++ b/dom/events/test/pointerevents/mochitest_support_external.js
@@ -196,17 +196,16 @@ function runTestInNewWindow(aFile) {
var testURL = location.href.substring(0, location.href.lastIndexOf('/') + 1) + aFile;
var testWindow = window.open(testURL, "_blank");
var testDone = false;
// We start testing when receiving load event. Inject the mochitest helper js
// to the test case after DOM elements are constructed and before the load
// event is fired.
testWindow.addEventListener("DOMContentLoaded", function() {
- const PARENT_ORIGIN = "http://mochi.test:8888/";
var e = testWindow.document.createElement('script');
e.type = 'text/javascript';
e.src = "mochitest_support_internal.js";
testWindow.document.getElementsByTagName('head')[0].appendChild(e);
}, {once: true});
window.addEventListener("message", function(aEvent) {
switch(aEvent.data.type) {