/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/tests/graphics/src/android/graphics/drawable/cts/ |
D | PaintDrawableTest.java | 105 XmlResourceParser parser = getParser(); in testInflateTag() local 106 AttributeSet attr = getAtrributeSet(parser); in testInflateTag() 108 gotoTag(parser, "padding"); in testInflateTag() 117 assertTrue(paintDrawable.inflateTag("padding", getContext().getResources(), parser, attr)); in testInflateTag() 121 parser = getParser(); in testInflateTag() 122 attr = getAtrributeSet(parser); in testInflateTag() 124 assertFalse(new MyPaintDrawable().inflateTag("", getContext().getResources(), parser, in testInflateTag() 130 new MyPaintDrawable().inflateTag(null, getContext().getResources(), parser, attr); in testInflateTag() 138 gotoTag(parser, "padding"); in testInflateTag() 139 new MyPaintDrawable().inflateTag("padding", null, parser, attr); in testInflateTag() [all …]
|
D | LevelListDrawableTest.java | 113 XmlResourceParser parser = getResourceParser(R.xml.level_list_correct); in testInflate() local 116 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 128 parser = getResourceParser(R.xml.level_list_missing_item_minlevel_maxlevel); in testInflate() 129 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 137 parser = getResourceParser(R.xml.level_list_missing_item_drawable); in testInflate() 139 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 146 XmlResourceParser parser = getResourceParser(R.xml.level_list_correct); in testInflateWithNullParameters() local 148 mLevelListDrawable.inflate(null, parser, Xml.asAttributeSet(parser)); in testInflateWithNullParameters() 154 mLevelListDrawable.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateWithNullParameters() 160 mLevelListDrawable.inflate(mResources, parser, null); in testInflateWithNullParameters() [all …]
|
D | StateListDrawableTest.java | 157 XmlResourceParser parser = getResourceParser(R.xml.selector_correct); in testInflate() local 160 mStateListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 180 parser = getResourceParser(R.xml.selector_missing_selector_attrs); in testInflate() 181 mStateListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 197 parser = getResourceParser(R.xml.selector_missing_item_drawable); in testInflate() 199 mStateListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 206 XmlResourceParser parser = getResourceParser(R.xml.level_list_correct); in testInflateWithNullParameters() local 208 mStateListDrawable.inflate(null, parser, Xml.asAttributeSet(parser)); in testInflateWithNullParameters() 214 mStateListDrawable.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateWithNullParameters() 220 mStateListDrawable.inflate(mResources, parser, null); in testInflateWithNullParameters() [all …]
|
D | AnimationDrawableTest.java | 285 XmlResourceParser parser = getResourceParser(R.xml.anim_list_correct); in testInflate() local 286 mAnimationDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 298 parser = getResourceParser(R.xml.anim_list_missing_list_attrs); in testInflate() 299 mAnimationDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 315 parser = getResourceParser(R.xml.anim_list_missing_item_drawable); in testInflate() 317 mAnimationDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 325 XmlResourceParser parser = getResourceParser(R.drawable.animationdrawable); in testInflateWithNullParameters() local 327 mAnimationDrawable.inflate(null, parser, Xml.asAttributeSet(parser)); in testInflateWithNullParameters() 334 mAnimationDrawable.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateWithNullParameters() 341 mAnimationDrawable.inflate(mResources, parser, null); in testInflateWithNullParameters() [all …]
|
/cts/tests/SignatureTest/src/android/tests/sigtest/ |
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 …]
|
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 …]
|
/cts/tools/tradefed-host/tests/src/com/android/cts/tradefed/testtype/ |
D | TestPackageXmlParserTest.java | 71 TestPackageXmlParser parser = new TestPackageXmlParser(true); in testParse_instrPackage() local 72 parser.parse(getStringAsStream(INSTR_TEST_DATA)); in testParse_instrPackage() 73 TestPackageDef def = parser.getTestPackageDef(); in testParse_instrPackage() 83 TestPackageXmlParser parser = new TestPackageXmlParser(true); in testParse_hostTest() local 84 parser.parse(getStringAsStream(HOST_TEST_DATA)); in testParse_hostTest() 85 TestPackageDef def = parser.getTestPackageDef(); in testParse_hostTest() 106 TestPackageXmlParser parser = new TestPackageXmlParser(false); in testParse_hostTest_noKnownFailures() local 107 parser.parse(getStringAsStream(HOST_TEST_DATA)); in testParse_hostTest_noKnownFailures() 108 TestPackageDef def = parser.getTestPackageDef(); in testParse_hostTest_noKnownFailures() 128 TestPackageXmlParser parser = new TestPackageXmlParser(true); in testParse_badHostTest() local [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 …]
|
/cts/tools/tradefed-host/src/com/android/cts/tradefed/result/ |
D | TestSummaryXml.java | 103 void parse(XmlPullParser parser) throws XmlPullParserException, IOException { in parse() argument 104 int eventType = parser.getEventType(); in parse() 106 if (eventType == XmlPullParser.START_TAG && parser.getName().equals( in parse() 108 mPlan = getAttribute(parser, CtsXmlResultReporter.PLAN_ATTR); in parse() 109 mStartTime = getAttribute(parser, CtsXmlResultReporter.STARTTIME_ATTR); in parse() 110 } else if (eventType == XmlPullParser.START_TAG && parser.getName().equals( in parse() 112 mDeviceSerials = getAttribute(parser, DeviceInfoConstants.SERIAL_NUMBER); in parse() 113 } else if (eventType == XmlPullParser.START_TAG && parser.getName().equals( in parse() 115 mNumFailed = parseIntAttr(parser, TestResults.FAILED_ATTR) + in parse() 116 parseIntAttr(parser, TestResults.TIMEOUT_ATTR); in parse() [all …]
|
D | DeviceInfoResult.java | 210 void parse(XmlPullParser parser) throws XmlPullParserException, IOException { in parse() argument 211 if (!parser.getName().equals(TAG)) { in parse() 213 "invalid XML: Expected %s tag but received %s", TAG, parser.getName())); in parse() 215 int eventType = parser.getEventType(); in parse() 218 if (parser.getName().equals(SCREEN_TAG) || in parse() 219 parser.getName().equals(PHONE_TAG) || in parse() 220 parser.getName().equals(BUILD_TAG)) { in parse() 221 addMetricsFromAttributes(parser); in parse() 222 } else if (parser.getName().equals(FEATURE_INFO_TAG)) { in parse() 223 mMetrics.put(DeviceInfoConstants.FEATURES, parseFeatures(parser)); in parse() [all …]
|
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 | Test.java | 199 void parse(XmlPullParser parser) throws XmlPullParserException, IOException { in parse() argument 200 if (!parser.getName().equals(TAG)) { in parse() 202 "invalid XML: Expected %s tag but received %s", TAG, parser.getName())); in parse() 204 setName(getAttribute(parser, NAME_ATTR)); in parse() 205 mResult = CtsTestStatus.getStatus(getAttribute(parser, RESULT_ATTR)); in parse() 206 mStartTime = getAttribute(parser, STARTTIME_ATTR); in parse() 207 mEndTime = getAttribute(parser, ENDTIME_ATTR); in parse() 209 int eventType = parser.next(); in parse() 211 if (eventType == XmlPullParser.START_TAG && parser.getName().equals(SCENE_TAG)) { in parse() 212 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/tests/tests/view/src/android/view/cts/ |
D | LayoutInflaterTest.java | 97 XmlResourceParser parser = null; in getAttrs() local 105 parser = ai.loadXmlMetaData(mContext.getPackageManager(), in getAttrs() 108 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() 111 String nodeName = parser.getName(); in getAttrs() 115 int outerDepth = parser.getDepth(); in getAttrs() 116 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() 117 && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { in getAttrs() 121 nodeName = parser.getName(); in getAttrs() 123 attrs = Xml.asAttributeSet(parser); in getAttrs() 125 XmlUtils.skipCurrentTag(parser); in getAttrs() [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/widget/src/android/widget/cts/ |
D | TableLayout_LayoutParamsTest.java | 138 XmlResourceParser parser = null; in getAttrs() local 141 parser = mTargetContext.getResources() in getAttrs() 145 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() 148 String nodeName = parser.getName(); in getAttrs() 152 int outerDepth = parser.getDepth(); in getAttrs() 153 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() 154 && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { in getAttrs() 158 nodeName = parser.getName(); in getAttrs() 160 outerDepth = parser.getDepth(); in getAttrs() 161 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() [all …]
|
D | TableRow_LayoutParamsTest.java | 185 XmlResourceParser parser = null; in getAttrs() local 188 parser = mTargetContext.getResources() in getAttrs() 192 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() 195 String nodeName = parser.getName(); in getAttrs() 199 int outerDepth = parser.getDepth(); in getAttrs() 200 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() 201 && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { in getAttrs() 205 nodeName = parser.getName(); in getAttrs() 207 outerDepth = parser.getDepth(); in getAttrs() 208 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs() [all …]
|
/cts/tests/tests/content/src/android/content/res/cts/ |
D | AssetManagerTest.java | 69 XmlResourceParser parser = mAssets.openXmlResourceParser("AndroidManifest.xml"); in testAssetOperations() local 70 assertNotNull(parser); in testAssetOperations() 71 XmlUtils.beginDocument(parser, "manifest"); in testAssetOperations() 72 parser = mAssets.openXmlResourceParser(0, "AndroidManifest.xml"); in testAssetOperations() 73 assertNotNull(parser); in testAssetOperations() 74 beginDocument(parser, "manifest"); in testAssetOperations() 127 private void beginDocument(final XmlPullParser parser,final String firstElementName) in beginDocument() argument 130 while ((type = parser.next()) != XmlPullParser.START_TAG) { in beginDocument() 135 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/signature-tools/src/signature/converter/dex/ |
D | DexToSigConverter.java | 312 GenericSignatureParser parser = new GenericSignatureParser(factory, in convertClass() local 314 parser.parseForClass(sigClass, getGenericSignature(dexClass)); in convertClass() 315 sigClass.setTypeParameters(parser.formalTypeParameters); in convertClass() 320 sigClass.setSuperClass(parser.superclassType); in convertClass() 324 parser.interfaceTypes)); in convertClass() 489 GenericSignatureParser parser = new GenericSignatureParser(factory, in convertAnnotationField() local 491 annotationField.setType(parser.parseNonGenericType(dexMethod in convertAnnotationField() 534 GenericSignatureParser parser = new GenericSignatureParser(factory, in convertField() local 541 parser.parseForField(factory.getClass(declaringClassPackageName, in convertField() 543 field.setType(parser.fieldType); in convertField() [all …]
|
/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
|