make karma test runner happy

make karma test runner happy: remove variable "root", use window directly.