Skip to content

Update the webdriver IDL file - #9851

Merged
andreastt merged 7 commits into
web-platform-tests:masterfrom
lukebjerring:idl-file-updates-webdriver
Jun 9, 2018
Merged

andreastt merged 7 commits into
web-platform-tests:masterfrom
lukebjerring:idl-file-updates-webdriver

Conversation

@lukebjerring

@lukebjerring lukebjerring commented Mar 5, 2018 •

Copy link
Copy Markdown
Contributor

No description provided.

@wpt-pr-bot
wpt-pr-bot requested review from jensl and yuki3 March 5, 2018 19:11
@ghost

ghost commented Mar 5, 2018 •

Copy link
Copy Markdown

Build BROKEN

Started: 2018-03-08 08:55:28
Finished: 2018-03-08 09:03:05

Failing Jobs

  • lint
  • build_css
  • chrome:dev
  • safari:11.0
  • MicrosoftEdge:16.16299

View more information about this build on:

@lukebjerring
lukebjerring force-pushed the idl-file-updates-webdriver branch from a4907db to 4117ea3 Compare March 7, 2018 20:33
@foolip

foolip commented Mar 21, 2018

Copy link
Copy Markdown
Member

@foolip foolip left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDL LGTM, but needs to be used in a test.

// extent, this test is a bit special. It should also be possible to
// run the test manually, when WebDriver is not active, and so either
// true/false outcome is OK.
if (navigator.webdriver) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this test is basically "if true, assert true, else assert false" which will only fail when navigator.webdriver is undefined - which is a test that is already covered by the idlarray.add_objects({Navigator: ["navigator"]}) added below.
Hence, since it's confusing, I deleted it.

cc @kereliuk

<script>
"use strict";

test(() => assert_idl_attribute(navigator, "webdriver"), "navigator.webdriver is present");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert_idl_attribute is already covered by idlarray.test() below - hence, redundant, and deleted.

@lukebjerring

Copy link
Copy Markdown
Contributor Author

Now used in a test, PTAL.

@andreastt andreastt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to streamline things a bit, and appears to be how other IDLs are tested.

However, I’d like to get the test running before I proceed with a more detailed review. See more comments inline.

Comment thread webdriver/tests/interface.html Outdated
<!doctype html>
<meta charset=utf-8>

<link rel="help" href="https://w3c.github.io/webdriver/webdriver-spec.html">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idls.test();
"use strict";

promise_test(async () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get this when running the test locally:

JavaScript error: file:///home/ato/src/wpt/webdriver/tests/interface.html, line 12: ReferenceError: promise_test is not defined

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’s not what I want to test. I explicitly want the test to pass when loading it manually with WebDriver disabled.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I meant wpt serve. testharness.js tests can't be loaded over file:// is the important point.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I can confirm it passes as expected both with and without Marionette enabled in Firefox.

@andreastt
andreastt merged commit 418538e into web-platform-tests:master Jun 9, 2018
@andreastt

Copy link
Copy Markdown
Member

Please note that a better commit message would be appreciated next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants