| Index: third_party/WebKit/LayoutTests/editing/spelling/resources/util.js
|
| diff --git a/third_party/WebKit/LayoutTests/editing/spelling/resources/util.js b/third_party/WebKit/LayoutTests/editing/spelling/resources/util.js
|
| index 5f2522041a6e988395220b6a8aa3b0883cb449b2..a0ec1ea6a856785f1f9c439f68de0c40c1243f7b 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/spelling/resources/util.js
|
| +++ b/third_party/WebKit/LayoutTests/editing/spelling/resources/util.js
|
| @@ -66,3 +66,31 @@ function typeText(elem, text)
|
| typeCharacterCommand(text[i]);
|
| }
|
| }
|
| +
|
| +function runNextStep(test, steps, assertions) {
|
| + if (!steps.length) {
|
| + test.done();
|
| + return;
|
| + }
|
| +
|
| + var step = steps.shift();
|
| + var assertion = assertions.shift();
|
| +
|
| + step();
|
| + step_timeout(() => {
|
| + test.step(() => assertion());
|
| + runNextStep(test, steps, assertions);
|
| + }, 50);
|
| +}
|
| +
|
| +function runSpellingTest(steps, assertions, opt_title)
|
| +{
|
| + var t = async_test(opt_title);
|
| + if (!window.internals) {
|
| + t.step(() => assert_unreached('internals is required for this test'));
|
| + t.done();
|
| + return;
|
| + }
|
| +
|
| + runNextStep(t, steps, assertions);
|
| +}
|
|
|