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 a manual test for hr-time #5201
Conversation
Notifying @igrigorik, @plehegar, and @toddreifsteck. (Learn how reviewing works.) |
These tests are now available on w3c-test.org |
Firefox (nightly channel)Testing web-platform-tests at revision 00446e1 All results1 test ran/hr-time/unload_manual.html
|
Chrome (unstable channel)Testing web-platform-tests at revision 00446e1 All results1 test ran/hr-time/unload_manual.html
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test looks good! Added a few suggestions to help clarify instructions.
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script> | ||
var t = async_test('Window time origin is almost equal (<10) to the time of the user confirming the navigation if a confirmation dialog is displayed'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing units.. "<10ms"
</head> | ||
<body> | ||
<h2>Description</h2> | ||
<p>This test validates that time origin is almost equal (less than 10) to the time of the user confirming the navigation if a confirmation dialog is displayed during the prompt to unload algorithm.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto, "less than 10ms apart"
<title>First Page</title> | ||
</head> | ||
<body> | ||
<p>Please close this page and confirm the unload dialog.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"and quickly confirm (within 10ms) the unload dialog."
<title>Second Page</title> | ||
</head> | ||
<body> | ||
<p>Test is over. Thanks!</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Thanks, you can close this page."
<ol> | ||
<li>Click the "openNewWindow" button below;</li> | ||
<li>Close the NEW page;</li> | ||
<li>Confirming the new navigation;</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... in FF and SF, once the user confirm the dialog, the previous window will become an empty object, so .open()
wont work within onunload()
. Still thinking about how to fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@annevk any thoughts or guidance on this one? By the sounds of it, this behavior is FF specific: is this a bug, a feature, or?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that might be a feature other browsers might copy at some point. Basically disallowing navigation from unload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought Chrome shipped something like this in Chrome 54. But then we have this open issue to disable window.open in unload.
@siusin any updates on this one? |
@igrigorik still thinking about how to redesign the test... sorry I was traveling for the last two weeks, will try to close these issues before the end of the week. |
We failed to find a good way to test the |
Closing. For reference, next attempt in #6241. |
This manual test tries to simulate a time origin value of a Window object, and validate that it's almost equal to the time of the user confirming the navigation when a confirmation dialog is displayed.
This test is an initial attempt to fix hr-time issue #32.