Issue #4277: fixed some mistakes in tests

1. cc.EGLView.getInstance -> cc.view
2. cc.Assert -> cc.assert
3. add a state condition to XHRTest.js
Merge branch 'tests_js_3.0' of https://github.com/cocos2d/cocos2d-js-tests into Iss4277_FixBugsForV3.0
Merge pull request #362 from dingpinglv/Iss4277_FixBugsForV3.0

Issue #4277: fixed some mistakes in tests