139 Commits

Author SHA1 Message Date
Steve Block
5ba2efeb9f Minor clean-up in DeviceOrientation and DeviceMotion
No functional change.

See corresponding external/webkit change
https://android-git.corp.google.com/g/#change,125700

Change-Id: I2693328cb058820587ac43dd3121818959efd2d0
2012-04-12 11:08:13 +01:00
Jonathan Dixon
3c90952036 Refactor WebView to be a thin proxy class
Splits interface and implementation; all client calls are forwarded
to an abstract WebViewProvider interface, and the existing implementation
moved into the WebViewClassic implementor of this interface.

Originally taken from a snapshot from the development branch, by:
git diff HEAD 9a4c328a54cc05e5 | git apply
- but then rebased to keep up to date with master

Interdepends on webkit and Browser changes:
https://android-git.corp.google.com/g/158979
https://android-git.corp.google.com/g/167911

Change-Id: I91403f32654ff308934e95c832d17b292a7d9b2e
2012-03-02 11:17:47 +00:00
Steve Block
9eed25e257 In DRT2, correctly handle the case of zero tests
Bug: 3291382
Change-Id: I8cde1d8d78a57407c585b02ca8ba3f3f893a609b
2011-05-24 18:54:14 +01:00
Steve Block
183c3c9ca2 Update DRT2 to reflect WebKit code movement
See http://trac.webkit.org/changeset/74301

Change-Id: Ibe495cdc1f50f65db5663dbb63af9b9c2db050d0
2011-05-24 18:46:35 +01:00
Steve Block
31e446c3db Add extra error handling to DRT2 launcher script
Bug: 3291220
Change-Id: I6f8e57458cd4334a998eb256af303ffcd9c50d64
2011-05-24 18:46:34 +01:00
Huahui Wu
f93246923f A few small cleanning-ups.
1. Remove mDeferMultiTouch in WebView, it was for testing only but
we don't need it now since we always pass MultiTouch to WebKit.

2. Remove the use of mDeferMultiTouch in DRT tests.

3. Correct the index of getX(Y) for the second touch point in the
debug string of MotionEvent.

Change-Id: Ib63cfc5935af1a169ed26b2b138f74908492bc18
2011-01-24 12:07:37 -08:00
Huahui Wu
a586b7baaf b/3369602 Using Math.round() to convert float coordinates to integers.
Change-Id: If4da01046c909667ce57a849569ae6b1acefb939
2011-01-21 10:37:09 -08:00
Philippe Marti
84cc2dbb1d Improve error handling (NPE in DRT2)
Bug: 3284126
Change-Id: I7f8c6259f2932d2b1a10a2f9612866786d425da9
2011-01-13 14:16:20 +00:00
Guang Zhu
2aafca6408 pass layout test list using external file
Currently layout test list is passed between two processes in
intent, which does not work for large lists. This change store
the list in external storage folder (per app based, actual
location determined by framework) instead.

Change-Id: Ib175f766159f5e4f831d6b9ace9f1c4caef7298d
2010-11-23 14:32:53 -08:00
Steve Block
edfdd15527 Fix EventSender mouse events to correctly convert from screen coordinates
This is required for LayoutTest fast/dom/Node/mutation-blur.html

Change-Id: Ib82f897ab61ac3a8e8eacee8ec08f5242c43c736
2010-11-11 20:06:42 +00:00
Steve Block
aca659c207 Refactor EventSenderImpl.MousePoint
This factors out a new Point class and a new
createViewPointFromContentCoordinates() method. This will allow Point
and the conversion method to be re-used with mouse events.

Change-Id: I2d689d0ffa0ad7ba01d0e90f78c812604ab96234
2010-11-11 20:05:56 +00:00
Iain Merrick
ace92b871a Include .php tests in DumpRenderTree2.
I've manually checked the existing LayoutTests for false positives.
There are non-test .php files, but they're all in "resources"
subdirectories, so they should be caught by isTestDir(). Added an
extra @warning to isTestFile() just in case.

