mozilla-b2g/gaia — pull request #9098 by jugglinmike (2013-04-10 16:40:35+00:00)
Title: Define mocks based on document domain

Instead of inferring the document's domain from the location object,
query the global `document.domain` string. This approach acheives the
desired behavior for iFrames that do not declare a `src` attribute (in
such cases, `location.toString()` yeilds `undefined`, but
`document.domain` correctly returns the domain of the parent document.