mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:32:43 +00:00 
			
		
		
		
	 e030193e5f
			
		
	
	
		e030193e5f
		
	
	
	
	
		
			
			We currently have a handful of iframe tests whose sources are in the "input" directory. This means they get run as their own tests, when they are really just helper files. We've had to add empty test expectation files for these "tests", and invoke a dummy test() method just to keep the test runner happy. Instead, move them to their own directory so the test runner does not see them at all.
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			700 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			700 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <script src="../include.js"></script>
 | |
| <iframe id="testIframe" src="about:blank"></iframe>
 | |
| <script>
 | |
|     asyncTest(async done => {
 | |
|         const iframe = document.getElementById("testIframe");
 | |
| 
 | |
|         function navigateIframe(src) {
 | |
|             return new Promise(resolve => {
 | |
|                 iframe.addEventListener("load", () => {
 | |
|                     resolve();
 | |
|                 });
 | |
|                 iframe.src = src;
 | |
|             });
 | |
|         }
 | |
| 
 | |
|         window.addEventListener("message", event => {
 | |
|             println(event.data);
 | |
|             if (event.data === "DONE")
 | |
|                 done();
 | |
|         });
 | |
| 
 | |
|         await navigateIframe("../../data/navigation-navigate-iframe.html");
 | |
|     });
 | |
| </script>
 |