ecmascript test to return document title