--- old/modules/graphics/src/test/java/com/sun/javafx/pgstub/StubToolkit.java 2014-05-14 14:12:36.000000000 -0400 +++ new/modules/graphics/src/test/java/com/sun/javafx/pgstub/StubToolkit.java 2014-05-14 14:12:36.000000000 -0400 @@ -145,9 +145,10 @@ // unsupported } + private final TKSystemMenu systemMenu = new StubSystemMenu(); @Override public TKSystemMenu getSystemMenu() { - return new StubSystemMenu(); + return systemMenu; } @Override @@ -880,14 +881,22 @@ public static class StubSystemMenu implements TKSystemMenu { + // make accessible to unit tests + public List menus = null; + @Override public boolean isSupported() { - return false; + // Although not all platforms have a system menu, the only real + // interaction with the system menu is this TKSystemMenu instance + // so we'll return true on all platforms. + return true; +// final String os = System.getProperty("os.name"); +// return (os != null && os.startsWith("Mac")); } @Override - public void setMenus(List menus) { - throw new UnsupportedOperationException("Not supported yet."); + public void setMenus(List< MenuBase > menus) { + this.menus = menus; } }