No, it was "ilegal" before, but not now I think Example: When you are changing something in your code, or when you want to change add colors or placement - and finally when you decide - you made yourself 20,30 impressions ( that means money ) by doing that
There is no problem in viewing your site as long as you don't click on your own ads which will lead to suspension of your Adsense account as Google is becoming strict day by day.
lol @ asking if you can view your own site for google TOS yes, you can view your site as many times as you want
Exactly till you do not click your own ads its OK for you to vie it as many times as you like but legitimately.