Bug: 3164771
Change-Id: Ib282acf46f6e839439ce521c4b2cb5820fcd263c
2010-11-09 15:44:16 +00:00
Steve Block
ca501d2036 Fix DumpRenderTree2 to not attempt to read expected results over HTTPS
This is required now that we have HTTPS tests in the triaged set of
tests.

Change-Id: I650518a4536ed903f637a44c0901b1e38bdc1a84
2010-11-09 13:36:43 +00:00
Steve Block
cda9448206 Fix FsUtils.readDataFromUrl() to do the network request on a background thread
This is required now that doing network requests on the main thread
throws NetworkOnMainThreadException.

Also updates TestsListPreloaderThread to create the FileFilter lazily
and removes a superfluous FileFilter param from the Summarizer
constructor.

Change-Id: If15fddac934cd8be611f6693b25837657abbddc3
2010-11-09 12:33:28 +00:00
Steve Block
24652bc958 Fix DumpRenderTree2 to correctly handle crashed tests
Change-Id: I894987d5b8f24ea31893aefe3cb6450c2736aa90
2010-10-18 20:20:43 +01:00
Steve Block
fc16915d32 Fix DumpRenderTree2 script to allow only one path to be specified
Change-Id: I4a85ff69554a9c76af0b2deea747b8414660fee2
2010-10-18 20:20:42 +01:00
Steve Block
ae47ce0046 Improve error handling in DumpRenderTree2 scripts
Change-Id: Idba4acc22dd037a001ea5c05cbd6a29292f6de2c
2010-10-18 20:20:41 +01:00
Steve Block
5f37cc4308 Implement LayoutTestController.overridePreference('WebKitUsesPageCachePreferenceKey')
This is required for tests that test PageCache behaviour, eg
- fast/dom/DeviceMotion/no-page-cache.html
- fast/dom/DeviceOrientation/no-page-cache.html
- fast/dom/Geolocation/no-page-cache.html

Change-Id: Ie5862f6c86718142c949be81a85358ca6fac628a
2010-10-14 12:43:44 +01:00
Steve Block
856f2859e8 Fix some bugs in DumpRenderTree2 when forming HTML diffs
Change-Id: Id98c1b7dde1961c2dab4214a36ad43916baf8011
2010-09-29 18:51:42 +01:00
Steve Block
fd487ad1b8 Use the empty string when expected text results are missing in DumpRenderTree2
Change-Id: I204583ecc9c6a8017349124d5813c693c7f00dc9
2010-09-29 18:51:42 +01:00
Steve Block
f460dd4219 Fix a bug with the expected result path in DumpRenderTree2
If we fail to read from any of the possible expected result paths, we should
not record an expected result path.

Change-Id: Ica96b791c14a7755154be4ec9480be4d13f47a19
2010-09-29 18:51:42 +01:00
Steve Block
fdffee828c Correctly implement EventSender mouse methods in DumpRenderTree2
This is taken from a similar change to DumpRenderTree in
https://android-git.corp.google.com/g/62449

Change-Id: I01418100ace1cf1ccfbb4fd28d72b99b54e0c140
2010-09-29 18:51:41 +01:00
Steve Block
c0f90a8f93 Trim empty lines when comparing text results in DumpRenderTree2
Change-Id: I94c9de8e6131f6b60456700e9d5a3b27c8c9d1c3
2010-09-29 18:51:41 +01:00
Guang Zhu
82c11b42f1 add multiple device support to layout test driver script
pass on the serial number onto adb command so that it don't get
confused when multiple devices are connected

Change-Id: I0b16f9da941d77425bcc5f782393f8800e035871
2010-09-28 12:54:02 -07:00
Steve Block
27c5fab571 Reduce the AppCache maximum size to a more reasonable value in DumpRenderTree2
Without this change, any use of AppCache fails after the test
http/tests/appcache/max-size.html has been run. The test in question
passes, but seems to leave the database in a corrupted state, causing
all future database transactions to fail. The only fix is to remove
the database file.

This behaviour is only observed with DumpRenderTree2, not
DumpRenderTree, so I don't think this is a WebView problem. I'm not
sure what the root cause is, but I think it make sense to submit this
fix now in order to get the LayoutTests stable with DumpRenderTree2.

