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

Move tinyfiledialog call from script to embedder #25869

Merged
merged 5 commits into from Feb 29, 2020

Conversation

@iulianR
Copy link
Contributor

iulianR commented Feb 28, 2020

PR is based on work started in #23651. I rebased on top of master and addressed review comments. Handling the PromptPermission message in libsimpleservo is probably not ideal. Looking forward to make more changes, just let me know how I should proceed.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #23057 (GitHub issue number if applicable)
  • There are tests for these changes OR
  • These changes do not require tests because ___
@highfive
Copy link

highfive commented Feb 28, 2020

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @nox (or someone else) soon.

@highfive
Copy link

highfive commented Feb 28, 2020

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/permissions.rs, components/script/dom/globalscope.rs, components/script/Cargo.toml, components/script/dom/window.rs
  • @KiChjang: components/script/dom/permissions.rs, components/script/dom/globalscope.rs, components/script/Cargo.toml, components/script/dom/window.rs
@highfive
Copy link

highfive commented Feb 28, 2020

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@iulianR iulianR changed the title Issue 23057 tinifiledialogs Move tinyfiledialog call from script to embedder Feb 28, 2020
@jdm
Copy link
Member

jdm commented Feb 29, 2020

While we could certainly add a member to HostTrait like fn permission_prompt(prompt: PermissionPrompt) -> PermissionRequest, and then add implementations in:

I don't actually see a reason to do that work until we have a need to have a different per-embedding behaviour for the permission prompt. I'm happy with the current implementation for now!

@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Feb 29, 2020

📌 Commit ffba9d0 has been approved by jdm

@highfive highfive assigned jdm and unassigned nox Feb 29, 2020
@bors-servo
Copy link
Contributor

bors-servo commented Feb 29, 2020

Testing commit ffba9d0 with merge f03f351...

bors-servo added a commit that referenced this pull request Feb 29, 2020
Move tinyfiledialog call from script to embedder

<!-- Please describe your changes on the following line: -->

PR is based on work started in #23651. I rebased on top of master and addressed review comments. Handling the `PromptPermission` message in `libsimpleservo` is probably not ideal. Looking forward to make more changes, just let me know how I should proceed.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23057 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 29, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Feb 29, 2020

These changes now cause us to run more of the permissions API tests to completion!

  ▶ OK [expected CRASH] /permissions/idlharness.any.worker.html
  ▶ Unexpected subtest result in /permissions/idlharness.any.worker.html:
  │ FAIL [expected PASS] Permissions interface: calling query(object) on navigator.permissions with too few arguments must throw TypeError
  │   → assert_unreached: Throws "TypeError: Not enough arguments to "Permissions.query"." instead of rejecting promise Reached unreachable code
  │ 
  │ throwOrReject/<@http://web-platform.test:8000/resources/idlharness.js:116:17
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926:25
  │ throwOrReject@http://web-platform.test:8000/resources/idlharness.js:115:20
  │ IdlInterface.prototype.test_interface_of/<@http://web-platform.test:8000/resources/idlharness.js:2958:21
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926:25
  │ IdlInterface.prototype.test_interface_of@http://web-platform.test:8000/resources/idlharness.js:2933:20
  │ IdlInterface.prototype.test_object@http://web-platform.test:8000/resources/idlharness.js:2767:27
  │ IdlArray.prototype.test/<@http://web-platform.test:8000/resources/idlharness.js:917:36
  │ IdlArray.prototype.test@http://web-platform.test:8000/resources/idlharness.js:912:21
  └ idl_test/</<@http://web-platform.test:8000/resources/idlharness.js:3440:31
  ▶ Unexpected subtest result in /permissions/idlharness.any.worker.html:
  │ FAIL [expected PASS] Permissions interface: operation query(object)
  │   → assert_unreached: Throws "TypeError: "this" object does not implement interface Permissions." instead of rejecting promise Reached unreachable code
  │ 
  │ throwOrReject/<@http://web-platform.test:8000/resources/idlharness.js:116:17
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926:25
  │ throwOrReject@http://web-platform.test:8000/resources/idlharness.js:115:20
  │ IdlInterface.prototype.do_member_operation_asserts@http://web-platform.test:8000/resources/idlharness.js:2542:13
  │ IdlInterface.prototype.test_member_operation/<@http://web-platform.test:8000/resources/idlharness.js:2462:14
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926:25
  │ IdlInterface.prototype.test_member_operation@http://web-platform.test:8000/resources/idlharness.js:2410:12
  │ IdlInterface.prototype.test_members@http://web-platform.test:8000/resources/idlharness.js:2720:26
  │ IdlInterface.prototype.test@http://web-platform.test:8000/resources/idlharness.js:1580:10
  │ IdlArray.prototype.test@http://web-platform.test:8000/resources/idlharness.js:905:28
  └ idl_test/</<@http://web-platform.test:8000/resources/idlharness.js:3440:31

You will need to update https://github.com/servo/servo/blob/master/tests/wpt/metadata/permissions/idlharness.any.js.ini to remove the CRASH line, and duplicate these lines but with the header idlharness.any.worker.html instead. Running ./mach test-wpt tests/wpt/web-platform-tests/permissions will verify that it's working as expected.

@iulianR
Copy link
Contributor Author

iulianR commented Feb 29, 2020

With these changes, ./mach test-wpt tests/wpt/web-platform-tests/permissions reports no errors. I can squash my commits if you'd like.

@jdm
Copy link
Member

jdm commented Feb 29, 2020

I'm fine with the current set of commits!
@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Feb 29, 2020

📌 Commit 3b85c6a has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Feb 29, 2020

Testing commit 3b85c6a with merge 9cab4aa...

bors-servo added a commit that referenced this pull request Feb 29, 2020
Move tinyfiledialog call from script to embedder

<!-- Please describe your changes on the following line: -->

PR is based on work started in #23651. I rebased on top of master and addressed review comments. Handling the `PromptPermission` message in `libsimpleservo` is probably not ideal. Looking forward to make more changes, just let me know how I should proceed.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23057 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 29, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Feb 29, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Feb 29, 2020

Testing commit 3b85c6a with merge d42835b...

@bors-servo
Copy link
Contributor

bors-servo commented Feb 29, 2020

☀️ Test successful - status-taskcluster
Approved by: jdm
Pushing d42835b to master...

@bors-servo bors-servo merged commit d42835b into servo:master Feb 29, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

6 participants
You can’t perform that action at this time.