From 913bef25a499d45b679c239b339be137c2452fef Mon Sep 17 00:00:00 2001 From: Marek Lewandowski Date: Fri, 8 Jun 2018 15:22:45 +0200 Subject: [PATCH] Refactoring: post review corrections. --- plugins/autocomplete/plugin.js | 6 +-- .../plugins/textwatcher/manual/throttle.html | 46 ++++++++++++++----- tests/plugins/textwatcher/manual/throttle.md | 5 +- 3 files changed, 39 insertions(+), 18 deletions(-) diff --git a/plugins/autocomplete/plugin.js b/plugins/autocomplete/plugin.js index 7cd31608c6d..43f94288afd 100644 --- a/plugins/autocomplete/plugin.js +++ b/plugins/autocomplete/plugin.js @@ -92,9 +92,9 @@ * * // Finally, instantiate the autocomplete class. * new CKEDITOR.plugins.autocomplete( editor, { - * textTestCallback: textTestCallback, - * dataCallback: dataCallback - * } ); + * textTestCallback: textTestCallback, + * dataCallback: dataCallback + * } ); * ``` * * # Changing the behavior of the autocomplete class by subclassing it diff --git a/tests/plugins/textwatcher/manual/throttle.html b/tests/plugins/textwatcher/manual/throttle.html index 09550399013..be33235049e 100644 --- a/tests/plugins/textwatcher/manual/throttle.html +++ b/tests/plugins/textwatcher/manual/throttle.html @@ -3,35 +3,57 @@ height: 200px; overflow-y: auto; } + +#performance-msg { + position: absolute; + top: 20px; + border: 2px solid orange; + color: orange; + background: #111; + padding: 0.3em; + right: 150px; + display: none; +} +
+ Your browser does not have + performance.now() + function. So you have to feel out the timings :( +
Logger:
diff --git a/tests/plugins/textwatcher/manual/throttle.md b/tests/plugins/textwatcher/manual/throttle.md index 1500c002eee..c8f6a223a11 100644 --- a/tests/plugins/textwatcher/manual/throttle.md +++ b/tests/plugins/textwatcher/manual/throttle.md @@ -4,16 +4,15 @@ 1. Focus the editor. 1. Start typing `a` constantly. -1. Check log above the editor. +1. Check log above the editor. ## Expected Typed text should be logged: + 1. Immediately after first typed character. 1. Not more often than once every 2000ms. ## Unexpected Typed text is logged immediately or in invalid interval times. - -***Other details*** Measured time by logger can have slight error +/- 100ms.