forked from mirrors/gecko-dev
		
	Bug 1878716: Add a test that confirms the expected default behavior in PBM r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D206128
This commit is contained in:
		
							parent
							
								
									3081d01705
								
							
						
					
					
						commit
						cea7622639
					
				
					 10 changed files with 69 additions and 0 deletions
				
			
		|  | @ -135,6 +135,11 @@ add_task( | |||
|   defaultsTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(fppRandomized); | ||||
| add_task( | ||||
|   defaultsPBMTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(rfpFullyRandomized); | ||||
| add_task( | ||||
|   simpleRFPTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
|  |  | |||
|  | @ -132,6 +132,11 @@ add_task( | |||
|   defaultsTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(fppRandomized); | ||||
| add_task( | ||||
|   defaultsPBMTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(rfpFullyRandomized); | ||||
| add_task( | ||||
|   simpleRFPTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
|  |  | |||
|  | @ -161,6 +161,11 @@ add_task( | |||
|   defaultsTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(fppRandomized); | ||||
| add_task( | ||||
|   defaultsPBMTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(rfpFullyRandomized); | ||||
| add_task( | ||||
|   simpleRFPTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
|  |  | |||
|  | @ -164,6 +164,11 @@ add_task( | |||
|   defaultsTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(fppRandomizedSameDomain); | ||||
| add_task( | ||||
|   defaultsPBMTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(rfpFullyRandomized); | ||||
| add_task( | ||||
|   simpleRFPTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
|  |  | |||
|  | @ -164,6 +164,11 @@ add_task( | |||
|   defaultsTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(fppRandomizedSameDomain); | ||||
| add_task( | ||||
|   defaultsPBMTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(rfpFullyRandomized); | ||||
| add_task( | ||||
|   simpleRFPTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
|  |  | |||
|  | @ -166,6 +166,11 @@ add_task( | |||
|   defaultsTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(fppRandomizedSameDomain); | ||||
| add_task( | ||||
|   defaultsPBMTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(rfpFullyRandomized); | ||||
| add_task( | ||||
|   simpleRFPTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
|  |  | |||
|  | @ -167,6 +167,11 @@ add_task( | |||
|   defaultsTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(fppRandomizedSameDomain); | ||||
| add_task( | ||||
|   defaultsPBMTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(rfpFullyRandomized); | ||||
| add_task( | ||||
|   simpleRFPTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
|  |  | |||
|  | @ -158,6 +158,11 @@ add_task( | |||
|   defaultsTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(fppRandomizedSameDomain); | ||||
| add_task( | ||||
|   defaultsPBMTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(rfpFullyRandomized); | ||||
| add_task( | ||||
|   simpleRFPTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
|  |  | |||
|  | @ -158,6 +158,11 @@ add_task( | |||
|   defaultsTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(fppRandomizedSameDomain); | ||||
| add_task( | ||||
|   defaultsPBMTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
| ); | ||||
| 
 | ||||
| expectedResults = structuredClone(rfpFullyRandomized); | ||||
| add_task( | ||||
|   simpleRFPTest.bind(null, uri, testCanvasRandomization, expectedResults) | ||||
|  |  | |||
|  | @ -753,6 +753,30 @@ async function defaultsTest( | |||
|   } | ||||
| } | ||||
| 
 | ||||
| async function defaultsPBMTest( | ||||
|   uri, | ||||
|   testFunction, | ||||
|   expectedResults, | ||||
|   extraData, | ||||
|   extraPrefs | ||||
| ) { | ||||
|   if (extraData == undefined) { | ||||
|     extraData = {}; | ||||
|   } | ||||
|   extraData.private_window = true; | ||||
|   extraData.testDesc = extraData.testDesc || "default PBM window"; | ||||
|   expectedResults.shouldRFPApply = false; | ||||
|   if (extraPrefs != undefined) { | ||||
|     await SpecialPowers.pushPrefEnv({ | ||||
|       set: extraPrefs, | ||||
|     }); | ||||
|   } | ||||
|   await runActualTest(uri, testFunction, expectedResults, extraData); | ||||
|   if (extraPrefs != undefined) { | ||||
|     await SpecialPowers.popPrefEnv(); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| async function simpleRFPTest( | ||||
|   uri, | ||||
|   testFunction, | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Tom Ritter
						Tom Ritter