Some code refactoring

- make Layout.Alignment.ALIGN_LEFT as the default case
- update unit tests for reproducing bug #5002512

Change-Id: Id7ec17abd115bcda7f3434e6d64dbbba6915f108
2 files changed