GitHub PullRequestReviewCommentEvent at 2014-01-29 20:20:08
Repository: addon-sdk
Actor: zombie
Payload: {"comment":{"url":"https://api.github.com/repos/mozilla/addon-sdk/pulls/comments/9282639","id":9282639,"diff_hunk":"@@ -62,3 +62,33 @@ exports.testPageMod = function testPageMod(assert, done, testURL, pageModOptions\n \n   return pageMods;\n }\n+\n+/**\n+ * helper function that creates a PageMod and calls back the appropriate handler\n+ * based on the value of document.readyState at the time contentScript is attached\n+ */\n+exports.handleReadyState = function(url, contentScriptWhen, callbacks) {\n+  const { PageMod } = Loader(module).require('sdk/page-mod');\n+  const STATES = ['loading', 'interactive', 'complete'];\n+\n+  let pagemod = PageMod({\n+    include: url,\n+    attachTo: ['existing', 'top'],\n+    contentScriptWhen: contentScriptWhen,\n+    contentScript: \"self.postMessage(document.readyState)\",\n+    onAttach: function({on, tab}) {","path":"test/pagemod-test-helpers.js","position":18,"original_position":18,"commit_id":"43e8f3ed1331bdcdff924a00a402af8d7970d90f","original_commit_id":"43e8f3ed1331bdcdff924a00a402af8d7970d90f","user":{"login":"zombie","id":207002,"avatar_url":"https://gravatar.com/avatar/2132cf6e7db0fa0e604b86d120c813ee?d=https%3A%2F%2Fidenticons.github.com%2Fe7c9dbb81b75cdf2ea6cfd4cc5bd6bdb.png&r=x","gravatar_id":"2132cf6e7db0fa0e604b86d120c813ee","url":"https://api.github.com/users/zombie","html_url":"https://github.com/zombie","followers_url":"https://api.github.com/users/zombie/followers","following_url":"https://api.github.com/users/zombie/following{/other_user}","gists_url":"https://api.github.com/users/zombie/gists{/gist_id}","starred_url":"https://api.github.com/users/zombie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zombie/subscriptions","organizations_url":"https://api.github.com/users/zombie/orgs","repos_url":"https://api.github.com/users/zombie/repos","events_url":"https://api.github.com/users/zombie/events{/privacy}","received_events_url":"https://api.github.com/users/zombie/received_events","type":"User","site_admin":false},"body":"yes i did run the tests. you are right now, but this *did* work, probably up until (a couple of weeks ago)[https://github.com/mozilla/addon-sdk/commits/master/lib/sdk/content/worker.js], before workers detraitification (or the removal of `deprecated/observer-service`).\r\n\r\nyou can still check this was true by forcing the modules from this branch to be included while running tests with `cfx -o testpkgs -f page-mod`.","created_at":"2014-01-29T20:20:08Z","updated_at":"2014-01-29T20:20:08Z","html_url":"https://github.com/mozilla/addon-sdk/pull/1334#discussion_r9282639","pull_request_url":"https://api.github.com/repos/mozilla/addon-sdk/pulls/1334","_links":{"self":{"href":"https://api.github.com/repos/mozilla/addon-sdk/pulls/comments/9282639"},"html":{"href":"https://github.com/mozilla/addon-sdk/pull/1334#discussion_r9282639"},"pull_request":{"href":"https://api.github.com/repos/mozilla/addon-sdk/pulls/1334"}}}}