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

Add an API for tests to force a webgl canvas context error #17038

Closed
jdm opened this issue May 25, 2017 · 7 comments
Closed

Add an API for tests to force a webgl canvas context error #17038

jdm opened this issue May 25, 2017 · 7 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented May 25, 2017

@emilio
Copy link
Member

@emilio emilio commented May 25, 2017

Adding a pref should be enough, happy to mentor this one.

@jdm
Copy link
Member Author

@jdm jdm commented May 25, 2017

More specifically, we can add code to WebGLRenderingContext::new that checks a preference like webgl.testing.context_creation_error and returns an error immediately. We should then update tests/wpt/mozilla/meta/mozilla/webgl/context_creation_error.html.ini to set this preference to true so the test passes once more.

Code: components/script/dom/webglrenderingcontext.rs

@jdm
Copy link
Member Author

@jdm jdm commented May 25, 2017

@jesusbv Would you like to work on this?

@SWW13
Copy link
Contributor

@SWW13 SWW13 commented May 25, 2017

I'd like to work on this. @jesusbv if you're interested too you can gladly take it, I'm not going to work on it till tomorrow.

@bd339
Copy link
Contributor

@bd339 bd339 commented Jun 3, 2017

@SWW13 are you working on this, or can I take it?

@SWW13
Copy link
Contributor

@SWW13 SWW13 commented Jun 6, 2017

Just started to look a bit around in the WebGL component, feel free to take it @bd339 ;)

@jdm jdm added the C-assigned label Jun 6, 2017
@jdm
Copy link
Member Author

@jdm jdm commented Jun 6, 2017

Assigning to @bd339.

@bd339 bd339 mentioned this issue Jun 6, 2017
4 of 5 tasks complete
bors-servo added a commit that referenced this issue Jun 7, 2017
Add pref to force WebGL context creation failure

<!-- Please describe your changes on the following line: -->
Introduces the pref `webgl.testing.context_creation_error`, to force creation of a new WebGLRenderingContext to fail.

---
<!-- 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 #17038 (github issue number if applicable).

<!-- Either: -->
- [X] 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. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17189)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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