Change-Id: I763c09406e66839676b839e3cdeba3b9427c1cb9
2010-09-28 19:01:12 +01:00
Steve Block
31fb8b60fb Merge changes Ic62f60d9,I04a01634
* changes:
  Provide a useful message in DumpRenderTree2 GUI when the host server is not running
  Prevent DumpRenderTree2 from crashing when the host server is not running
2010-09-28 07:09:45 -07:00
Steve Block
cb98a3e621 Provide a useful message in DumpRenderTree2 GUI when the host server is not running
Bug: 3010758
Change-Id: Ic62f60d96055e7ad1e475215ca384306cdfa859c
2010-09-28 14:34:01 +01:00
Steve Block
898bfbd865 Prevent DumpRenderTree2 from crashing when the host server is not running
Bug: 3010758
Change-Id: I04a01634544d223d225b264827d3cf18be74e1e0
2010-09-28 14:21:03 +01:00
Steve Block
42bf092c47 Update run_layout_tests.py to give a useful error if DumpRenderTree2 is not found on the device
Bug: 3006981
Change-Id: Ie789eb726bc051305371d4958c16ceca980ea1d1
2010-09-28 13:12:36 +01:00
Huahui Wu
41865f4b0c Bug 2372180: pass multi-touch events from browser to webkit.
Since the UI uses multi-touch for zooming, the event is passed to webkit
only when the webpage doesn't allow zooming.
1. Updated the data structure TouchEventData in WebViewCore.java
   to take multiple points and used it everywhere.
2. Added a passMultiTouchToWebkit() function to do what its name means.
3. Added the multi-point touch support to dumprendertree.

Change-Id: Iafc1aa7b21a587ad26efd2f124b9a66316297ab8
2010-09-26 16:26:38 -07:00
Steve Block
1358a1c806 Fix DumpRenderTree2 to clear AppCache between tests
Change-Id: I1bafc79bbdbec0df7e4c8039488478a3bfcb3bd4
2010-09-22 15:43:34 +01:00
Steve Block
3cf18f5c96 Fix DumpRenderTree2 to wait for the WebCore thread to become ready
This is required to make sure that the WebCore thread's message
handlers are ready to receive settings.

Change-Id: I2c4df95e3b7409535b739ada957d93a7e6cd78d6
2010-09-22 15:43:34 +01:00
Steve Block
0e1d6876f9 Fix a bug in DumpRenderTree2's run_apache2.py script
We use a printf style approach when setting the run command in the
command string to be executed. When doing so, the printf must be
applied to only the relevant part of the string. This avoids problems
in the case that other parts of the string contain special character
sequences, such as '%s' in a custom log directive.

Change-Id: I87df773a2872320386a34cb6a5041a9e0ba6f31e
2010-09-22 15:33:05 +01:00
Steve Block
34f3851e95 Fix DumpRenderTree2 to make AbstractResult serializable
This should have been doen as part of
https://android-git.corp.google.com/g/#change,65283

Change-Id: I7a4681f98014ff5a7546a7346fc5523e01f62e19
2010-09-22 15:33:05 +01:00
Steve Block
f09aafa275 Fix DumpRenderTree2 to handle SSL errors
This fixes http/tests/appcache/different-https-origin-resource-main.html

Change-Id: I90e151c027b2d8c55ea82104c02e4a641b933024
2010-09-22 15:33:05 +01:00
Steve Block
70727d1f75 Merge "Fix DumpRenderTree2 to correctly add JavaScript interfaces to new windows" 2010-09-22 07:28:29 -07:00
Maksymilian Osowski
394e0fb849 Updated Summarizer to use SQLite DB.
It avoids OOM issues by dumping the memory to the DB every
few hundred tests and then reading them in chunks when
generating summaries, etc.

Change-Id: I5f63d960d456f17e9f2189230a7ae0ca5607ce51
2010-09-17 16:35:46 +01:00
Maksymilian Osowski
fadb0de33d Changed Summarizer to dump generated html code to file every few hundred tests to avoid OOM errors.
Change-Id: Id0917d45ffab2e47d67d17d629f342add5292d4e
2010-09-17 16:14:39 +01:00
Steve Block
76c97ee414 Fix DumpRenderTree2 to serve HTTP tests on http://127.0.0.1:8000
Currently DumpRenderTree2 serves HTTP tests on http://localhost:8080.
Some of the tests hardcode 'http://127.0.0.1:8000' for resources, so
we must use this scheme and port for the requests to be same-origin.

