History log of /frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5a1ee289f512f21f6999410a7d725e346f1ff3b6 04-Jul-2017 Diego Perez <diegoperez@google.com> Shortcut common case of using colors

The use of colors is very common so add shortcuts for those cases in
drawable and complex color loading.

Test: Added new test for ResourceHelper.getColor
Change-Id: I0726b0ae7838994c4545ab3078900232a6231b8f
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
eba155a3a907f3a70c9d5977708e9d0fd2a273ad 27-Mar-2017 Diego Perez <diegoperez@google.com> Handle the case where no session exists

In some cases, if an error happens, no session will exist in
BridgeRenderSession.

Test: Added small regression test
Change-Id: Ic9be381767626766395c65044542c197ed7649e7
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
7ec0baf144a61ce17d8844678b0dd10acb710f87 01-Mar-2017 Diego Perez <diegoperez@google.com> Add perf tests to Main

Test: N/A
Change-Id: I907ebdc28043e3ac92bae6b6a19451c2ca24423f
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
b3e302402d2a7ee8874f8f021f714233c625319a 07-Feb-2017 Diego Perez <diegoperez@google.com> Add BridgeXmlPullAttributesTest to the Main suite

Test: Not needed
Change-Id: Ic00e6ef6b0fffd7ad480d37cfd57b2859efe1fbb
(cherry picked from commit 836d53375c0bc98fa5ee5f591901895cc1a305bd)
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
ddb7c37a8c655620051e405d219a8956b138a7e1 15-Dec-2016 Diego Perez <diegoperez@google.com> Add Main back to run in buildbot

Main is now a Suite that contains all the test needed for CI

Test: No new tests needed
Change-Id: I4374faacfa38f00d404151276580de636984638c
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
73b706037584398de7581e52b0ef884aa4b71a1a 13-Dec-2016 Diego Perez <diegoperez@google.com> Refactor tests structure

Move all the render test utility methods to a separate class and leave
only tests in RenderTests class (old Main).
The idea is to improve the organization to allow to create a set of
performance tests and also to allow the tests to grow more structured.

Test: Just moved tests around
Change-Id: I3b773d0745700dd2a52f937b9b668a2d374b8686
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
3293c3652160364cb3c66dbe8a3a5219e9e27b92 16-Jan-2017 Diego Perez <diegoperez@google.com> Merge changes Ia7a8a27f,I0646aab6,Ia324f18d,I38c6c6df,Ic9214929, ...

* changes:
Add missing attributes to old themes
Fix plurals support in layoutlib
Do not log errors while loading string arrays
Hack to deal with android:pointerIcon in layoutlib
Force animateFirstValue to false
Avoid passing antialias when measuring scaled text
Catch all exceptions in NativeAllocationRegistry free
898b5927b61ae0fcffe01d091a205e2baeaf5446 09-Dec-2016 Diego Perez <diegoperez@google.com> Add missing attributes to old themes

