Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: third_party/WebKit/LayoutTests/presentation/presentation-navigation.html

Issue 2655073007: Revert of [Presentation API] Allow PresentationConnection state change to "Connecting" (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script src="../resources/testharness.js"></script> 4 <script src="../resources/testharness.js"></script>
5 <script src="../resources/testharnessreport.js"></script> 5 <script src="../resources/testharnessreport.js"></script>
6 <iframe></iframe> 6 <iframe></iframe>
7 <script> 7 <script>
8 8
9 const iframe = document.querySelector('iframe'); 9 var iframe = document.querySelector('iframe');
10 10
11 async_test(t => { 11 async_test(t => {
12 iframe.onload = t.step_func(() => { 12 iframe.onload = t.step_func(() => {
13 const presentation = iframe.contentWindow.navigator.presentation; 13 var presentation = iframe.contentWindow.navigator.presentation;
14 if (iframe.src.endsWith('#after-reload')) { 14 if (iframe.src.endsWith('#after-reload')) {
15 assert_equals(presentation.defaultRequest, null); 15 assert_equals(presentation.defaultRequest, null);
16 t.done(); 16 t.done();
17 } else { 17 } else {
18 presentation.defaultRequest = 18 presentation.defaultRequest = new PresentationRequest("https://example.org ");
19 new PresentationRequest("https://example.org");
20 assert_not_equals(presentation.defaultRequest, null); 19 assert_not_equals(presentation.defaultRequest, null);
21 20
22 iframe.src += '#after-reload'; 21 iframe.src += '#after-reload';
23 iframe.contentWindow.location.reload(true); 22 iframe.contentWindow.location.reload(true);
24 } 23 }
25 }); 24 });
26 25
27 // Navigate the iframe 26 // Navigate the iframe
28 iframe.src = 'resources/blank.html'; 27 iframe.src = 'resources/blank.html';
29 }, "Test that navigator.defaultRequest isn't kept alive after reload."); 28 }, "Test that navigator.defaultRequest isn't kept alive after reload.");
30 29
31 </script> 30 </script>
32 </body> 31 </body>
33 </html> 32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698