Skip to content

Commit

Permalink
8289606: CustomSecurityManagerTest fails on Mac M1
Browse files Browse the repository at this point in the history
Reviewed-by: kcr
  • Loading branch information
andy-goryachev-oracle authored and kevinrushforth committed Jul 13, 2022
1 parent b9a1ec5 commit eb8e9ef
Showing 1 changed file with 10 additions and 2 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -195,7 +195,15 @@ private void doTestFullScreenCommon(SecurityManager sm,
assertFalse(propertyState);
}
for (int row = 0; row < 2; row++) {
int y = row == 0 ? 1 : screenHeight.get() - 2;
int h = screenHeight.get();
int y;
if (row == 0) {
// avoid the top area as it might contain OS-specific UI (Macs with a notch)
y = h / 3;
} else {
y = h - 2;
}

for (int col = 0; col < 2; col++) {
int x = col == 0 ? 1 : screenWidth.get() - 2;
Color color = getColor(x, y);
Expand Down

1 comment on commit eb8e9ef

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.