Changeset 201821 in webkit
- Timestamp:
- Jun 8, 2016 12:17:52 PM (8 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r201819 r201821 1 2016-06-08 Aakash Jain <aakash_jain@apple.com> 2 3 tests fail if display sleeps while run-webkit-tests is running 4 https://bugs.webkit.org/show_bug.cgi?id=153919 5 6 Reviewed by Alexey Proskuryakov. 7 8 * DumpRenderTree/mac/LayoutTestHelper.m: 9 (releaseSleepAssertions): Release both Display sleep and System sleep assertions. 10 (addSleepAssertions): Add sleep assertion for both Display sleep and System sleep. 11 1 12 2016-06-08 Lucas Forschler <lforschler@apple.com> 2 13 -
trunk/Tools/DumpRenderTree/mac/LayoutTestHelper.m
r201489 r201821 48 48 49 49 static int installColorProfile = false; 50 static uint32_t assertionID = 0; 50 static uint32_t assertionIDForDisplaySleep = 0; 51 static uint32_t assertionIDForSystemSleep = 0; 51 52 52 53 static NSMutableDictionary *originalColorProfileURLs() … … 196 197 } 197 198 198 static void releaseDisplaySleepAssertion() 199 { 200 IOPMAssertionRelease(assertionID); 199 static void releaseSleepAssertions() 200 { 201 IOPMAssertionRelease(assertionIDForDisplaySleep); 202 IOPMAssertionRelease(assertionIDForSystemSleep); 201 203 } 202 204 … … 205 207 // Try to restore the color profile and try to go down cleanly 206 208 restoreUserColorProfile(); 207 release DisplaySleepAssertion();209 releaseSleepAssertions(); 208 210 exit(128 + sig); 209 211 } … … 241 243 } 242 244 243 void add DisplaySleepAssertion()245 void addSleepAssertions() 244 246 { 245 247 CFStringRef assertionName = CFSTR("WebKit LayoutTestHelper"); 246 248 CFStringRef assertionDetails = CFSTR("WebKit layout-test helper tool is preventing sleep."); 249 IOPMAssertionCreateWithDescription(kIOPMAssertionTypePreventUserIdleDisplaySleep, 250 assertionName, assertionDetails, assertionDetails, NULL, 0, NULL, &assertionIDForDisplaySleep); 247 251 IOPMAssertionCreateWithDescription(kIOPMAssertionTypePreventUserIdleSystemSleep, 248 assertionName, assertionDetails, assertionDetails, NULL, 0, NULL, &assertionID );252 assertionName, assertionDetails, assertionDetails, NULL, 0, NULL, &assertionIDForSystemSleep); 249 253 } 250 254 … … 270 274 signal(SIGTERM, simpleSignalHandler); 271 275 272 add DisplaySleepAssertion();276 addSleepAssertions(); 273 277 lockDownDiscreteGraphics(); 274 278 … … 285 289 // Restore the profile 286 290 restoreUserColorProfile(); 287 release DisplaySleepAssertion();291 releaseSleepAssertions(); 288 292 289 293 return 0;
Note: See TracChangeset
for help on using the changeset viewer.