Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Add patch for Chrome run time issue #17490

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions chromium/pages/options/ux.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
pipboy96 marked this conversation as resolved.
Show resolved Hide resolved
showCounter.checked = item.showCounter;
autoUpdateRulesets.checked = item.autoUpdateRulesets;
enableMixedRulesets.checked = item.enableMixedRulesets;
Expand Down
5 changes: 2 additions & 3 deletions test/selenium/test_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down