forked from mirrors/gecko-dev
		
	 4a06c925ac
			
		
	
	
		4a06c925ac
		
	
	
	
	
		
			
			# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D36052 --HG-- extra : source : b5be5b4f4b47c256e28a29f665dc754f6407ee7f
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			673 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			673 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // Check that entering moz://a into the address bar directs us to a new url
 | |
| add_task(async function() {
 | |
|   let path = getRootDirectory(gTestPath).substring(
 | |
|     "chrome://mochitests/content/".length
 | |
|   );
 | |
|   await SpecialPowers.pushPrefEnv({
 | |
|     set: [
 | |
|       [
 | |
|         "toolkit.mozprotocol.url",
 | |
|         `https://example.com/${path}mozprotocol.html`,
 | |
|       ],
 | |
|     ],
 | |
|   });
 | |
| 
 | |
|   await BrowserTestUtils.withNewTab("about:blank", async function() {
 | |
|     BrowserTestUtils.loadURI(gBrowser, "moz://a");
 | |
|     await BrowserTestUtils.waitForLocationChange(
 | |
|       gBrowser,
 | |
|       `https://example.com/${path}mozprotocol.html`
 | |
|     );
 | |
|     ok(true, "Made it to the expected page");
 | |
|   });
 | |
| });
 |