/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 5082756
* @summary ensure that boolean attributes follow ( "TRUE" | "FALSE" )
* including correct (i.e. upper) case
*
* @run main BooleanAttributes
*/
public class BooleanAttributes {
"Chroma/BlackIsZero/@value",
"Compression/Lossless/@value");
"<javax_imageio_png_1.0>" +
"<iTXt><iTXtEntry keyword='Comment' compressionFlag='TRUE' " +
"compressionMethod='0' languageTag='en' " +
"translatedKeyword='comment' text='foo'/></iTXt>" +
"</javax_imageio_png_1.0>",
"<javax_imageio_png_1.0>" +
"<iTXt><iTXtEntry keyword='Comment' compressionFlag='FALSE' " +
"compressionMethod='0' languageTag='en' " +
"translatedKeyword='comment' text='foo'/></iTXt>" +
"</javax_imageio_png_1.0>",
"Chroma/BlackIsZero/@value",
"Compression/Lossless/@value");
"<javax_imageio_gif_image_1.0>" +
"<ImageDescriptor imageLeftPosition='0' imageTopPosition='0' " +
"imageWidth='16' imageHeight='16' interlaceFlag='TRUE' />" +
"<LocalColorTable sizeOfLocalColorTable='2' " +
"backgroundColorIndex='1' sortFlag='TRUE'>" +
"<ColorTableEntry index='0' red='0' green='0' blue='0' />" +
"<ColorTableEntry index='1' red='255' green='255' blue='255' />" +
"</LocalColorTable>" +
"<GraphicControlExtension disposalMethod='doNotDispose' " +
"userInputFlag='FALSE' transparentColorFlag='TRUE' " +
"delayTime='100' transparentColorIndex='1' />" +
"</javax_imageio_gif_image_1.0>",
"ImageDescriptor/@interlaceFlag",
"LocalColorTable/@sortFlag",
"GraphicControlExtension/@userInputFlag",
"GraphicControlExtension/@transparentColorFlag");
"<javax_imageio_gif_stream_1.0>" +
"<GlobalColorTable sizeOfGlobalColorTable='2' " +
"backgroundColorIndex='1' sortFlag='TRUE'>" +
"<ColorTableEntry index='0' red='0' green='0' blue='0' />" +
"<ColorTableEntry index='1' red='255' green='255' blue='255' />" +
"</GlobalColorTable>" +
"</javax_imageio_gif_stream_1.0>",
"GlobalColorTable/@sortFlag");
"Compression/Lossless/@value");
}
throws Exception
{
}
throws Exception
{
}
}
}
throws Exception
{
// Verify that the default metadata gets formatted correctly.
// Verify that the merged metadata gets formatte correctly.
throw new AssertionError("Zero length image file");
// Verify again after writing and re-reading the image
}
}
}