forked from mirrors/gecko-dev
		
	
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			564 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			564 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
add_task(async function() {
 | 
						|
  let keyUps = 0;
 | 
						|
 | 
						|
  await BrowserTestUtils.openNewForegroundTab(gBrowser, "data:text/html,<body>");
 | 
						|
 | 
						|
  gURLBar.focus();
 | 
						|
 | 
						|
  window.addEventListener("keyup", function(event) {
 | 
						|
    if (event.originalTarget == gURLBar.inputField) {
 | 
						|
      keyUps++;
 | 
						|
    }
 | 
						|
  }, {capture: true, once: true});
 | 
						|
 | 
						|
  gURLBar.addEventListener("keydown", function(event) {
 | 
						|
    gBrowser.selectedBrowser.focus();
 | 
						|
  }, {capture: true, once: true});
 | 
						|
 | 
						|
  EventUtils.synthesizeKey("v", { });
 | 
						|
 | 
						|
  is(keyUps, 1, "Key up fired at url bar");
 | 
						|
 | 
						|
  gBrowser.removeCurrentTab();
 | 
						|
});
 |