This fixes LayoutTest http/tests/appcache/credential-url.html

Change-Id: I2a9c402fc7b0e0b62eb4a278d67ac0e63ef96e8b
2010-09-17 16:12:21 +01:00
Maksymilian Osowski
062c0c9846 Merge "Updated ManagerService to call Summarizer.summarize() in a separate thread." 2010-09-17 07:29:14 -07:00
Maksymilian Osowski
517ebf14d4 Merge "Changed the behaviour of run_apache2.py restart." 2010-09-17 07:28:58 -07:00
Maksymilian Osowski
4af7705631 Changed the behaviour of run_apache2.py restart.
Now it explicitly stops and starts the server and not just invokes apache2 -k restart

Change-Id: I74cfa9c3388552fcc56b62c5ab614262ca540d0b
2010-09-17 15:27:34 +01:00
Maksymilian Osowski
9893d96d12 Updated ManagerService to call Summarizer.summarize() in a separate thread.
This could potentially take a long time and result in ANR.

Change-Id: Ib8b246e627e841217b68c955d92c97801e93d923
2010-09-17 15:11:15 +01:00
Steve Block
b6a2364eba Merge "Update DumpRenderTree2 to handle failing tests where no meaningful diff is available" 2010-09-17 06:40:24 -07:00
Steve Block
f0c289e24c Fix DumpRenderTree2 to correctly add JavaScript interfaces to new windows
When adding JavaScript interfaces to a WebView, they must be passed to
the WebView constructor, rather than to
WebView.addJavascriptInterface() if they are to be used immediately
without the risk of race conditions.

This fixes LayoutTest
http/tests/appcache/crash-when-navigating-away-then-back.html

This was fixed for DumpRenderTree in
https://android-git.corp.google.com/g/23804

Change-Id: I1581d6d6cfc1b35be1ec2f2e5b5b944da2b4b935
2010-09-17 13:21:51 +01:00
Steve Block
8a6def0247 Update DumpRenderTree2 to handle failing tests where no meaningful diff is available
Currently, DumpRenderTree2 asigns the following result codes
{PASS, FAIL_RESULT_DIFFERS, FAIL_NO_EXPECTED_RESULT, FAIL_TIMED_OUT,
FAIL_CRASHED}

This is not strictly correct, as a test may fail for any of three
reasons - crashing, timing out, or the the result not being as
expected. Therefore, it's possible for a test to fail even if the
result is as expected.

This patch updates AbstractResult to handle each of the three reasons
for failure separately. We then test all three to determine if the
test has passed.

This allows us to correctly report whether or not the result differs
from expected for a failing test.

Change-Id: I7adcfe72c4dd0bd3de2e1b868d9807be6eb5bddf
2010-09-17 13:21:22 +01:00
Maksymilian Osowski
44ce3242a9 Merge "Changed run_layout_tests.py and run_apache2.py to accept alternative tests root dir." 2010-09-17 05:04:19 -07:00
Steve Block
c0847c55ea Remove superfluous CSS from DumpRenderTree2's Summarizer
Change-Id: Ifc3764ec3cf7bd5ee412abaf45112eed22083456
2010-09-17 12:30:21 +01:00
Steve Block
2c38de8436 Implement WebViewClient.onReceivedHttpAuthRequest() in DumpRenderTree2
This fixes LayoutTest http/tests/appcache/auth.html.

Change-Id: Idd9ead9c35341cc6a787d409ae2fe1bebef01d60
2010-09-17 12:30:21 +01:00
Maksymilian Osowski
78fbc54c18 Changed run_layout_tests.py and run_apache2.py to accept alternative tests root dir.
Change-Id: I6d0537b6712ca6f68ec004e5e8bf95b97b9017fc
2010-09-17 12:18:56 +01:00