add browser detection for dartium and add more unit tests