| Index: third_party/WebKit/LayoutTests/presentation/presentation-navigation-multipleurls.html
|
| diff --git a/third_party/WebKit/LayoutTests/presentation/presentation-navigation-multipleurls.html b/third_party/WebKit/LayoutTests/presentation/presentation-navigation-multipleurls.html
|
| index 328755cfd9e37c07905325f0012c189eeeaba955..706f16fc6570cff49b6ed23f08b580f5ae0eb0aa 100644
|
| --- a/third_party/WebKit/LayoutTests/presentation/presentation-navigation-multipleurls.html
|
| +++ b/third_party/WebKit/LayoutTests/presentation/presentation-navigation-multipleurls.html
|
| @@ -3,19 +3,29 @@
|
| <body>
|
| <script src="../resources/testharness.js"></script>
|
| <script src="../resources/testharnessreport.js"></script>
|
| +<iframe></iframe>
|
| <script>
|
|
|
| -// TODO(crbug.com/680298): use iframe to do presentation navigation layout tests
|
| -if (location.href.endsWith('#after-reload')) {
|
| - test(function() {
|
| - assert_equals(navigator.presentation.defaultRequest, null);
|
| - }, "Test that navigator.defaultRequest with multiple URLs isn't kept alive after reload.")
|
| -} else {
|
| - navigator.presentation.defaultRequest = new PresentationRequest(["https://example.org", "cast://google.com/app_id=deadbeef"]);
|
| +var iframe = document.querySelector('iframe');
|
|
|
| - location.href += '#after-reload';
|
| - location.reload();
|
| -}
|
| +async_test(t => {
|
| + iframe.onload = t.step_func(() => {
|
| + var presentation = iframe.contentWindow.navigator.presentation;
|
| + if (iframe.src.endsWith('#after-reload')) {
|
| + assert_equals(presentation.defaultRequest, null);
|
| + t.done();
|
| + } else {
|
| + presentation.defaultRequest = new PresentationRequest(["https://example.org", "cast://google.com/app_id=deadbeef"]);
|
| + assert_not_equals(presentation.defaultRequest, null);
|
| +
|
| + iframe.src += '#after-reload';
|
| + iframe.contentWindow.location.reload(true);
|
| + }
|
| + });
|
| +
|
| + // Navigate the iframe
|
| + iframe.src = 'resources/blank.html';
|
| +}, "Test that navigator.defaultRequest with multiple URLs isn't kept alive after reload.");
|
|
|
| </script>
|
| </body>
|
|
|