From 01bfc7401ca128147347ffadc18c98878bef03b5 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Wed, 25 May 2016 15:31:52 -0400 Subject: [PATCH] Bug 1273654 - Merge the subtests from test_basic_pan into test_group_touchevents. r=botond MozReview-Commit-ID: Huc2bRaaW6p --- .../apz/test/mochitest/apz_test_utils.js | 4 +- .../apz/test/mochitest/helper_basic_pan.html | 4 +- .../apz/test/mochitest/helper_div_pan.html | 4 +- .../apz/test/mochitest/helper_iframe_pan.html | 4 +- gfx/layers/apz/test/mochitest/mochitest.ini | 4 - .../apz/test/mochitest/test_basic_pan.html | 76 ------------------- .../mochitest/test_group_touchevents.html | 31 ++++++++ 7 files changed, 39 insertions(+), 88 deletions(-) delete mode 100644 gfx/layers/apz/test/mochitest/test_basic_pan.html diff --git a/gfx/layers/apz/test/mochitest/apz_test_utils.js b/gfx/layers/apz/test/mochitest/apz_test_utils.js index dc9168bc8542..0a7e49e4a1d1 100644 --- a/gfx/layers/apz/test/mochitest/apz_test_utils.js +++ b/gfx/layers/apz/test/mochitest/apz_test_utils.js @@ -189,8 +189,8 @@ function runSubtestsSeriallyInFreshWindows(aSubtests) { w = window.open('', "_blank"); w.subtestDone = advanceSubtestExecution; w.SimpleTest = SimpleTest; - w.is = is; - w.ok = ok; + w.is = function(a, b, msg) { return is(a, b, aFile + " | " + msg); }; + w.ok = function(cond, name, diag) { return ok(cond, aFile + " | " + name, diag); }; w.location = location.href.substring(0, location.href.lastIndexOf('/') + 1) + aFile; return w; } diff --git a/gfx/layers/apz/test/mochitest/helper_basic_pan.html b/gfx/layers/apz/test/mochitest/helper_basic_pan.html index 631bfc64e18c..a5e068b28339 100644 --- a/gfx/layers/apz/test/mochitest/helper_basic_pan.html +++ b/gfx/layers/apz/test/mochitest/helper_basic_pan.html @@ -23,8 +23,8 @@ function scrollPage() { } function checkScroll() { - window.opener.is(window.scrollY, 50, "check that the window scrolled"); - window.opener.testDone(); + is(window.scrollY, 50, "check that the window scrolled"); + subtestDone(); } window.onload = function() { diff --git a/gfx/layers/apz/test/mochitest/helper_div_pan.html b/gfx/layers/apz/test/mochitest/helper_div_pan.html index 9b2e6f98ba18..1c6895c33d97 100644 --- a/gfx/layers/apz/test/mochitest/helper_div_pan.html +++ b/gfx/layers/apz/test/mochitest/helper_div_pan.html @@ -24,8 +24,8 @@ function scrollOuter() { function checkScroll() { var outerScroll = document.getElementById('outer').scrollTop; - window.opener.is(outerScroll, 50, "check that the div scrolled"); - window.opener.testDone(); + is(outerScroll, 50, "check that the div scrolled"); + subtestDone(); } window.onload = function() { diff --git a/gfx/layers/apz/test/mochitest/helper_iframe_pan.html b/gfx/layers/apz/test/mochitest/helper_iframe_pan.html index cf97d821efc4..a47f17833ee9 100644 --- a/gfx/layers/apz/test/mochitest/helper_iframe_pan.html +++ b/gfx/layers/apz/test/mochitest/helper_iframe_pan.html @@ -25,8 +25,8 @@ function scrollOuter() { function checkScroll() { var outerScroll = document.getElementById('outer').contentWindow.scrollY; - window.opener.is(outerScroll, 50, "check that the iframe scrolled"); - window.opener.testDone(); + is(outerScroll, 50, "check that the iframe scrolled"); + subtestDone(); } window.onload = function() { diff --git a/gfx/layers/apz/test/mochitest/mochitest.ini b/gfx/layers/apz/test/mochitest/mochitest.ini index a0fcec409f77..d259dff2d3d3 100644 --- a/gfx/layers/apz/test/mochitest/mochitest.ini +++ b/gfx/layers/apz/test/mochitest/mochitest.ini @@ -29,10 +29,6 @@ skip-if = (os == 'android') || (os == 'b2g') || (buildapp == 'mulet') # wheel ev skip-if = (os == 'android') || (os == 'b2g') # wheel events not supported on mobile [test_layerization.html] skip-if = (os == 'android') || (os == 'b2g') # uses wheel events which are not supported on mobile -[test_basic_pan.html] -# Windows touch injection doesn't work in automation, but this test can be run locally on a windows touch device. -# On OS X we don't support touch events at all. -skip-if = (toolkit == 'windows') || (toolkit == 'cocoa') [test_scroll_inactive_flattened_frame.html] skip-if = (os == 'android') || (os == 'b2g') || (buildapp == 'mulet') # wheel events not supported on mobile; see bug 1164274 for mulet [test_scroll_inactive_bug1190112.html] diff --git a/gfx/layers/apz/test/mochitest/test_basic_pan.html b/gfx/layers/apz/test/mochitest/test_basic_pan.html deleted file mode 100644 index d2b2e3267e67..000000000000 --- a/gfx/layers/apz/test/mochitest/test_basic_pan.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - Sanity panning test - - - - - - - diff --git a/gfx/layers/apz/test/mochitest/test_group_touchevents.html b/gfx/layers/apz/test/mochitest/test_group_touchevents.html index 80584bfeb23a..ac50b98f50f2 100644 --- a/gfx/layers/apz/test/mochitest/test_group_touchevents.html +++ b/gfx/layers/apz/test/mochitest/test_group_touchevents.html @@ -8,17 +8,48 @@