Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webdriver servo async JS script breaks some wdspec tests #27031

Open
jdm opened this issue Jun 22, 2020 · 0 comments · May be fixed by #27041
Open

Webdriver servo async JS script breaks some wdspec tests #27031

jdm opened this issue Jun 22, 2020 · 0 comments · May be fixed by #27041

Comments

@jdm
Copy link
Member

jdm commented Jun 22, 2020

In particular, tests/wpt/web-platform-tests/webdriver/tests/add_cookie/user_prompts.py uses:

        session.execute_async_script("""
            let dialog_type = arguments[0];
            let text = arguments[1];

            setTimeout(function() {
              if (dialog_type == 'prompt') {
                window.dialog_return_value = window[dialog_type](text, '');
              } else {
                window.dialog_return_value = window[dialog_type](text);
              }
            }, 0);
            """, args=(dialog_type, text))

which ends up yielding this error:

 0:06.21 pid:15764 [2020-06-22T14:23:42Z ERROR script::dom::bindings::error] Error at :10:65 window[dialog_type] is not a function

because dialog_type is a reference to the webdriverCallback method on Window instead of the a string like 'alert' or 'prompt'.

@jdm jdm linked a pull request Jun 22, 2020 that will close this issue
4 tasks
bors-servo added a commit that referenced this issue Jun 22, 2020
Report exceptions for async script executions to webdriver

Improving the accuracy of the async script execution for our webdriver implementation allows us to run many more webdriver tests without timeouts, which should help with web-platform-tests/wpt#24257.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #27036 and #27035 and #27031.
- [x] There are tests for these changes
bors-servo added a commit that referenced this issue Jun 23, 2020
Report exceptions for async script executions to webdriver

Improving the accuracy of the async script execution for our webdriver implementation allows us to run many more webdriver tests without timeouts, which should help with web-platform-tests/wpt#24257.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #27036 and #27035 and #27031.
- [x] There are tests for these changes
bors-servo added a commit that referenced this issue Jun 23, 2020
Report exceptions for async script executions to webdriver

Improving the accuracy of the async script execution for our webdriver implementation allows us to run many more webdriver tests without timeouts, which should help with web-platform-tests/wpt#24257.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #27036 and #27035 and #27031.
- [x] There are tests for these changes
bors-servo added a commit that referenced this issue Jun 23, 2020
Report exceptions for async script executions to webdriver

Improving the accuracy of the async script execution for our webdriver implementation allows us to run many more webdriver tests without timeouts, which should help with web-platform-tests/wpt#24257.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #27036 and #27035 and #27031.
- [x] There are tests for these changes
@atouchet atouchet added this to In progress in web-platform-test failures Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

1 participant