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

correct currentSrc function #21533

Merged
merged 2 commits into from Sep 1, 2018

Conversation

Projects
None yet
6 participants
@nupurbaghel
Contributor

nupurbaghel commented Aug 28, 2018


(recreating PR which got closed earlier #21521)

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #__ (github issue number if applicable).
  • There are tests for these changes

This change is Reviewable

@highfive

This comment has been minimized.

highfive commented Aug 28, 2018

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/htmlimageelement.rs
  • @KiChjang: components/script/dom/htmlimageelement.rs
@nupurbaghel

This comment has been minimized.

Contributor

nupurbaghel commented Aug 28, 2018

r? @jdm

@highfive highfive assigned jdm and unassigned Manishearth Aug 28, 2018

@nupurbaghel

This comment has been minimized.

Contributor

nupurbaghel commented Aug 28, 2018

A big pile of errors in here, although it runs well on my system. How can I avoid setting up of my local environment variables from Janitor in here in travis? It is causing unit tests to fail/timeout as I see.

@nupurbaghel

This comment has been minimized.

Contributor

nupurbaghel commented Aug 28, 2018

Also, I do not understand how they are set, when I have not even pushed them here.....

@jdm

This comment has been minimized.

Member

jdm commented Aug 30, 2018

The travis and appveyor failures aren't caused by these changes; it's just a strange coincidence that both of them hit intermittent problems on this PR.

@jdm

jdm approved these changes Aug 30, 2018

This looks fine to me, but our conversation on gitter suggests that img.complete.html needs to be updated as well.

@servo-wpt-sync

This comment has been minimized.

Collaborator

servo-wpt-sync commented Aug 30, 2018

Opened new PR for upstreamable changes.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#79.

@nupurbaghel nupurbaghel force-pushed the nupurbaghel:current_src branch from 881bc33 to 049ca5e Aug 30, 2018

@servo-wpt-sync

This comment has been minimized.

Collaborator

servo-wpt-sync commented Aug 30, 2018

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#79.

@nupurbaghel nupurbaghel force-pushed the nupurbaghel:current_src branch from 049ca5e to b9b604b Aug 31, 2018

@servo-wpt-sync

This comment has been minimized.

Collaborator

servo-wpt-sync commented Aug 31, 2018

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#79.

@nupurbaghel

This comment has been minimized.

Contributor

nupurbaghel commented Aug 31, 2018

Is the failure due to intermittent problems again? I am not able to figure out.

@jdm

This comment has been minimized.

Member

jdm commented Aug 31, 2018

Yes.

Some(ref url) => url.clone(),
None => DOMString::from(""),
Some(ref url) => DOMString::from_string(url.clone().into_string()),
None =>{

This comment has been minimized.

@jdm

jdm Aug 31, 2018

Member

Formatting nits:

  • space before {
  • only indent the inner block by four space
  • match the closing } with the None
var result = document.baseURI.split('/');
result.pop();
var expected_url = result.join('/')+"/3.jpg";
assert_equals(new URL(currentSrc).pathname, new URL(expected_url).pathname);

This comment has been minimized.

@jdm

jdm Aug 31, 2018

Member

Instead of playing around with URL components, let's do this instead:

var currentSrc = document.getElementById("imgTestTag3").currentSrc;
var expectedUrl = new URL("3.jpg", window.location);
assert_equals(currentSrc.pathname, expectedUrl.pathname);

This comment has been minimized.

@nupurbaghel

nupurbaghel Sep 1, 2018

Contributor

Modifying the last line to as shown below, as currentSrc.pathname returns undefined.

assert_equals(new URL(currentSrc).pathname, expectedUrl.pathname);

@nupurbaghel nupurbaghel force-pushed the nupurbaghel:current_src branch from b9b604b to b1adf8e Sep 1, 2018

@servo-wpt-sync

This comment has been minimized.

Collaborator

servo-wpt-sync commented Sep 1, 2018

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#79.

@jdm

This comment has been minimized.

Member

jdm commented Sep 1, 2018

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Sep 1, 2018

📌 Commit b1adf8e has been approved by jdm

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Sep 1, 2018

⌛️ Testing commit b1adf8e with merge ad865c7...

bors-servo added a commit that referenced this pull request Sep 1, 2018

Auto merge of #21533 - nupurbaghel:current_src, r=jdm
correct currentSrc function

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

---
(recreating PR which got closed earlier #21521)
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes

<!-- 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/21533)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Sep 1, 2018

@bors-servo bors-servo merged commit b1adf8e into servo:master Sep 1, 2018

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
@servo-wpt-sync

This comment has been minimized.

Collaborator

servo-wpt-sync commented Sep 1, 2018

Error syncing changes upstream. Logs saved in error-snapshot-1535810864732.

jdm added a commit to web-platform-tests/wpt that referenced this pull request Sep 1, 2018

correct failing tests
Upstreamed from servo/servo#21533 [ci skip]

@paavininanda paavininanda referenced this pull request Sep 2, 2018

Merged

Reacting to environment changes #21280

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