/cts/tests/src/android/graphics/drawable/cts/ |
D | DrawableTestUtils.java | 33 public static void skipCurrentTag(XmlPullParser parser) in skipCurrentTag() argument 35 int outerDepth = parser.getDepth(); in skipCurrentTag() 37 while ((type=parser.next()) != XmlPullParser.END_DOCUMENT in skipCurrentTag() 39 || parser.getDepth() > outerDepth)) { in skipCurrentTag() 52 public static AttributeSet getAttributeSet(XmlResourceParser parser, String searchedNodeName) in getAttributeSet() argument 56 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttributeSet() 59 String nodeName = parser.getName(); in getAttributeSet() 63 int outerDepth = parser.getDepth(); in getAttributeSet() 64 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttributeSet() 65 && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { in getAttributeSet() [all …]
|
/cts/tests/SignatureTest/src/android/tests/sigtest/ |
D | SignatureTest.java | 81 …public static final void beginDocument(XmlPullParser parser, String firstElementName) throws XmlPu… in beginDocument() argument 84 while ((type=parser.next()) != XmlPullParser.START_TAG in beginDocument() 91 if (!parser.getName().equals(firstElementName)) { in beginDocument() 92 throw new XmlPullParserException("Unexpected start tag: found " + parser.getName() + in beginDocument() 100 public void start(XmlPullParser parser) throws XmlPullParserException, IOException { in start() argument 105 SignatureTest.beginDocument(parser, TAG_ROOT); in start() 109 while ((type=parser.next()) != XmlPullParser.START_TAG in start() 116 if (TAG_CLASS.equals(parser.getName()) in start() 117 || TAG_INTERFACE.equals(parser.getName())) { in start() 119 } else if (TAG_PACKAGE.equals(parser.getName())) { in start() [all …]
|
D | SimpleSignatureTest.java | 122 private void beginDocument(XmlPullParser parser, String firstElementName) in beginDocument() argument 125 while ((type=parser.next()) != XmlPullParser.START_TAG in beginDocument() 132 if (!parser.getName().equals(firstElementName)) { in beginDocument() 133 throw new XmlPullParserException("Unexpected start tag: found " + parser.getName() + in beginDocument() 141 private void start(XmlPullParser parser) throws XmlPullParserException, IOException { in start() argument 146 beginDocument(parser, TAG_ROOT); in start() 150 while ((type=parser.next()) != XmlPullParser.START_TAG in start() 157 if (TAG_CLASS.equals(parser.getName()) in start() 158 || TAG_INTERFACE.equals(parser.getName())) { in start() 160 } else if (TAG_PACKAGE.equals(parser.getName())) { in start() [all …]
|
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
D | PaintDrawableTest.java | 141 XmlResourceParser parser = getParser(); in testInflateTag() local 142 AttributeSet attr = getAtrributeSet(parser); in testInflateTag() 144 gotoTag(parser, "padding"); in testInflateTag() 153 assertTrue(paintDrawable.inflateTag("padding", getContext().getResources(), parser, attr)); in testInflateTag() 157 parser = getParser(); in testInflateTag() 158 attr = getAtrributeSet(parser); in testInflateTag() 160 assertFalse(new MyPaintDrawable().inflateTag("", getContext().getResources(), parser, in testInflateTag() 166 new MyPaintDrawable().inflateTag(null, getContext().getResources(), parser, attr); in testInflateTag() 174 gotoTag(parser, "padding"); in testInflateTag() 175 new MyPaintDrawable().inflateTag("padding", null, parser, attr); in testInflateTag() [all …]
|
D | LevelListDrawableTest.java | 139 XmlResourceParser parser = getResourceParser(R.xml.level_list_correct); in testInflate() local 142 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 154 parser = getResourceParser(R.xml.level_list_missing_item_minlevel_maxlevel); in testInflate() 155 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 163 parser = getResourceParser(R.xml.level_list_missing_item_drawable); in testInflate() 165 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 181 XmlResourceParser parser = getResourceParser(R.xml.level_list_correct); in testInflateWithNullParameters() local 183 mLevelListDrawable.inflate(null, parser, Xml.asAttributeSet(parser)); in testInflateWithNullParameters() 189 mLevelListDrawable.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateWithNullParameters() 195 mLevelListDrawable.inflate(mResources, parser, null); in testInflateWithNullParameters() [all …]
|
D | StateListDrawableTest.java | 202 XmlResourceParser parser = getResourceParser(R.xml.selector_correct); in testInflate() local 205 mStateListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 225 parser = getResourceParser(R.xml.selector_missing_selector_attrs); in testInflate() 226 mStateListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 242 parser = getResourceParser(R.xml.selector_missing_item_drawable); in testInflate() 244 mStateListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 260 XmlResourceParser parser = getResourceParser(R.xml.level_list_correct); in testInflateWithNullParameters() local 262 mStateListDrawable.inflate(null, parser, Xml.asAttributeSet(parser)); in testInflateWithNullParameters() 268 mStateListDrawable.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateWithNullParameters() 274 mStateListDrawable.inflate(mResources, parser, null); in testInflateWithNullParameters() [all …]
|
D | AnimationDrawableTest.java | 376 XmlResourceParser parser = getResourceParser(R.xml.anim_list_correct); in testInflate() local 377 mAnimationDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 389 parser = getResourceParser(R.xml.anim_list_missing_list_attrs); in testInflate() 390 mAnimationDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 406 parser = getResourceParser(R.xml.anim_list_missing_item_drawable); in testInflate() 408 mAnimationDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 425 XmlResourceParser parser = getResourceParser(R.drawable.animationdrawable); in testInflateWithNullParameters() local 427 mAnimationDrawable.inflate(null, parser, Xml.asAttributeSet(parser)); in testInflateWithNullParameters() 434 mAnimationDrawable.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateWithNullParameters() 441 mAnimationDrawable.inflate(mResources, parser, null); in testInflateWithNullParameters() [all …]
|
/cts/tools/tradefed-host/tests/src/com/android/cts/tradefed/result/ |
D | TestResultsTest.java | 55 TestResults parser = new TestResults(); in testParse_empty() local 56 parser.parse(new StringReader("<Empty/>")); in testParse_empty() 57 assertEquals(0, parser.getPackages().size()); in testParse_empty() 64 TestResults parser = new TestResults(); in testParse_package() local 65 parser.parse(new StringReader(TEST_PACKAGE_FULL)); in testParse_package() 66 assertEquals(1, parser.getPackages().size()); in testParse_package() 67 TestPackageResult pkg = parser.getPackages().iterator().next(); in testParse_package() 77 TestResults parser = new TestResults(); in testParse_corrupt() local 80 parser.parse(new StringReader(RESULT_START + TEST_PACKAGE_START + RESULT_END)); in testParse_corrupt() 91 TestResults parser = new TestResults(); in testParse_test() local [all …]
|
D | DeviceInfoResultTest.java | 44 void parse(XmlPullParser parser) throws XmlPullParserException, IOException { in setUp() 45 int eventType = parser.getEventType(); in setUp() 47 if (eventType == XmlPullParser.START_TAG && parser.getName().equals(TAG)) { in setUp() 48 super.parse(parser); in setUp() 51 eventType = parser.next(); in setUp()
|
/cts/tools/tradefed-host/src/com/android/cts/tradefed/result/ |
D | AbstractXmlPullParser.java | 44 XmlPullParser parser = fact.newPullParser(); in parse() local 45 parser.setInput (xmlReader); in parse() 46 parse(parser); in parse() 54 abstract void parse(XmlPullParser parser) throws XmlPullParserException, IOException; in parse() argument 63 protected int parseIntAttr(XmlPullParser parser, String name) { in parseIntAttr() argument 65 String value = parser.getAttributeValue(null, name); in parseIntAttr() 78 protected boolean parseBooleanAttr(XmlPullParser parser, String name) { in parseBooleanAttr() argument 79 String stringValue = parser.getAttributeValue(null, name); in parseBooleanAttr() 91 protected String getAttribute(XmlPullParser parser, String name) { in getAttribute() argument 92 return parser.getAttributeValue(null, name); in getAttribute()
|
D | TestSummaryXml.java | 99 void parse(XmlPullParser parser) throws XmlPullParserException, IOException { in parse() argument 100 int eventType = parser.getEventType(); in parse() 102 if (eventType == XmlPullParser.START_TAG && parser.getName().equals( in parse() 104 mPlan = getAttribute(parser, CtsXmlResultReporter.PLAN_ATTR); in parse() 105 } else if (eventType == XmlPullParser.START_TAG && parser.getName().equals( in parse() 107 mNumFailed = parseIntAttr(parser, TestResults.FAILED_ATTR) + in parse() 108 parseIntAttr(parser, TestResults.TIMEOUT_ATTR); in parse() 109 mNumNotExecuted = parseIntAttr(parser, TestResults.NOT_EXECUTED_ATTR); in parse() 110 mNumPassed = parseIntAttr(parser, TestResults.PASS_ATTR); in parse() 113 eventType = parser.next(); in parse()
|
D | DeviceInfoResult.java | 193 void parse(XmlPullParser parser) throws XmlPullParserException, IOException { in parse() argument 194 if (!parser.getName().equals(TAG)) { in parse() 196 "invalid XML: Expected %s tag but received %s", TAG, parser.getName())); in parse() 198 int eventType = parser.getEventType(); in parse() 201 if (parser.getName().equals(SCREEN_TAG) || in parse() 202 parser.getName().equals(PHONE_TAG) || in parse() 203 parser.getName().equals(BUILD_TAG)) { in parse() 204 addMetricsFromAttributes(parser); in parse() 205 } else if (parser.getName().equals(FEATURE_INFO_TAG)) { in parse() 208 mMetrics.put(DeviceInfoConstants.FEATURES, parseFeatures(parser)); in parse() [all …]
|
D | Test.java | 169 void parse(XmlPullParser parser) throws XmlPullParserException, IOException { in parse() argument 170 if (!parser.getName().equals(TAG)) { in parse() 172 "invalid XML: Expected %s tag but received %s", TAG, parser.getName())); in parse() 174 setName(getAttribute(parser, NAME_ATTR)); in parse() 175 mResult = CtsTestStatus.getStatus(getAttribute(parser, RESULT_ATTR)); in parse() 176 mStartTime = getAttribute(parser, STARTTIME_ATTR); in parse() 177 mEndTime = getAttribute(parser, ENDTIME_ATTR); in parse() 179 int eventType = parser.next(); in parse() 181 if (eventType == XmlPullParser.START_TAG && parser.getName().equals(SCENE_TAG)) { in parse() 182 mMessage = getAttribute(parser, MESSAGE_ATTR); in parse() [all …]
|
D | TestCase.java | 106 void parse(XmlPullParser parser) throws XmlPullParserException, IOException { in parse() argument 107 if (!parser.getName().equals(TAG)) { in parse() 109 "invalid XML: Expected %s tag but received %s", TAG, parser.getName())); in parse() 111 setName(getAttribute(parser, "name")); in parse() 112 int eventType = parser.next(); in parse() 114 if (eventType == XmlPullParser.START_TAG && parser.getName().equals(Test.TAG)) { in parse() 116 test.parse(parser); in parse() 118 } else if (eventType == XmlPullParser.END_TAG && parser.getName().equals(TAG)) { in parse() 121 eventType = parser.next(); in parse()
|
D | TestSuite.java | 162 void parse(XmlPullParser parser) throws XmlPullParserException, IOException { in parse() argument 163 if (!parser.getName().equals(TAG)) { in parse() 165 "invalid XML: Expected %s tag but received %s", TAG, parser.getName())); in parse() 167 setName(getAttribute(parser, "name")); in parse() 168 int eventType = parser.next(); in parse() 170 if (eventType == XmlPullParser.START_TAG && parser.getName().equals(TestSuite.TAG)) { in parse() 172 suite.parse(parser); in parse() 174 } else if (eventType == XmlPullParser.START_TAG && parser.getName().equals( in parse() 177 testCase.parse(parser); in parse() 179 } else if (eventType == XmlPullParser.END_TAG && parser.getName().equals(TAG)) { in parse() [all …]
|
D | TestPackageResult.java | 166 void parse(XmlPullParser parser) throws XmlPullParserException, IOException { in parse() argument 167 if (!parser.getName().equals(TAG)) { in parse() 169 "invalid XML: Expected %s tag but received %s", TAG, parser.getName())); in parse() 171 setAppPackageName(getAttribute(parser, APP_PACKAGE_NAME_ATTR)); in parse() 172 setName(getAttribute(parser, NAME_ATTR)); in parse() 173 setDigest(getAttribute(parser, DIGEST_ATTR)); in parse() 174 int eventType = parser.getEventType(); in parse() 176 if (eventType == XmlPullParser.START_TAG && parser.getName().equals(TestSuite.TAG)) { in parse() 178 suite.parse(parser); in parse() 181 if (eventType == XmlPullParser.END_TAG && parser.getName().equals(TAG)) { in parse() [all …]
|
D | TestResults.java | 60 void parse(XmlPullParser parser) throws XmlPullParserException, IOException { in parse() argument 61 int eventType = parser.getEventType(); in parse() 63 if (eventType == XmlPullParser.START_TAG && parser.getName().equals( in parse() 65 mDeviceInfo.parse(parser); in parse() 67 if (eventType == XmlPullParser.START_TAG && parser.getName().equals( in parse() 70 pkg.parse(parser); in parse() 77 eventType = parser.next(); in parse()
|
/cts/tools/tradefed-host/tests/src/com/android/cts/tradefed/testtype/ |
D | TestPackageXmlParserTest.java | 67 TestPackageXmlParser parser = new TestPackageXmlParser(); in testParse_instrPackage() local 68 parser.parse(getStringAsStream(INSTR_TEST_DATA)); in testParse_instrPackage() 69 TestPackageDef def = parser.getTestPackageDef(); in testParse_instrPackage() 79 TestPackageXmlParser parser = new TestPackageXmlParser(); in testParse_hostTest() local 80 parser.parse(getStringAsStream(HOST_TEST_DATA)); in testParse_hostTest() 81 TestPackageDef def = parser.getTestPackageDef(); in testParse_hostTest() 103 TestPackageXmlParser parser = new TestPackageXmlParser(); in testParse_badHostTest() local 104 parser.parse(getStringAsStream(BAD_HOST_TEST_DATA)); in testParse_badHostTest() 105 TestPackageDef def = parser.getTestPackageDef(); in testParse_badHostTest() 113 TestPackageXmlParser parser = new TestPackageXmlParser(); in testParse_noData() local [all …]
|
/cts/tools/signature-tools/test/signature/converter/dex/ |
D | GenericSignatureParserTest.java | 42 private GenericSignatureParser parser; field in GenericSignatureParserTest 48 parser = new GenericSignatureParser(new TypePool(), converter); in setupConverter() 58 parser.parseForClass(sigClass, DexUtil.getGenericSignature(dexClass)); in getGenericSignatureTest() 60 assertEquals(1, parser.formalTypeParameters.size()); in getGenericSignatureTest() 61 assertEquals("T", parser.formalTypeParameters.get(0).getName()); in getGenericSignatureTest() 63 assertSame(sigClass, parser.formalTypeParameters.get(0).getGenericDeclaration()); in getGenericSignatureTest() 65 assertEquals(1, parser.formalTypeParameters.get(0).getUpperBounds().size()); in getGenericSignatureTest()
|
/cts/tests/tests/view/src/android/view/cts/ |
D | LayoutInflaterTest.java | 160 XmlResourceParser parser = null; in getAttrs() local 168 parser = ai.loadXmlMetaData(mContext.getPackageManager(), in getAttrs() 171 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() 174 String nodeName = parser.getName(); in getAttrs() 178 int outerDepth = parser.getDepth(); in getAttrs() 179 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() 180 && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { in getAttrs() 184 nodeName = parser.getName(); in getAttrs() 186 attrs = Xml.asAttributeSet(parser); in getAttrs() 188 XmlUtils.skipCurrentTag(parser); in getAttrs() [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | TableLayout_LayoutParamsTest.java | 189 XmlResourceParser parser = null; in getAttrs() local 192 parser = mTargetContext.getResources() in getAttrs() 196 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() 199 String nodeName = parser.getName(); in getAttrs() 203 int outerDepth = parser.getDepth(); in getAttrs() 204 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() 205 && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { in getAttrs() 209 nodeName = parser.getName(); in getAttrs() 211 outerDepth = parser.getDepth(); in getAttrs() 212 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() [all …]
|
D | TableRow_LayoutParamsTest.java | 243 XmlResourceParser parser = null; in getAttrs() local 246 parser = mTargetContext.getResources() in getAttrs() 250 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() 253 String nodeName = parser.getName(); in getAttrs() 257 int outerDepth = parser.getDepth(); in getAttrs() 258 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() 259 && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { in getAttrs() 263 nodeName = parser.getName(); in getAttrs() 265 outerDepth = parser.getDepth(); in getAttrs() 266 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() [all …]
|
/cts/tests/tests/content/src/android/content/res/cts/ |
D | AssetManagerTest.java | 128 XmlResourceParser parser = mAssets.openXmlResourceParser("AndroidManifest.xml"); in testAssetOperations() local 129 assertNotNull(parser); in testAssetOperations() 130 XmlUtils.beginDocument(parser, "manifest"); in testAssetOperations() 131 parser = mAssets.openXmlResourceParser(0, "AndroidManifest.xml"); in testAssetOperations() 132 assertNotNull(parser); in testAssetOperations() 133 beginDocument(parser, "manifest"); in testAssetOperations() 186 private void beginDocument(final XmlPullParser parser,final String firstElementName) in beginDocument() argument 189 while ((type = parser.next()) != XmlPullParser.START_TAG) { in beginDocument() 194 assertEquals(firstElementName, parser.getName()); in beginDocument()
|
/cts/tests/src/android/widget/cts/ |
D | WidgetTestUtils.java | 80 public static final void beginDocument(XmlPullParser parser, String firstElementName) in beginDocument() argument 82 Assert.assertNotNull(parser); in beginDocument() 86 while ((type = parser.next()) != XmlPullParser.START_TAG in beginDocument() 91 if (!parser.getName().equals(firstElementName)) { in beginDocument() 92 throw new XmlPullParserException("Unexpected start tag: found " + parser.getName() in beginDocument()
|
/cts/tools/dex-tools/ |
D | README.txt | 3 This project contains the source code and tests for a dex file parser. 4 The parser is able to read a dex file and to create a datastructure based on it. 18 doc : dex file spec on which this parser is based 20 src : sourcecode of the parser
|