forked from mirrors/gecko-dev
		
	 53e7c51dfb
			
		
	
	
		53e7c51dfb
		
	
	
	
	
		
			
			Automatic update from web-platform-tests App history API to navigation API rename (2/n) See https://github.com/WICG/navigation-api/issues/83 and https://github.com/WICG/navigation-api/pull/203 for context. This CL renames all test files, with occasional minor updates to their contents. Notably this includes web platform test files. While doing so, some of the web platform tests were slightly moved around to give a clearer directory structure. This revealed some confusing duplication (and in some cases mislocated tests) around state updates, which is tracked in https://crbug.com/1304446. Bug: 1300246 Change-Id: Ieef0329e7a309c242b5391f050878bc182487905 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3510194 Reviewed-by: Nate Chapin <japhet@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Commit-Queue: Domenic Denicola <domenic@chromium.org> Cr-Commit-Position: refs/heads/main@{#980702} -- wpt-commits: 4e628b145e52797f421c7f832d13014387aac961 wpt-pr: 33182
		
			
				
	
	
		
			32 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!doctype html>
 | |
| <script src="/resources/testharness.js"></script>
 | |
| <script src="/resources/testharnessreport.js"></script>
 | |
| <iframe id="i" src="resources/notify-top-early.html"></iframe>
 | |
| <script>
 | |
| async_test(t => {
 | |
|   let events = [];
 | |
|   function finish() {
 | |
|     assert_array_equals(events, ["onnavigate", "readystateinteractive", "domcontentloaded", "readystatecomplete", "onload", "onpageshow"]);
 | |
|     t.done();
 | |
|   };
 | |
| 
 | |
|   window.onload = t.step_func(() => {
 | |
|     window.childStarted = () => {
 | |
|       i.contentWindow.navigation.onnavigatesuccess = () => events.push("onnavigatesuccess");
 | |
|       i.contentWindow.navigation.onnavigateerror = () => events.push("onnavigateerror");
 | |
|       i.contentWindow.onpageshow = () => events.push("onpageshow");
 | |
|       i.contentWindow.onhashchange = () => events.push("onhashchange");
 | |
|       i.contentWindow.onpopstate = () => events.push("onpopstate");
 | |
|       i.onload = t.step_func(() => {
 | |
|         events.push("onload");
 | |
|         t.step_timeout(finish, 0);
 | |
|       });
 | |
|       i.contentDocument.addEventListener("DOMContentLoaded", () => events.push("domcontentloaded"));
 | |
|       i.contentDocument.onreadystatechange = () => events.push("readystate" + i.contentDocument.readyState);
 | |
|     };
 | |
|     i.contentWindow.navigation.onnavigate = () => events.push("onnavigate");
 | |
|     i.contentWindow.navigation.navigate("?1").committed.then(
 | |
|         () => events.push("promisefulfilled"), () => events.push("promiserejected"));
 | |
|   });
 | |
| }, "navigate() event ordering for cross-document navigation");
 | |
| </script>
 |