Merge lp:~sinzui/launchpad/webkit-yuitest-love-1 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 13229 | ||||
Proposed branch: | lp:~sinzui/launchpad/webkit-yuitest-love-1 | ||||
Merge into: | lp:launchpad | ||||
Prerequisite: | lp:~jcsackett/launchpad/these-tests-never-end | ||||
Diff against target: |
1416 lines (+235/-356) 42 files modified
buildout-templates/bin/test.in (+3/-0) lib/canonical/testing/layers.py (+10/-7) lib/lp/app/javascript/tests/test_hide_comment.html (+1/-1) lib/lp/app/javascript/tests/test_hide_comment.js (+1/-3) lib/lp/app/javascript/tests/test_lp_client.js (+1/-3) lib/lp/app/javascript/tests/test_lp_collapsibles.js (+1/-3) lib/lp/app/javascript/tests/test_multicheckboxwidget.js (+14/-12) lib/lp/app/javascript/tests/test_personpicker.html (+1/-1) lib/lp/app/javascript/tests/test_personpicker.js (+1/-3) lib/lp/app/javascript/tests/test_picker.js (+1/-3) lib/lp/app/tests/test_yuitests.py (+2/-2) lib/lp/app/windmill/testing.py (+1/-14) lib/lp/bugs/javascript/tests/test_bug_notification_level.js (+3/-23) lib/lp/bugs/javascript/tests/test_filebug_dupfinder.js (+9/-8) lib/lp/bugs/javascript/tests/test_me_too.js (+12/-10) lib/lp/bugs/javascript/tests/test_subscriber.js (+1/-3) lib/lp/bugs/javascript/tests/test_subscribers_list.js (+1/-3) lib/lp/bugs/javascript/tests/test_subscription.js (+1/-3) lib/lp/bugs/tests/test_yuitests.py (+2/-2) lib/lp/bugs/windmill/testing.py (+1/-15) lib/lp/code/javascript/tests/test_branchdiff.js (+1/-3) lib/lp/code/javascript/tests/test_productseries_setbranch.js (+1/-3) lib/lp/code/tests/test_yuitests.py (+2/-2) lib/lp/code/windmill/testing.py (+1/-15) lib/lp/registry/javascript/structural-subscription.js (+1/-1) lib/lp/registry/javascript/tests/test_distroseries.js (+10/-6) lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js (+3/-5) lib/lp/registry/javascript/tests/test_milestone_table.js (+1/-3) lib/lp/registry/javascript/tests/test_structural_subscription.html (+1/-0) lib/lp/registry/javascript/tests/test_structural_subscription.js (+3/-5) lib/lp/registry/javascript/tests/timeline-iframe.html (+1/-26) lib/lp/registry/javascript/tests/timeline.js (+69/-74) lib/lp/registry/tests/test_yuitests.py (+2/-2) lib/lp/registry/windmill/testing.py (+1/-14) lib/lp/soyuz/javascript/tests/archivesubscribers_index.js (+1/-3) lib/lp/soyuz/javascript/tests/lp_dynamic_dom_updater.js (+1/-3) lib/lp/soyuz/tests/test_yuitests.py (+2/-2) lib/lp/soyuz/windmill/testing.py (+1/-14) lib/lp/testing/__init__.py (+51/-32) lib/lp/translations/javascript/tests/test_sourcepackage_sharing_details.js (+12/-8) lib/lp/translations/tests/test_yuitests.py (+2/-2) lib/lp/translations/windmill/testing.py (+1/-14) |
||||
To merge this branch: | bzr merge lp:~sinzui/launchpad/webkit-yuitest-love-1 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Deryck Hodge (community) | code | Approve | |
Review via email: mp+63884@code.launchpad.net |
Description of the change
Use and embedded webkit browser to play YUI tests on a fast layer.
Launchpad bug: https:/
Pre-
This started as a spike to produce a way to run YUI tests in the standard
test environment. The current approach that leverages windmill and
firefox is too brittle to be trusted.
This branch uses a html5-capable browser object that can be driven by
python code. This branch has a lot of mechanical changes to address the
case when the test completes, but the dom is not yet rendered.
-------
RULES
* From the spike which produced http://
* Write a browser based on webkit.WebView to load the file.
* Return the data when the page or script signals complete
* Enable YUI tests to always run.
* Update BaseYUITestLayer to extend FunctionalLayer
* Update YUIUnitTestCase to use html5browser.
* Bonus, read the actual tests and report the individual failures.
* ADDENDUM: YUI tests that use events can signal the test is complete
/before/ the dom is rendered, this explains why the testrunner reports
that they fail, but we see them pass.
* ADDENDUM: Fix the broken YUI tests so that the branch can be landed
with YUI tests automatically run.
QA
* None
LINT
buildout-
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
There is a lot of lint in these file. I can fix this before I land.
TEST
./bin/test -vv --layer=YUI
IMPLEMENTATION
Always run YUI tests.
buildout-
YUI tests are simple tests. They do not require anything more than the basic
FunctionalLayer. No database, no app server, no windmill.
lib/
Updated to start of setup to use html5browser.
Many timed out out after 5 seconds. I chose to set the timeout to 30 seconds,
since html5browser uses a signal instead of polling or waiting.
I discovered that many tests failed because the complete signal is raised
/before/ the log is rendered in the dom. I decided to return the data passed
to our handler as JSON, which I think is faster and more accurate.
I discovered that several tests had more than on failure, but the only the
first was reported. I change the assertion to report all the errors.
lib/
The test was failing because the setup uses invalid markup. Each browser makes
a choice when it encounters invalid markup, often choosing to rewrite the dom
to make it valid; the expected content will not be returned. The test also
failed to place the new node in the document so that it can be rendered.
lib/
The title and heading were reversed. That is to say, the test was looking
for a haystack in a needle.
lib/
I reported bug 794597 that I disabled the resize testcase. webkit will
not run this test because of XSS concerns. The other test cases are fine.
lib/
This test was broken for two reason. The fakes that were passed to the test
did not provide the correct api, *and* the unlink_overlay object was never
passed. This was pretty difficult to debug because the code fail using
import_overlay was really about the missing argument, unlink_overlay.
The http test probably misbehaves because the test is run by webkit, but
on reading the code, I saw that the the method does not use http, it uses
lp, which works fine.
lib/
Mechanical changes to signal that the test runner is complete. The log CSS was
broken in several tests because the test css was not loaded, or the page uses
old yui classes.
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
I see The last two files in the diff are from jc's branch. His is landing now.