add layout unit test.
temp commit.
add dialog layout unit test.
almost done, prepare to pull request.
Merge pull request #41 from cooee-zen/suyu_issue31

Suyu issue31: unit test for layout.