am 66d91401: Revert to using AppTheme for LayoutLib tests. [DO NOT MERGE]

* commit '66d914018cf605c25fb6b2f53627ef702decbdd1':
  Revert to using AppTheme for LayoutLib tests. [DO NOT MERGE]
This commit is contained in:
Deepanshu Gupta
2015-08-26 05:57:53 +00:00
committed by Android Git Automerger
2 changed files with 8 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -328,8 +328,8 @@ public class Main {
.setNavigation(Navigation.NONAV); .setNavigation(Navigation.NONAV);
SessionParams params = getSessionParams(parser, customConfigGenerator, SessionParams params = getSessionParams(parser, customConfigGenerator,
layoutLibCallback, "Theme.Material.NoActionBar.Fullscreen", RenderingMode.V_SCROLL, layoutLibCallback, "Theme.Material.NoActionBar.Fullscreen", false,
22); RenderingMode.V_SCROLL, 22);
renderAndVerify(params, "expand_vert_layout.png"); renderAndVerify(params, "expand_vert_layout.png");
@@ -341,8 +341,8 @@ public class Main {
parser = new LayoutPullParser(APP_TEST_RES + "/layout/" + parser = new LayoutPullParser(APP_TEST_RES + "/layout/" +
"expand_horz_layout.xml"); "expand_horz_layout.xml");
params = getSessionParams(parser, customConfigGenerator, params = getSessionParams(parser, customConfigGenerator,
layoutLibCallback, "Theme.Material.NoActionBar.Fullscreen", RenderingMode layoutLibCallback, "Theme.Material.NoActionBar.Fullscreen", false,
.H_SCROLL, 22); RenderingMode.H_SCROLL, 22);
renderAndVerify(params, "expand_horz_layout.png"); renderAndVerify(params, "expand_horz_layout.png");
} }
@@ -388,7 +388,7 @@ public class Main {
// TODO: Set up action bar handler properly to test menu rendering. // TODO: Set up action bar handler properly to test menu rendering.
// Create session params. // Create session params.
SessionParams params = getSessionParams(parser, ConfigGenerator.NEXUS_5, SessionParams params = getSessionParams(parser, ConfigGenerator.NEXUS_5,
layoutLibCallback, "Theme.Material.Light.DarkActionBar", RenderingMode.NORMAL, 22); layoutLibCallback, "AppTheme", true, RenderingMode.NORMAL, 22);
renderAndVerify(params, goldenFileName); renderAndVerify(params, goldenFileName);
} }
@@ -397,12 +397,13 @@ public class Main {
*/ */
private SessionParams getSessionParams(LayoutPullParser layoutParser, private SessionParams getSessionParams(LayoutPullParser layoutParser,
ConfigGenerator configGenerator, LayoutLibTestCallback layoutLibCallback, ConfigGenerator configGenerator, LayoutLibTestCallback layoutLibCallback,
String themeName, RenderingMode renderingMode, int targetSdk) { String themeName, boolean isProjectTheme, RenderingMode renderingMode, int targetSdk) {
FolderConfiguration config = configGenerator.getFolderConfig(); FolderConfiguration config = configGenerator.getFolderConfig();
ResourceResolver resourceResolver = ResourceResolver resourceResolver =
ResourceResolver.create(sProjectResources.getConfiguredResources(config), ResourceResolver.create(sProjectResources.getConfiguredResources(config),
sFrameworkRepo.getConfiguredResources(config), sFrameworkRepo.getConfiguredResources(config),
themeName, false); themeName, isProjectTheme);
return new SessionParams( return new SessionParams(
layoutParser, layoutParser,
renderingMode, renderingMode,