I have some test code that includes the following: TEST_F(URLTest, ProtocolHostAndPort) { URL url1(ParsedURLString, "http://username:@www.example.com:8080/index.html?var=val#fragment"); URL url2(ParsedURLString, "http://www.example.com:/index.html?var=val#fragment"); } When trying to include either those objects in my tests, I get the following error: $ ./run-api-tests URLTest Running build-api-tests UNEXPECTEDLY EXITED URLTest.ProtocolHostAndPort I'm assuming that "UNEXPECTEDLY EXITED" means that something has crashed, and that the thing crashing is URLParser.
You're probably hitting this assertion: ASSERT(url == m_string); That's correct because the canonicalized URLs are not equal to the input strings. Don't use ParsedURLString for strings that are not the output of a successfully parsed URL.