Because we always use the latest framework code, some resources might
fail to resolve when using old themes (they haven't been backported).
Since this is an artifact caused by us using always the latest code, we
check for some of those values and replace them here.

Bug: http://b.android.com/225105
Test: Included new testActivityOnOldTheme
Change-Id: Ia7a8a27fb81fe0b4a1e0c9610a2033a87720864d
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
cd88f0dc23c1e33ab3238a6df44342d015990b03 02-Dec-2016 Diego Perez <diegoperez@google.com> Do not log errors while loading string arrays

When arrays contain references, if we can not resolve them, just return
the reference string. This matches the behaviour of resource resolution
in BridgeTypeArray.

Bug: http://b.android.com/228620
Test: Updates existing tests
Change-Id: Ia324f18d9128b8abf2ba676a83d4b424914e2c88
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
f1a0a823499fc0a464e18b8eba992b32d14b8bb1 21-Nov-2016 Diego Perez <diegoperez@google.com> Call layout when doing an only-measure pass

Test: Modified testScrolled to check the only-measure behaviour
Change-Id: Ie86c329e0f7d9135d53274977e24f431f5edc201
(cherry picked from commit 2d657bc344717281e470430b05adaa32fbd0af00)
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
11c77ea499be4fdb513802146a60bbd67a0e7a00 17-Nov-2016 Diego Perez <diegoperez@google.com> Separate render and verify in tests

Test: Test refactoring. Tests still pass
Change-Id: Icdee3eb9ef1b2639418110583ac74a3fd5362166
(cherry picked from commit 564b00dd5201711c25a3580aa21be8b36bfaf923)
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
582d2bd084de1af570d616e30add6452bd4cb23c 11-Jan-2017 Diego Perez <diegoperez@google.com> Merge "Call onApplyWindowInsets after requestApplyWindowInsets"
401de8cdbaa1fb7c2961edd4e7158890043a6fb4 06-Dec-2016 Diego Perez <diegoperez@google.com> Fix status and nav bar translucency

Bug: http://b.android.com/204831
Test: Added new UI tests
Change-Id: I992f4ccc391d9a4a0dda941689ec29fb44acf69b
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
4a43b8564c42de75f577e33b52d1048f6f239ab7 17-Nov-2016 Diego Perez <diegoperez@google.com> Fix tests when running from the command line

When loading classes from the jar file, we can't just use the
URLClassLoader since it can not enumerate files in a jar directory.
Restoring the ModuleClassLoader and making all paths relative to the
system class loader (as opposed to relative to the class location).

Change-Id: Ib3f5d12dd5c964d0ba9cc6c5ec9cb556c989e653
(cherry picked from commit 2a4a6c81f8a103be5c48d8a0605a3e4416e8f7f1)
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
a93962d44d3358bf33d86a366ff0a09f889725bc 14-Nov-2016 Diego Perez <diegoperez@google.com> Call onApplyWindowInsets after requestApplyWindowInsets

On layoutlib, requestApplyWindowInsets wasn't being passed up to
ViewRootImpl so onApplyWindowInsets wasn't being called.

Test: Added new test testApplyWindowInsets
Bug: http://b.android.com/169308
Change-Id: I8f3174dc2879a7e6c3db1628a1bfb1c023d88efc
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
c702b276058dc81072b9db892d7ac9dd35da1935 15-Nov-2016 Diego Perez <diegoperez@google.com> More layoutlib testing infra fixes

- Remove ModuleClassLoader as it can be replaced with a URLClassLoader
for now.
- Move CustomCalendar and CustomDate to a separate package that can be
used both by the Bridge tests and the actual test app.
- Move empty.xml out of the test app so it compiles.
- Update test app to use the latest build tools and SDK (some attributes
being used by the app weren't supported in API 21).
- Update gitignore to remove the new out directory.

Test: Update to existing tests
Change-Id: Ieb7324d5ae559f9c581771c57f2127cd83909015
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
244e5c79106ca5e05cb967a34b96821ad5031074 07-Nov-2016 Jerome Gaillard <jgaillard@google.com> Update testActivity

Put android:animateFirstView false in the test application theme
so that the date picker view displays fully.
Update the golden image to reflect the changes.

Change-Id: If57fac5c182dd69b4b4d4fcc30d6f17a8f67ad68
(cherry picked from commit 96970138fc1c8d928a6d3ec362865e6c626f56e4)
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
134200c0b12cbe42b3118df13927430003012885 18-Jul-2016 Diego Perez <diegoperez@google.com> Ignore ?attr/windowActionBar when displaying menus

When we are displaying menus we do not care about that theme setting as
we always want to display the actionbar and the menu.

Bug: http://b.android.com/212320
Change-Id: I3b6200cc42e3c525a3763d14d423ee8371acc2f1
(cherry picked from commit 71eb800c0bb21b0e4cea3b29235ac4e544e765b2)
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
ca7b05455262ebd3dd5e8b1969b1b62a93233f09 14-Jun-2016 Diego Perez <diegoperez@google.com> Fix leak in VPathRenderer

The pointer to the root group in the VPathRenderer is not freed anywhere
in the Java side so we need to take care of it on the "native" side.

Change-Id: I2ca60b1f0e975a0b5d29799c5f6f31b5f8d42b9d
(cherry picked from commit ffdb1b241d9458196403c8f16264aa7053487323)
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
378c4850f49b51ee8af2e6f52c1c3aaa2e4206e9 27-Jun-2016 Diego Perez <diegoperez@google.com> Updating unit tests so they match the expected output

Change-Id: Id9af601c00fc87f861adeed9f5aa99a3dc55b17e
(cherry picked from commit 768e4c952f335a825cd45b102556d5948ed09d0c)
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
ab21d45b53d0948d899a9f0827c477a772ece784 27-Jun-2016 Diego Perez <diegoperez@google.com> Merge "Fix Path_Delegate reset"
606e600406679eca46b9f487ed05b757a355219f 22-Jun-2016 Jerome Gaillard <jgaillard@google.com> JUnit-4.11 does not accept static rules

Change-Id: I9a2b986c2a88731d67919449a3ca69d2e73879d1
(cherry picked from commit 588d93eb54e48daabed31f98b100824f1355d8ec)
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
eb6eaf1da29543eecde65703b55743cc4bf9ba7f 16-Jun-2016 Diego Perez <diegoperez@google.com> Use a mock file to make testGetResourceNameVariants work in jar files

Change-Id: Ic77f8bb2cef3dabeddd3ba530b0eda23e70c9017
(cherry picked from commit 616433e8ba0119b8ce79f76f41e8489030aea2a0)
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
8313dbe68b22a148070b62e00350cf6fa0f38fcd 23-May-2016 Diego Perez <diegoperez@google.com> Fix Path_Delegate reset

Path_Delegate.reset was not clearing the last point when called. This
caused some vector drawables that relied on relative position to fail to
render correctly.

Bug: http://b.android.com/91383
Bug: http://b.android.com/203797

Change-Id: Id250ecf8a5a5c66671aa8d3ddd213996f824fd56
(cherry picked from commit d6db7133af7b5aed76d83c17b60b27742608a2df)
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
454a727fdb251cf0064eb14a772c452f78082fcc 06-Apr-2016 Diego Perez <diegoperez@google.com> Fix rect shadow detection

ViewGroup_Delegate was trying to use a rect shadow even in cases where
we needed to use a path. This caused that using a ToggleButton would
throw an exception with radius < 0.
Also, changed the tests so we can detect certain render errors and
ignore other (like known fidelity warnings).

Change-Id: I900d45f9efa892ad0aebc8f4ef73fc9f21ab9d92
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
0685ab35ad78094ceb2d9fb0583e2cadd1968c90 04-Apr-2016 Diego Perez <diegoperez@google.com> Separate inflate from render step

Up until now, createSession will always do a first render. With the new
embedded layoutlib we might want to actually call objects from the
inflated view before doing a render or even do it between renders.
This allows to avoid the first initial render unless needed.

This CL also fixes a bug that would only happen when multiple render
calls are issued. When scrolling, use scrollTo since we likely want
absolute positions, not relative.

Change-Id: I4b1d8388d7218a8de33e25cd546fd965fcb07dc7
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
852bc917136aef751cfb82bef74a9e66bafdd3c8 26-Feb-2016 Diego Perez <diegoperez@google.com> Implement VirtualRefBasePtr native methods

The VirtualRefBasePtr is used to track the usage of native objects from
the java side by reference counting. Implementing the class delegate to
make sure we dispose the objects correctly.

Change-Id: I3dd4717944b0dbe79f30e49b3083bf65c6e5276d
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
d6b76a32f54da1ba6031f891ff58ccce5d221a41 24-Mar-2016 Deepanshu Gupta <deepanshu@google.com> Add tests for getResource*Name()

Change-Id: I02170b2b68c76f817aa0771a5333abf2aee456c0
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
777163c3facaed668b43061d726a572fd58f6f60 04-Mar-2016 Diego Perez <diegoperez@google.com> Account for parent scroll position

When calculating the ViewInfo bounding box, account for the parent
scroll position.
Also make renderAndVerify return a RenderResult to verify some data
about the result layout.

Change-Id: I965e393c49b5030c80083daf5e058fa31400ce93
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
f77f4417110d24bb19b383a67a94a157177e92da 01-Mar-2016 Diego Perez <diegoperez@google.com> Fix layoutlib expand unit test

Changing the theme used to "Light" since currently the "Dark" theme
seems to be missing at least one value. This test doesn't visually
depend on the theme so just changing it to "Light" to make it pass.

Change-Id: Ibb885bf3948dcf587de08896540dda622f86e8b3
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
95eceea4f12c4f0e5170b1a14658f23e87e343d5 01-Feb-2016 Diego Perez <diegoperez@google.com> Fix Canvas memory leak

Every RenderSession would call the AttachInfo.setAttachInfo but wouldn't
issue a View.dispatchDetachedFromWindow.
This caused some Canvas to be slowly leaked in the DelegateManager in
every session.

Change-Id: Iec418a86f5c5e55c2a2860ef945268c51c0e8173
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
a1c6015169815e90684917ac215926ae22e61d7a 18-Dec-2015 Diego Perez <diegoperez@google.com> New path interpolation to paint vector drawables

Before this CL, PathMeasure_Delegate would use Path_Delegate.approximate
to get a path segment to draw. Path_Delegate.approximate uses a
flattening iterator to do the path approximation.
Unfortunately, because we do not control the stroke mode while painting,
in some cases the approximation would draw unwanted artifacts caused by
the rough approximation and the use of wrong miter values.
This CL does a much better calculation of the path and interpolates the
segments of the curves instead of replacing them with line segments.

This also fixes an issue with the calculation of empty paths.

Bug: http://b.android.com/187256

Change-Id: I450f7aa4c3d9efcbf902a40c3b4d6d388546893f
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
804da8fd55cab4db3525361fa6b6538f531f266f 05-Jan-2016 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Fix device used comments in intensive tests

Change-Id: I65ee2f8bdf096ea991e72c99777c8981da7b5ae2
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
9708127dbc50453b911b06b45df1c2ba20d43a8d 11-Jan-2016 Deepanshu Gupta <deepanshu@google.com> Merge "Fix ninepatch scaling." into mnc-ub-dev
5cd1a1095273a5386653796f4d62b9894d0f4c26 07-Dec-2015 Deepanshu Gupta <deepanshu@google.com> Fix ninepatch scaling.

Really fix the bug now. Also add tests for the same and update
allwidgets golden file for M.

Bug: http://b.android.com/187939
Change-Id: I98cd55da0561fef9d47d8759bcd287ee36d03cc2
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
67edd77d7aae7770b691b45e00c67d7f42e0316d 14-Oct-2015 Diego Perez <diegoperez@google.com> Add support for Choreographer animations

First step to add support for Choreographer based animations. The
Choreographer_Delegate avoid using a handler so the animation callbacks
can be called on-demand (by using doFrame). This allows things like
frame by frame animation or selecting a specific frame, and doesn't need
a separate thread to run.

The CL also changes the System and SystemClock implementations to allow
to set specific times. Because animations heavily rely on the system
time, this allows controlling it. It can also be useful to ensure that
the rendering produces a deterministic result when using controls like
the Calendar widget.

Change-Id: Iff221d2698a82075cafbb60f341be01741f7aa13
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
21998e7ae4acc3f65b62834ff97486247db90213 03-Aug-2015 Deepanshu Gupta <deepanshu@google.com> Revert to using AppTheme for LayoutLib tests.

Use AppTheme for all tests other than testExpand. AppTheme contains an
attribute needed by testArrayCheck. Also, since the AppTheme extends
Theme.Material.Light.DarkActionBar, other tests should be unaffected.

Also, update the golden image for the testArrayCheck.

Change-Id: Ib5f53f3b029c5aceef2b622e5ac63952d6b1972a
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
6e057fd36eeecdbaceace349a60ff66e49b530aa 29-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Fix theme namespace in tests.

The tests used framework theme (Material), but the ResourceResolver was
created with project theme. This caused tests to fail becasue of missing
resources.

Change-Id: Ia17ee19054f6689f85e3423e83c1f47a2cc4364f
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
575e1502db87a2f078479d3c2837c4bc6c208ec8 21-Jul-2015 Diego Perez <diegoperez@google.com> resolved conflicts for merge of 112d8a36 to mnc-dev

Change-Id: Ic9511a57db8a96f54dba0704800789a8602b9dd2
92d9c3fa220868d6641b5831b24a0a72af7c6751 02-Jun-2015 Diego Perez <diegoperez@google.com> Render to measured size when using expand mode

When using RenderingMode.V_SCROLL or RenderingMode.H_SCROLL, if the
screen size is smaller than the measured size but as large as the
desired size, the layout will render incorrectly and won't expand.
This changes that to expand to at least the size of the screen.

Added tests for the V_SCROLL and H_SCROLL modes.

Bug: http://b.android.com/174928
Change-Id: I22686903560775e2e4f362af1d7b50c9b985467d
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
97ec2750d907c8bf9293358f210d991729319098 23-May-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Support getting resource arrays.

- Don't crash when Resources.get<Type>Array() is called.
- If the IDE supports it, actually return the value.
- Add tests for getArray.
- Update test app to latest gradle plugin version.
- Switch to using AppTheme for tests, since the tests depend on some
custom theme attributes. The AppTheme now inherits from
Material.Light.DarkActionBar, so other tests should be unaffected.

Depends on a newer version of sdk-common, which fixes the parsing of
array resource in value files.

Bug: 12372031
Change-Id: I313b61511e98ac1402d75056ebfdeeb005ebb96d
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
442aee6bc1abfb143dcfa1ba60d696e576d066c4 22-May-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Change nullity annotations.

Switch from using tools nullity annotations (com.android.annotations)
to android framework annotations (android.annotation).

A new sdk-common prebuilt is required for LayoutLib tests. The new
sdk-common requires an updated tools-common. The updated tools-common
doesn't have nullity annotations. So, instead of adding the annotation
dependency, just reuse the platform ones. This also paves the way to
include other platform annotations like IdRes etc.

Change-Id: I87b8f767d3681d914abe7d1329e26a87f49f50a7
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
c46c18efd3e58542337914da8ddc50b07d00fb6e 20-May-2015 Deepanshu Gupta <deepanshu@google.com> Update platformDir search in tests.

When trying to find the SDK Platform Dir for LayoutLib tests, also
test if the dir from which the tests are run is module dir.

Change-Id: Id5c6038d07ebbb122e38f907ad488ed1f2bcde32
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
9fe7fca9bcdceade9c654c6a8dcf0c48be16d78d 12-May-2015 Deepanshu Gupta <deepanshu@google.com> Add missing delegates for M preview.

- Remove ICU dependency (use the version bundled with platform).
- Restructure intelliJ project to move dependencies to module.
- Minor fixes to layoutlib tests.

TODO:
- Load ICU data.
- Hyphenator doesn't work.
- High quality line breaker not present.

Change-Id: I965e096e17bfc97ee995a649c3f4f6f64bb4f70d
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
536ae171c691493ee8f7176fe390185df34891ee 09-May-2015 Deepanshu Gupta <deepanshu@google.com> Run setup for full tests only once.

Change-Id: Iee64dbd88d473b7be08581f26ccddf649aed8e56
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
ba6a2dc17b4d86982f7e5dfd4e5b3b51f67e116b 17-Apr-2015 Deepanshu Gupta <deepanshu@google.com> More layoutlib tests.

- Add another layout including more widgets and thus testing layoutlib
better.
- Update targetSdk Version to 22.
- Handling of dynamic ids (@+id/) in LayoutLibTestCallback is buggy.
Since this is not a problem in Studio, and this is not testing the
callback, work around the issue by declaring the ids in
values/ids.xml.

Change-Id: I457c105e8556c4df13cd86da2250fe5fd37843a8
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
c0b01a2ad719c6f3ce6484b3a580a12c9347ef91 16-Apr-2015 Deepanshu Gupta <deepanshu@google.com> Nullity annotations to some tests.

Change-Id: I2939d7fab30f3b8fe32f2fdf720c630d677373ff
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
5d9d0930cc5b6223e322e4f4d6153fa59729a6b6 25-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am a62a18e3: am 311a0f54: Merge "Fix layoutlib tests." into lmp-dev

* commit 'a62a18e341180ccf6f5379a7d753584f6cee2e7c':
Fix layoutlib tests.
f2eb3f0373132658b8aaf04443ad114be69e0598 18-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Fix layoutlib tests.

The date picker and calendar widgets show the current date. Comparing
widgets showing current date with a static golden image wasn't the best
idea.

- Change the widgets to custom widgets that set a predefined date/time
so that the rendering is independent of the system date.
- Change the layout slightly to make it look nicer.
- Update gradle plugin version.

Change-Id: Ia3fb4965a372a28087a0d8c9df40fd6779df6050
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
4fe0407a49cb68ce21eb44d20f81e122f1f0f7a6 08-Jan-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Update platform.dir search in tests." into lmp-mr1-dev
1d4a176dc80e12fe67f1dde8a68be60699106604 07-Jan-2015 Deepanshu Gupta <deepanshu@google.com> Update platform.dir search in tests.

The tests search for a built sdk using some heuristics. The default path
of the built sdk has changed now, and this updates the search
accordingly.

Change-Id: I36d465d8c5f6cfd971bbdf95878fb144de233c6c
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
f44c0206cd5b621e818daec15adc4e1c68eb6356 07-Jan-2015 Deepanshu Gupta <deepanshu@google.com> Fix tests on jenkins, take 2.

Change-Id: I67386c34a7abd7c3afdf9f0768f36f4786399be0
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
eb654205e98fc28e7315baba1b1a7459cfc3a375 07-Jan-2015 Deepanshu Gupta <deepanshu@google.com> Fix tests on jenkins

When the tests are run on the build server, they are run from the jar,
as opposed to the extracted build, which is default when run from an
IDE. Thus, when class.getResourceAsStream() is called with ".." in the
path, it is not resolved properly. This change explicitly resolves the
relative path, so that the test is run properly on the server.

Change-Id: Ib5fabd617dca4052220e5173a8bf4fb4234254ff
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
29e323c68ae8e83058fac118114217728f13f89c 07-Dec-2014 Deepanshu Gupta <deepanshu@google.com> Add image comparison to LayoutLib tests.

The LayoutLib rendering tests now compares the rendered image with a
golden file from a previous execution. This will help catch any
unexpected changes in the final rendering.

Change-Id: I80251a778e89df7d7ec13863a8f299967f3d747d
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
30c885fde01803bc51560ad98c1bae4f78d6d578 25-Aug-2014 Deepanshu Gupta <deepanshu@google.com> Remove ANDROID_BUILD_TOP from intelliJ path variables.

The variable is not actually needed and it makes working with different
API levels a lot easier since everything now depends on $PROJECT_DIR$.

This change also makes the tests more robust by improving the way it
tries to find the SDK.

Change-Id: I3502ad4a0ba85fd88b497e47964fddb2a89e520c
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
5a19c6c9653f4c9f2462f6d43d6aedbd08e21bd3 04-Aug-2014 Deepanshu Gupta <deepanshu@google.com> Get filename from File faster

Use the direct call from a File object to get the filename instead of
going through Path which depends on Java 7 making the LayoutLib tests
incompatible with Java 6.

Change-Id: I815895eedbc10245ee09bdb53b11e5548b076aad
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
98796b464984574c1abe362478c9f47bda62fe7e 31-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Add testing framework to LayoutLib.

This change adds an end to end test which loads the framework resources
and a test app and ensures that no exceptions or warnings are thrown.

The change also adds project configuration for intelliJ.

Change-Id: I7b67c0f1a2af2dac95df7f3231cab537b9826d7d
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java