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 a manual test for hr-time #5201

Closed
wants to merge 1 commit into from
Closed

add a manual test for hr-time #5201

wants to merge 1 commit into from

Conversation

siusin
Copy link
Contributor

@siusin siusin commented Mar 22, 2017

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.

@wpt-pr-bot
Copy link
Collaborator

Notifying @igrigorik, @plehegar, and @toddreifsteck. (Learn how reviewing works.)

@w3c-bots
Copy link

These tests are now available on w3c-test.org

@w3c-bots
Copy link

View the complete job log.

Firefox (nightly channel)

Testing web-platform-tests at revision 00446e1
Using browser at version BuildID 20170321110237; SourceStamp ca4ae502156eaea6fffb296bb9c3b3930af8ab58
Starting 10 test iterations
All results were stable

All results

1 test ran
/hr-time/unload_manual.html
Subtest Results Messages
TIMEOUT
Window time origin is almost equal (<10) to the time of the user confirming the navigation if a confirmation dialog is displayed TIMEOUT Test timed out

@w3c-bots
Copy link

View the complete job log.

Chrome (unstable channel)

Testing web-platform-tests at revision 00446e1
Using browser at version 59.0.3047.0 dev
Starting 10 test iterations
All results were stable

All results

1 test ran
/hr-time/unload_manual.html
Subtest Results Messages
TIMEOUT
Window time origin is almost equal (<10) to the time of the user confirming the navigation if a confirmation dialog is displayed TIMEOUT Test timed out

Copy link
Member

@igrigorik igrigorik left a 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');
Copy link
Member

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>
Copy link
Member

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>
Copy link
Member

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>
Copy link
Member

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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Confirm the unload dialog within 10ms to initiate navigation to final page.
  • Done, you can close the final page. Thanks!
  • Copy link
    Contributor Author

    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.

    Copy link
    Member

    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?

    Copy link
    Member

    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.

    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Interesting, this smells like an intervention.. /cc @RByers

    @annevk any recommendations on how to setup this test in absence of this?

    Copy link
    Contributor

    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.

    @igrigorik
    Copy link
    Member

    @siusin any updates on this one?

    @siusin
    Copy link
    Contributor Author

    siusin commented Apr 12, 2017

    @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.

    @siusin
    Copy link
    Contributor Author

    siusin commented Apr 25, 2017

    We failed to find a good way to test the unload behavior that can work across the major browsers (discussed with @plehegar and @sideshowbarker ) . Suggest we close this PR.

    @igrigorik
    Copy link
    Member

    Closing. For reference, next attempt in #6241.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    Add prompt to unload test
    6 participants