[Webkit-unassigned] [Bug 40129] Geolocation needs LayoutTest to test making callbacks to remote frames

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 3 12:56:44 PDT 2010


--- Comment #8 from Alexey Proskuryakov <ap at webkit.org>  2010-06-03 12:56:43 PST ---
> Do you mean that the iframe would directly call a method on its own Geolocation object?

No, I meant making a call to one frame's Geolocation from a function defined in another frame when JS execution starts in the latter. Using setTimeout as Jeremy suggested is a good way to achieve that.

I do not fully understand all details (Sam Weinig, Geoff Garen, or Adam Barth would be the ones to talk to), but that's really a different situation.

> If you feel strongly about this, we should probably start a webkit-dev thread on the subject.

I wouldn't expect any specific conclusion from such a discussion thread. Informing people of both upsides and downsides to using script tests might be useful though. In addition to what I mentioned before, here are some more thing I consider when choosing one or another:
- shouldBe() is great when there are multiple subtests;
- shouldBe() is very smart about argument types, more so than a naive "==" would be;
- results are well structured, so there is no doubt whether a given output is a pass or a failure;
- with a script test, you don't need to type in dumpAsText();
- we still hope to run fast/js tests with only JavaScriptCore built one day, so keeping those tests in .js files is useful;
- async script-tests are inherently harder to follow, since notifyDone() is hidden, and execution flow is not all coded in one place;
- dynamically creating a DOM structure in a script test is ugly;
- a script test is more limited in how results are presented, binary PASS/FAIL is hard to dig into (why exactly did it fail? is it the thing we test for that fails, or something in surrounding machinery?)
- you don't get the kind of accidental testing you get with tests that dump more information;
- script tests are sometimes less compatible with other browsers, because you need to both test for a specific issue, and extract the results in a form that can be easily processed - so, you're relying on things like CSSOM that aren't well supported everywhere.

The below is neither clean nor compact, and it's forced on us by script-tests.

+var iframe = document.createElement('iframe');
+iframe.src = 'resources/callback-to-remote-context-inner.html';
+window.jsTestIsAsync = true;
+window.successfullyParsed = true;

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list