diff --git a/chromium/pages/options/ux.js b/chromium/pages/options/ux.js index 9ffb4cc3c533..0ad138cab314 100644 --- a/chromium/pages/options/ux.js +++ b/chromium/pages/options/ux.js @@ -20,6 +20,10 @@ document.addEventListener("DOMContentLoaded", () => { }; sendMessage("get_option", defaultOptions, item => { + // Sometimes item does not define on runtime in Chrome + if(!item) { + item = defaultOptions; + } showCounter.checked = item.showCounter; autoUpdateRulesets.checked = item.autoUpdateRulesets; enableMixedRulesets.checked = item.enableMixedRulesets; diff --git a/test/selenium/test_options.py b/test/selenium/test_options.py index 21bd454082be..d96f48a355f2 100644 --- a/test/selenium/test_options.py +++ b/test/selenium/test_options.py @@ -11,8 +11,8 @@ def test_options(self): self.assertEqual(self.driver.current_url, self.shim.options_url) def test_show_counter(self): - if self.shim.browser_type == 'chrome': - raise unittest.SkipTest('broken on chrome') + # if self.shim.browser_type == 'chrome': + # raise unittest.SkipTest('broken on chrome') selector = '#showCounter' self.load_options() sleep(3) @@ -22,7 +22,6 @@ def test_show_counter(self): el.click() self.driver.refresh() - sleep(3) el = self.query_selector(selector) self.assertFalse(el.is_selected()) el.click()