forked from mirrors/gecko-dev
		
	 17c3a96af9
			
		
	
	
		17c3a96af9
		
	
	
	
	
		
			
			This is assuming we want to pref off for 62 and pref on again for 63, simply delaying the feature by one release. MozReview-Commit-ID: 7Q4uD7QJDFc --HG-- extra : rebase_source : 5839daaac17384fdca8969e750af2bb76b6403fb
		
			
				
	
	
		
			30 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| /* Any copyright is dedicated to the Public Domain.
 | |
|  * http://creativecommons.org/publicdomain/zero/1.0/ */
 | |
| 
 | |
| "use strict";
 | |
| 
 | |
| ChromeUtils.import("resource://testing-common/CustomizableUITestUtils.jsm", this);
 | |
| 
 | |
| // Test that the "Tracking Protection" button in the app menu loads about:preferences
 | |
| add_task(async function testPreferencesButton() {
 | |
|   await SpecialPowers.pushPrefEnv({set: [["privacy.trackingprotection.appMenuToggle.enabled", true]]});
 | |
| 
 | |
|   let cuiTestUtils = new CustomizableUITestUtils(window);
 | |
| 
 | |
|   await BrowserTestUtils.withNewTab(gBrowser, async function(browser) {
 | |
|     await cuiTestUtils.openMainMenu();
 | |
| 
 | |
|     let loaded = TestUtils.waitForCondition(() => gBrowser.currentURI.spec == "about:preferences#privacy",
 | |
|       "Should open about:preferences.");
 | |
|     document.getElementById("appMenu-tp-label").click();
 | |
|     await loaded;
 | |
| 
 | |
|     await ContentTask.spawn(browser, {}, async function() {
 | |
|       let doc = content.document;
 | |
|       let section = await ContentTaskUtils.waitForCondition(
 | |
|         () => doc.querySelector(".spotlight"), "The spotlight should appear.");
 | |
|       is(section.getAttribute("data-subcategory"), "trackingprotection",
 | |
|         "The trackingprotection section is spotlighted.");
 | |
|     });
 | |
|   });
 | |
| });
 |