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

History interface Go, Back, and Forward #12552

Merged
merged 1 commit into from Jul 22, 2016

Conversation

@cbrewster
Copy link
Member

cbrewster commented Jul 22, 2016

r? @asajeffrey


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

implement go, forward, back


This change is Reviewable

@highfive
Copy link

highfive commented Jul 22, 2016

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/history.rs, components/script/dom/webidls/History.webidl, components/script/dom/mod.rs, components/script/dom/window.rs, components/script/dom/webidls/Window.webidl
@cbrewster
Copy link
Member Author

cbrewster commented Jul 22, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jul 22, 2016

Trying commit 09ecfbb with merge 80d469d...

bors-servo added a commit that referenced this pull request Jul 22, 2016
History interface Go, Back, and Forward

<!-- Please describe your changes on the following line: -->
r? @asajeffrey

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

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

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

implement go, forward, back
@bors-servo
Copy link
Contributor

bors-servo commented Jul 22, 2016

💔 Test failed - linux-rel

@asajeffrey
Copy link
Member

asajeffrey commented Jul 22, 2016


Tests with unexpected results:
  ▶ Unexpected subtest result in /html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin.html:
  │ FAIL [expected PASS] Restoring window.name on cross-origin history traversal
  │   → f.contentWindow is null
  │ 
  │ steps<@http://web-platform.test:8000/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin.html:13:17
  │ steps</<@http://web-platform.test:8000/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin.html:25:72
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1402:20
  │ Test.prototype.step_func/<@http://web-platform.test:8000/resources/testharness.js:1426:20
  │ next<@http://web-platform.test:8000/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin.html:28:32
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1402:20
  └ Test.prototype.step_func/<@http://web-platform.test:8000/resources/testharness.js:1426:20

  ▶ Unexpected subtest result in /html/browsers/history/the-location-interface/location_assign_about_blank.html:
  └ PASS [expected FAIL] location.assign with initial about:blank browsing context

  ▶ Unexpected subtest result in /_mozilla/mozilla/interfaces.html:
  │ FAIL [expected PASS] Interfaces exposed on the window
  │   → assert_true: If this is failing: DANGER, are you sure you want to expose the new interface History to all webpages as a property on the global? Do not make a change to this file without review from jdm or Ms2ger for that specific change! expected true got false
  │ 
  │ test_interfaces/<@http://web-platform.test:8000/_mozilla/mozilla/interfaces.js:70:7
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1402:20
  │ test@http://web-platform.test:8000/resources/testharness.js:500:9
  │ test_interfaces@http://web-platform.test:8000/_mozilla/mozilla/interfaces.js:1:3
  └ @http://web-platform.test:8000/_mozilla/mozilla/interfaces.html:6:1

  ▶ Unexpected subtest result in /_mozilla/mozilla/interfaces.worker:
  │ FAIL [expected PASS] Untitled
  │   → assert_true: If this is failing: DANGER, are you sure you want to expose the new interface History to all webpages as a property on the global? Do not make a change to this file without review from jdm or Ms2ger for that specific change! expected true got false
  │ 
  │ test_interfaces/<@http://web-platform.test:8000/_mozilla/mozilla/interfaces.js:71:7
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1403:20
  │ test@http://web-platform.test:8000/resources/testharness.js:501:9
  │ test_interfaces@http://web-platform.test:8000/_mozilla/mozilla/interfaces.js:2:3
  └ @http://web-platform.test:8000/_mozilla/mozilla/interfaces.worker.js:9:1

The first fail is the interesting one, the second is good news. The other two are just reminding us to get @jdm or @Ms2ger to bless this PR.

@cbrewster cbrewster force-pushed the cbrewster:history_interface branch from 09ecfbb to bec5a95 Jul 22, 2016
@cbrewster cbrewster mentioned this pull request Jul 22, 2016
18 of 24 tasks complete
@cbrewster cbrewster force-pushed the cbrewster:history_interface branch from bec5a95 to 7273f24 Jul 22, 2016
@cbrewster
Copy link
Member Author

cbrewster commented Jul 22, 2016

Updated test expectations

@asajeffrey
Copy link
Member

