Fix some lint warnings. Enable caret tests

This commit is contained in:
Artur Shaikhullin 2017-11-30 20:38:38 +06:00
parent c7a5dd6abb
commit 4eda328a61
5 changed files with 34 additions and 38 deletions

View File

@ -392,7 +392,7 @@ class AbstractCaret(QObject):
def has_selection(self): def has_selection(self):
raise NotImplementedError raise NotImplementedError
def selection(self, html=False, selection=None): def selection(self, html=False, callback=None):
raise NotImplementedError raise NotImplementedError
def follow_selected(self, *, tab=False): def follow_selected(self, *, tab=False):

View File

@ -877,7 +877,8 @@ class CommandDispatcher:
utils.set_clipboard(s, selection=self.yank_object['sel']) utils.set_clipboard(s, selection=self.yank_object['sel'])
if self.yank_object['what'] != 'selection': if self.yank_object['what'] != 'selection':
message.info("Yanked {} to {}: {}".format(self.yank_object['what'], target, s)) message.info("Yanked {} to {}: {}".format(
self.yank_object['what'], target, s))
else: else:
message.info("{} {} yanked to {}".format( message.info("{} {} yanked to {}".format(
len(s), "char" if len(s) == 1 else "chars", target)) len(s), "char" if len(s) == 1 else "chars", target))

View File

@ -328,6 +328,7 @@ class WebEngineCaret(browsertab.AbstractCaret):
self._tab.run_js_async(js_code, lambda jsret: self._tab.run_js_async(js_code, lambda jsret:
self._follow_selected_cb(jsret, tab)) self._follow_selected_cb(jsret, tab))
class WebEngineScroller(browsertab.AbstractScroller): class WebEngineScroller(browsertab.AbstractScroller):
"""QtWebEngine implementations related to scrolling.""" """QtWebEngine implementations related to scrolling."""

View File

@ -1,8 +1,7 @@
"use strict"; "use strict";
window._qutebrowser.caret = (function() { window._qutebrowser.caret = (function() {
const axs = {};
var axs = {};
axs.dom = {}; axs.dom = {};

View File

@ -23,9 +23,4 @@ import pytest_bdd as bdd
# pylint: disable=unused-import # pylint: disable=unused-import
from end2end.features.test_yankpaste_bdd import init_fake_clipboard from end2end.features.test_yankpaste_bdd import init_fake_clipboard
pytestmark = pytest.mark.qtwebengine_todo("Caret mode is not implemented",
run=False)
bdd.scenarios('caret.feature') bdd.scenarios('caret.feature')