Bug 1337940 - Part 3 - Restrict the amount of session history we keep around during test_parse_rule. r?dbaron draft
authorJan Henning <jh+bugzilla@buttercookie.de>
Wed, 22 Feb 2017 22:44:49 +0100
changeset 490164 8fc2a3a2b19ae0dacd368b2cedb09b11b3682e6c
parent 490163 1a4acfb318f45ced29307701f464ea2897bd62cd
child 547190 276d557635ab42366c5c072fea2c7d3aa1c9fabe
push id47021
push usermozilla@buttercookie.de
push dateMon, 27 Feb 2017 19:33:04 +0000
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>