.returns(DevicePolicyConstants.PROTOCOL_CSS_EMULATE_WIDTH_TABLE__NONE)
.any();
deviceMock.expects.getPixelsX().returns(deviceWidth).any();
StrictStyledDOMHelper helper = new StrictStyledDOMHelper(null, "STYLE");
Document document = helper.parse(/*getClass().getResourceAsStream(
"width-percentages-attributes1-input.xml")*/
input);
XHTMLMobile1_0_UnabridgedTransformer transformer =
new XHTMLMobile1_0_UnabridgedTransformer(transformationConfigurationMock);
// Don't render the document out before transforming as it is
// destructive and loses the styles.
// String before = helper.render(document);
// System.out.println("before: " + before);
//
MutableStylePropertySet interesting =
new MutableStylePropertySetImpl();
interesting.add(StylePropertyDetails.WIDTH);
DebugStyledDocument debugStyledDocument;
debugStyledDocument = new DebugStyledDocument(interesting);
String before = debugStyledDocument.debug(document);
document = transformer.transform(protocolMock, document);
debugStyledDocument = new DebugStyledDocument(interesting);
String after = debugStyledDocument.debug(document);
String result = helper.render(document);
boolean failed = true;
try {
assertXMLEquals("Transformed document does not match", expected, result);
failed = false;