[webapi][xwalk-2524] Fix get url domain in webgl test

- Get the base domain from both ip url and domain url

Impacted tests(approved): new 0, update 1, delete 0
Unit test platform: [Android]
Unit test result summary: pass 1, fail 0, block 0
Merge pull request #1094 from haoxli/haoxli/webapi/xwalk-2524

[webapi][xwalk-2524] Fix get url domain in webgl test