Implement GetMenuPosition API for native menus unit test.