Bug 1337940 - Part 3 - Restrict the amount of session history we keep around during test_parse_rule. r=dbaron
authorJan Henning <jh+bugzilla@buttercookie.de>
Wed, 22 Feb 2017 22:44:49 +0100
changeset 374114 3e542f18ed6278e1285cae899453679841ea5296
parent 374113 6fa30faf379173a45cda1c400a15e4849b94013a
child 374115 01bc4c9ad3b50d29b61e0bbfbba2862af8cf5b81
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1337940, 1341810
milestone54.0a1
Bug 1337940 - Part 3 - Restrict the amount of session history we keep around during test_parse_rule. r=dbaron During its run this test amasses a considerable collection of session history. Because the page title never changes, though, the Android session store previously never attempted to capture the state here. As of this bug this has changed and history change events now (correctly) trigger a session store data update on Android as well. On a debug build running on the Android emulator however, collecting the session history data can take up to 1 s when the session history count approaches the default "browser.sessionhistory.max_entries" limit of 50 entries, which increases the total running time of this test considerably and leads to timeouts (although only just). Bug 1341810 will track possibly improving the session store performance on Android by not doing a full history collect when not needed, but for the time being, restricting the amount of session history we keep around during this test is the simpler solution. MozReview-Commit-ID: JRREidiWnM3
layout/style/test/test_parse_rule.html
--- a/layout/style/test/test_parse_rule.html
+++ b/layout/style/test/test_parse_rule.html
@@ -244,13 +244,17 @@ var doTests = function() {
     isnot(base, canonical, "Sanity check for rule: " + testset[curTest].base);
   }
   frame.contentDocument.open();
   frame.contentDocument.write("<html lang=en><style>" + testset[curTest].tests[curSubTest] + "</style><div id=a class='a b c' title='zxcv weeqweqeweasd&#13;&#10;a'></div>");
   frame.contentWindow.onload = function(){setTimeout(doTests, 0);};
   frame.contentDocument.close();
 };
 
-doTests();
+// Running a debug build on the Android emulator is slooow and collecting
+// all the session history this test amasses through repeated navigations
+// adds considerably to the running time. Therefore, we restrict the
+// amount of session history we keep around during this test.
+SpecialPowers.pushPrefEnv({"set": [['browser.sessionhistory.max_entries', 4]]}, doTests);
 
 };
 
 </script>