asajeffrey commented Jul 22, 2016

Reviewed 13 of 14 files at r1, 5 of 5 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


components/script/dom/webidls/History.webidl, line 10 [r2] (raw file):

[Exposed=(Window,Worker)]
interface History {
  // readonly attribute unsigned long length;

It would be nice to support length at some point, not necessarily this PR though.


Comments from Reviewable

@asajeffrey
Copy link
Member

asajeffrey commented Jul 22, 2016

LGTM, we need @jdm or @Ms2ger to bless it, then you can r=me.

@jdm
Copy link
Member

jdm commented Jul 22, 2016

History does not belong in worker scopes and shouldn't have any Exposed annotation.

@bors-servo
Copy link
Contributor

bors-servo commented Jul 22, 2016

📌 Commit 7273f24 has been approved by asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Jul 22, 2016

Testing commit 7273f24 with merge 445152c...

bors-servo added a commit that referenced this pull request Jul 22, 2016
History interface Go, Back, and Forward

<!-- Please describe your changes on the following line: -->
r? @asajeffrey

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

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

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

implement go, forward, back

<!-- 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/12552)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jul 22, 2016

💔 Test failed - linux-rel

@cbrewster
Copy link
Member Author

cbrewster commented Jul 22, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jul 22, 2016

Testing commit 7273f24 with merge 629675a...

bors-servo added a commit that referenced this pull request Jul 22, 2016
History interface Go, Back, and Forward

<!-- Please describe your changes on the following line: -->
r? @asajeffrey

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

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

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

implement go, forward, back

<!-- 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/12552)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jul 22, 2016

💔 Test failed - linux-rel

@highfive
Copy link

highfive commented Jul 22, 2016

  ▶ Unexpected subtest result in /html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin.html:
  └ PASS [expected FAIL] Restoring window.name on cross-origin history traversal
@asajeffrey
Copy link
Member

asajeffrey commented Jul 22, 2016

Oh how ironic, this test is now intermittent, most likely due to the race condition between f.onload and the setTimeout.

@cbrewster
Copy link
Member Author

cbrewster commented Jul 22, 2016

@asajeffrey sigh.. I wonder if there is a way we can make this pass in both Gecko and Servo regardless of the onload issue

@cbrewster
Copy link
Member Author

cbrewster commented Jul 22, 2016

Would it be ok to change: https://github.com/ConnorGBrewster/servo/blob/master/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin.html#L40

onload = setTimeout(next, 0);

to

next();

That makes it pass in Servo(as the onload callback is not called for about:blank) and I assume Gecko as well (Firefox gets mad about www.localhost and I don't have a local copy of Gecko, it would be nice if someone could double check this).

implement go, forward, back
@cbrewster cbrewster force-pushed the cbrewster:history_interface branch from 7273f24 to 8d7a0c2 Jul 22, 2016
@cbrewster
Copy link
Member Author

cbrewster commented Jul 22, 2016

Disabled browsing_context_name_cross_origin.html until we can get a fix for it.

@cbrewster
Copy link
Member Author

cbrewster commented Jul 22, 2016

@bors-servo r=asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Jul 22, 2016

📌 Commit 8d7a0c2 has been approved by asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Jul 22, 2016

Testing commit 8d7a0c2 with merge 0e887ca...

bors-servo added a commit that referenced this pull request Jul 22, 2016
History interface Go, Back, and Forward

<!-- Please describe your changes on the following line: -->
r? @asajeffrey

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

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

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

implement go, forward, back

<!-- 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/12552)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jul 22, 2016

@bors-servo bors-servo merged commit 8d7a0c2 into servo:master Jul 22, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@stshine stshine mentioned this pull request Jul 26, 2016
3 of 3 tasks complete
@emilio
Copy link
Member

emilio commented Jul 26, 2016

#12563 makes some changes to onload to make it more consistent, would be nice to see if those changes fix any of the races you see here.

@cbrewster
Copy link
Member Author

cbrewster commented Aug 1, 2016

@emilio I tested locally and haven't hit any intermittent failures! 🎉 I will leave those issues open for a bit to make sure. Thanks!

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.