forked from upstream-mirrors/OpenTracks
merge heads
This commit is contained in:
-16
@@ -1,16 +0,0 @@
|
|||||||
package com.google.android.apps.mytracks.endtoendtest.others;
|
|
||||||
|
|
||||||
public class BigTestUtils {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set to false as default. True to run the test. Default to false since this
|
|
||||||
* test can take a long time.
|
|
||||||
*/
|
|
||||||
public static boolean runStressTest = true;
|
|
||||||
public static boolean runSensorTest = true;
|
|
||||||
|
|
||||||
|
|
||||||
protected static final String DISABLE_MESSAGE = "This test is disabled";
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||||
|
<classpathentry kind="src" path=".apt_generated">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry combineaccessrules="false" kind="src" path="/MyTracks"/>
|
||||||
|
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="src" path="gen"/>
|
||||||
|
<classpathentry kind="output" path="bin/classes"/>
|
||||||
|
</classpath>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<factorypath>
|
||||||
|
<factorypathentry kind="WKSPJAR" id="/MyTracksTest/libs/AndroidMockGenerator.jar" enabled="true" runInBatchMode="false"/>
|
||||||
|
<factorypathentry kind="VARJAR" id="ANDROID_SDK/platforms/android-17/android.jar" enabled="true" runInBatchMode="false"/>
|
||||||
|
<factorypathentry kind="WKSPJAR" id="/MyTracksLib/bin/mytrackslib.jar" enabled="true" runInBatchMode="false"/>
|
||||||
|
<factorypathentry kind="VARJAR" id="MYTRACKS_BIN/classes" enabled="true" runInBatchMode="false"/>
|
||||||
|
</factorypath>
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>MyTracksTest_E2E</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
<project>MyTracks</project>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#Tue Oct 25 14:08:44 PDT 2011
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.apt.aptEnabled=true
|
||||||
|
org.eclipse.jdt.apt.genSrcDir=.apt_generated
|
||||||
|
org.eclipse.jdt.apt.processorOptions/bin_dir=%PROJECT.DIR%/bin/classes
|
||||||
|
org.eclipse.jdt.apt.processorOptions/logfile=%PROJECT.DIR%/AnnotationProcessor.log
|
||||||
|
org.eclipse.jdt.apt.reconcileEnabled=false
|
||||||
@@ -0,0 +1,409 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||||
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
|
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||||
|
org.eclipse.jdt.core.compiler.processAnnotations=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.6
|
||||||
|
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=1585
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field.count_dependent=1585|-1|1585
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=1585
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable.count_dependent=1585|-1|1585
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=1585
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method.count_dependent=1585|-1|1585
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=1585
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package.count_dependent=1585|-1|1585
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=1040
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter.count_dependent=1040|-1|1040
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=1585
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type.count_dependent=1585|-1|1585
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=48
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_binary_expression.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=48
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_enum_constants.count_dependent=0|-1|0
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_field_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_for_statement=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_local_variable_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_new_anonymous_class=0
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=48
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration.count_dependent=16|-1|16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_header=false
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_html=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_source_code=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
|
||||||
|
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.comment.line_length=80
|
||||||
|
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
|
||||||
|
org.eclipse.jdt.core.formatter.comment_new_line_at_start_of_html_paragraph=true
|
||||||
|
org.eclipse.jdt.core.formatter.compact_else_if=true
|
||||||
|
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||||
|
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||||
|
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
|
||||||
|
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
|
||||||
|
org.eclipse.jdt.core.formatter.force_if_else_statement_brace=false
|
||||||
|
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||||
|
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_empty_lines=false
|
||||||
|
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
|
||||||
|
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comment_prefix=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.join_lines_in_comments=true
|
||||||
|
org.eclipse.jdt.core.formatter.join_wrapped_lines=true
|
||||||
|
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
|
||||||
|
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
|
||||||
|
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
|
||||||
|
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||||
|
org.eclipse.jdt.core.formatter.lineSplit=100
|
||||||
|
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
|
||||||
|
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||||
|
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||||
|
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||||
|
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
||||||
|
org.eclipse.jdt.core.formatter.sort_local_variable_annotations=false
|
||||||
|
org.eclipse.jdt.core.formatter.sort_member_annotations=false
|
||||||
|
org.eclipse.jdt.core.formatter.sort_package_annotations=false
|
||||||
|
org.eclipse.jdt.core.formatter.sort_parameter_annotations=false
|
||||||
|
org.eclipse.jdt.core.formatter.sort_type_annotations=false
|
||||||
|
org.eclipse.jdt.core.formatter.tabulation.char=space
|
||||||
|
org.eclipse.jdt.core.formatter.tabulation.size=2
|
||||||
|
org.eclipse.jdt.core.formatter.use_on_off_tags=false
|
||||||
|
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_comment_inline_tags=false
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_non_simple_local_variable_annotation=true
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_non_simple_member_annotation=true
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_non_simple_package_annotation=true
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_non_simple_parameter_annotation=false
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_non_simple_type_annotation=true
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_prefer_two_fragments=false
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
|
||||||
|
formatter_profile=_My Tracks
|
||||||
|
formatter_settings_version=13
|
||||||
|
org.eclipse.jdt.ui.ignorelowercasenames=true
|
||||||
|
org.eclipse.jdt.ui.importorder=com;android;java;javax;org;
|
||||||
|
org.eclipse.jdt.ui.ondemandthreshold=99
|
||||||
|
org.eclipse.jdt.ui.staticondemandthreshold=99
|
||||||
|
sp_cleanup.add_default_serial_version_id=true
|
||||||
|
sp_cleanup.add_generated_serial_version_id=false
|
||||||
|
sp_cleanup.add_missing_annotations=true
|
||||||
|
sp_cleanup.add_missing_deprecated_annotations=true
|
||||||
|
sp_cleanup.add_missing_methods=false
|
||||||
|
sp_cleanup.add_missing_nls_tags=false
|
||||||
|
sp_cleanup.add_missing_override_annotations=true
|
||||||
|
sp_cleanup.add_missing_override_annotations_interface_methods=true
|
||||||
|
sp_cleanup.add_serial_version_id=false
|
||||||
|
sp_cleanup.always_use_blocks=true
|
||||||
|
sp_cleanup.always_use_parentheses_in_expressions=false
|
||||||
|
sp_cleanup.always_use_this_for_non_static_field_access=false
|
||||||
|
sp_cleanup.always_use_this_for_non_static_method_access=false
|
||||||
|
sp_cleanup.convert_to_enhanced_for_loop=false
|
||||||
|
sp_cleanup.correct_indentation=false
|
||||||
|
sp_cleanup.format_source_code=false
|
||||||
|
sp_cleanup.format_source_code_changes_only=false
|
||||||
|
sp_cleanup.make_local_variable_final=false
|
||||||
|
sp_cleanup.make_parameters_final=false
|
||||||
|
sp_cleanup.make_private_fields_final=true
|
||||||
|
sp_cleanup.make_type_abstract_if_missing_method=false
|
||||||
|
sp_cleanup.make_variable_declarations_final=true
|
||||||
|
sp_cleanup.never_use_blocks=false
|
||||||
|
sp_cleanup.never_use_parentheses_in_expressions=true
|
||||||
|
sp_cleanup.on_save_use_additional_actions=false
|
||||||
|
sp_cleanup.organize_imports=true
|
||||||
|
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
|
||||||
|
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
|
||||||
|
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
|
||||||
|
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
|
||||||
|
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
|
||||||
|
sp_cleanup.remove_private_constructors=true
|
||||||
|
sp_cleanup.remove_trailing_whitespaces=false
|
||||||
|
sp_cleanup.remove_trailing_whitespaces_all=true
|
||||||
|
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
|
||||||
|
sp_cleanup.remove_unnecessary_casts=true
|
||||||
|
sp_cleanup.remove_unnecessary_nls_tags=false
|
||||||
|
sp_cleanup.remove_unused_imports=false
|
||||||
|
sp_cleanup.remove_unused_local_variables=false
|
||||||
|
sp_cleanup.remove_unused_private_fields=true
|
||||||
|
sp_cleanup.remove_unused_private_members=false
|
||||||
|
sp_cleanup.remove_unused_private_methods=true
|
||||||
|
sp_cleanup.remove_unused_private_types=true
|
||||||
|
sp_cleanup.sort_members=false
|
||||||
|
sp_cleanup.sort_members_all=false
|
||||||
|
sp_cleanup.use_blocks=false
|
||||||
|
sp_cleanup.use_blocks_only_for_return_and_throw=false
|
||||||
|
sp_cleanup.use_parentheses_in_expressions=false
|
||||||
|
sp_cleanup.use_this_for_non_static_field_access=false
|
||||||
|
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
|
||||||
|
sp_cleanup.use_this_for_non_static_method_access=false
|
||||||
|
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2012 Google Inc.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.google.android.maps.mytracks.e2etest"
|
||||||
|
android:versionCode="1"
|
||||||
|
android:versionName="1.0" >
|
||||||
|
|
||||||
|
<instrumentation
|
||||||
|
android:name="android.test.InstrumentationTestRunner"
|
||||||
|
android:targetPackage="com.google.android.maps.mytracks" />
|
||||||
|
|
||||||
|
<instrumentation
|
||||||
|
android:name="com.google.android.apps.mytracks.endtoendtest.EndToEndTestRunner"
|
||||||
|
android:targetPackage="com.google.android.maps.mytracks" />
|
||||||
|
|
||||||
|
<uses-sdk
|
||||||
|
android:minSdkVersion="8"
|
||||||
|
android:targetSdkVersion="17" />
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:label="My Tracks Endtoend Tests" >
|
||||||
|
<uses-library android:name="android.test.runner" />
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<launchConfiguration type="com.android.ide.eclipse.adt.junit.launchConfigurationType">
|
||||||
|
<stringAttribute key="com.android.ide.eclipse.adt.commandline" value=""/>
|
||||||
|
<intAttribute key="com.android.ide.eclipse.adt.delay" value="0"/>
|
||||||
|
<stringAttribute key="com.android.ide.eclipse.adt.instrumentation" value="android.test.InstrumentationTestRunner"/>
|
||||||
|
<booleanAttribute key="com.android.ide.eclipse.adt.nobootanim" value="true"/>
|
||||||
|
<intAttribute key="com.android.ide.eclipse.adt.speed" value="0"/>
|
||||||
|
<booleanAttribute key="com.android.ide.eclipse.adt.target" value="true"/>
|
||||||
|
<booleanAttribute key="com.android.ide.eclipse.adt.wipedata" value="false"/>
|
||||||
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||||
|
<listEntry value="/MyTracksTests"/>
|
||||||
|
</listAttribute>
|
||||||
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||||
|
<listEntry value="4"/>
|
||||||
|
</listAttribute>
|
||||||
|
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||||
|
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||||
|
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||||
|
</listAttribute>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=MyTracksTests"/>
|
||||||
|
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="MyTracksTests"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value=""/>
|
||||||
|
</launchConfiguration>
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<lint>
|
||||||
|
</lint>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# This file is automatically generated by Android Tools.
|
||||||
|
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||||
|
#
|
||||||
|
# This file must be checked in Version Control Systems.
|
||||||
|
#
|
||||||
|
# To customize properties used by the Ant build system use,
|
||||||
|
# "ant.properties", and override values to adapt the script to your
|
||||||
|
# project structure.
|
||||||
|
|
||||||
|
# Indicates whether an apk should be generated for each density.
|
||||||
|
split.density=false
|
||||||
|
# Project target.
|
||||||
|
target=android-17
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
This hidden file is here to ensure there is a res folder.
|
||||||
+7
@@ -57,6 +57,13 @@ public class EndToEndTestRunner extends InstrumentationTestRunner {
|
|||||||
BigTestUtils.runSensorTest = false;
|
BigTestUtils.runSensorTest = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String isResourceUsageTest = arguments.getString("resource");
|
||||||
|
if (isResourceUsageTest != null && isResourceUsageTest.equalsIgnoreCase("true")) {
|
||||||
|
BigTestUtils.runResourceUsageTest = true;
|
||||||
|
} else {
|
||||||
|
BigTestUtils.runResourceUsageTest = false;
|
||||||
|
}
|
||||||
|
|
||||||
Log.d(EndToEndTestUtils.LOG_TAG, "Use port number when run test on emulator:"
|
Log.d(EndToEndTestUtils.LOG_TAG, "Use port number when run test on emulator:"
|
||||||
+ EndToEndTestUtils.emulatorPort);
|
+ EndToEndTestUtils.emulatorPort);
|
||||||
Log.i(EndToEndTestUtils.LOG_TAG, "Run stress test:" + BigTestUtils.runStressTest);
|
Log.i(EndToEndTestUtils.LOG_TAG, "Run stress test:" + BigTestUtils.runStressTest);
|
||||||
+71
-44
@@ -61,7 +61,6 @@ public class EndToEndTestUtils {
|
|||||||
private static final int ORIENTATION_PORTRAIT = 1;
|
private static final int ORIENTATION_PORTRAIT = 1;
|
||||||
private static final int ORIENTATION_LANDSCAPE = 0;
|
private static final int ORIENTATION_LANDSCAPE = 0;
|
||||||
// Pause 200ms between each send.
|
// Pause 200ms between each send.
|
||||||
private static final int PAUSE_DEFAULT = 200;
|
|
||||||
static final double START_LONGITUDE = 51;
|
static final double START_LONGITUDE = 51;
|
||||||
static final double START_LATITUDE = -1.3f;
|
static final double START_LATITUDE = -1.3f;
|
||||||
static final double DELTA_LONGITUDE = 0.0005f;
|
static final double DELTA_LONGITUDE = 0.0005f;
|
||||||
@@ -72,7 +71,6 @@ public class EndToEndTestUtils {
|
|||||||
private static final String MOREOPTION_CLASSNAME = "com.android.internal.view.menu.ActionMenuPresenter$OverflowMenuButton";
|
private static final String MOREOPTION_CLASSNAME = "com.android.internal.view.menu.ActionMenuPresenter$OverflowMenuButton";
|
||||||
private static final String MENUITEM_CLASSNAME = "com.android.internal.view.menu.IconMenuItemView";
|
private static final String MENUITEM_CLASSNAME = "com.android.internal.view.menu.IconMenuItemView";
|
||||||
|
|
||||||
|
|
||||||
static final String DEFAULTACTIVITYTYPE = "TestActivity";
|
static final String DEFAULTACTIVITYTYPE = "TestActivity";
|
||||||
public static String activityType = DEFAULTACTIVITYTYPE;
|
public static String activityType = DEFAULTACTIVITYTYPE;
|
||||||
static final String TRACK_NAME_PREFIX = "testTrackName";
|
static final String TRACK_NAME_PREFIX = "testTrackName";
|
||||||
@@ -92,11 +90,12 @@ public class EndToEndTestUtils {
|
|||||||
public static String KM = "";
|
public static String KM = "";
|
||||||
public static String MILE = "";
|
public static String MILE = "";
|
||||||
|
|
||||||
public static int VERY_SHORT_WAIT_TIME = 500;
|
public static final int TINY_WAIT_TIME = 200;
|
||||||
public static int SHORT_WAIT_TIME = 2000;
|
public static final int VERY_SHORT_WAIT_TIME = 500;
|
||||||
public static int NORMAL_WAIT_TIME = 8000;
|
public static final int SHORT_WAIT_TIME = 2000;
|
||||||
public static int LONG_WAIT_TIME = 15000;
|
public static final int NORMAL_WAIT_TIME = 8000;
|
||||||
public static int SUPER_LONG_WAIT_TIME = 100000;
|
public static final int LONG_WAIT_TIME = 15000;
|
||||||
|
public static final int SUPER_LONG_WAIT_TIME = 100000;
|
||||||
|
|
||||||
public static String deviceLanguage = "";
|
public static String deviceLanguage = "";
|
||||||
|
|
||||||
@@ -139,14 +138,14 @@ public class EndToEndTestUtils {
|
|||||||
*/
|
*/
|
||||||
private static void checkLanguage() {
|
private static void checkLanguage() {
|
||||||
Locale locale = null;
|
Locale locale = null;
|
||||||
Configuration config=null;
|
Configuration config = null;
|
||||||
config = activityMytracks.getBaseContext().getResources().getConfiguration();
|
config = activityMytracks.getBaseContext().getResources().getConfiguration();
|
||||||
locale = new Locale("en");
|
locale = new Locale("en");
|
||||||
Locale.setDefault(locale);
|
Locale.setDefault(locale);
|
||||||
config.locale = locale;
|
config.locale = locale;
|
||||||
|
|
||||||
|
deviceLanguage = instrumentation.getContext().getResources().getConfiguration().locale
|
||||||
deviceLanguage = instrumentation.getContext().getResources().getConfiguration().locale.getLanguage();
|
.getLanguage();
|
||||||
if (RELATIVE_STARTTIME_POSTFIX_MULTILINGUAL.get(deviceLanguage) != null) {
|
if (RELATIVE_STARTTIME_POSTFIX_MULTILINGUAL.get(deviceLanguage) != null) {
|
||||||
RELATIVE_STARTTIME_POSTFIX = RELATIVE_STARTTIME_POSTFIX_MULTILINGUAL.get(deviceLanguage);
|
RELATIVE_STARTTIME_POSTFIX = RELATIVE_STARTTIME_POSTFIX_MULTILINGUAL.get(deviceLanguage);
|
||||||
KM = KM_MULTILINGUAL.get(deviceLanguage);
|
KM = KM_MULTILINGUAL.get(deviceLanguage);
|
||||||
@@ -170,7 +169,7 @@ public class EndToEndTestUtils {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pauseInterval = PAUSE_DEFAULT;
|
int pauseInterval = TINY_WAIT_TIME;
|
||||||
if (pause != -1) {
|
if (pause != -1) {
|
||||||
pauseInterval = pause;
|
pauseInterval = pause;
|
||||||
}
|
}
|
||||||
@@ -235,8 +234,8 @@ public class EndToEndTestUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the Google Play Services need update.
|
* Checks whether the Google Play Services need update.
|
||||||
*/
|
*/
|
||||||
private static boolean isGooglePlayServicesLatest() {
|
private static boolean isGooglePlayServicesLatest() {
|
||||||
return findTextView("Google Play services") == null;
|
return findTextView("Google Play services") == null;
|
||||||
}
|
}
|
||||||
@@ -285,8 +284,7 @@ public class EndToEndTestUtils {
|
|||||||
Log.e(LOG_TAG, "Need update Google Play Services");
|
Log.e(LOG_TAG, "Need update Google Play Services");
|
||||||
}
|
}
|
||||||
setIsEmulator();
|
setIsEmulator();
|
||||||
if ((getButtonOnScreen(activityMytracks.getString(R.string.eula_accept),
|
if ((getButtonOnScreen(activityMytracks.getString(R.string.eula_accept), false, false) != null)) {
|
||||||
false, false) != null)) {
|
|
||||||
verifyFirstLaunch();
|
verifyFirstLaunch();
|
||||||
} else if (SOLO.waitForText(
|
} else if (SOLO.waitForText(
|
||||||
// After reset setting, welcome page will show again.
|
// After reset setting, welcome page will show again.
|
||||||
@@ -302,9 +300,8 @@ public class EndToEndTestUtils {
|
|||||||
instrumentation.waitForIdleSync();
|
instrumentation.waitForIdleSync();
|
||||||
// Check the status of real phone. For emulator, we would fix GPS signal.
|
// Check the status of real phone. For emulator, we would fix GPS signal.
|
||||||
if (!isEmulator) {
|
if (!isEmulator) {
|
||||||
GoToMyLocationTest.findAndClickMyLocation(activityMyTracks);
|
EndToEndTestUtils.findAndClickMyLocation(activityMyTracks);
|
||||||
hasGpsSingal = !SOLO.waitForText(NO_GPS_MESSAGE_PREFIX, 1,
|
hasGpsSingal = !SOLO.waitForText(NO_GPS_MESSAGE_PREFIX, 1, SHORT_WAIT_TIME);
|
||||||
SHORT_WAIT_TIME);
|
|
||||||
SOLO.goBack();
|
SOLO.goBack();
|
||||||
}
|
}
|
||||||
} else if (SOLO.waitForText(
|
} else if (SOLO.waitForText(
|
||||||
@@ -330,7 +327,6 @@ public class EndToEndTestUtils {
|
|||||||
instrumentation.waitForIdleSync();
|
instrumentation.waitForIdleSync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rotates the given activity.
|
* Rotates the given activity.
|
||||||
*
|
*
|
||||||
@@ -380,7 +376,8 @@ public class EndToEndTestUtils {
|
|||||||
/**
|
/**
|
||||||
* Creates a track which contains pause during recording.
|
* Creates a track which contains pause during recording.
|
||||||
*
|
*
|
||||||
* @param numberOfGpsData number of simulated Gps data before pause and after resume
|
* @param numberOfGpsData number of simulated Gps data before pause and after
|
||||||
|
* resume
|
||||||
*/
|
*/
|
||||||
public static void createTrackWithPause(int numberOfGpsData) {
|
public static void createTrackWithPause(int numberOfGpsData) {
|
||||||
startRecording();
|
startRecording();
|
||||||
@@ -391,7 +388,6 @@ public class EndToEndTestUtils {
|
|||||||
stopRecording(true);
|
stopRecording(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if there is no track in track list. For some tests need at least one
|
* Checks if there is no track in track list. For some tests need at least one
|
||||||
* track, the method can save time to create a new track.
|
* track, the method can save time to create a new track.
|
||||||
@@ -400,13 +396,18 @@ public class EndToEndTestUtils {
|
|||||||
* @return return true if the track list is empty
|
* @return return true if the track list is empty
|
||||||
*/
|
*/
|
||||||
public static boolean isTrackListEmpty(boolean isClick) {
|
public static boolean isTrackListEmpty(boolean isClick) {
|
||||||
|
instrumentation.waitForIdleSync();
|
||||||
int trackNumber = SOLO.getCurrentListViews().get(0).getCount();
|
int trackNumber = SOLO.getCurrentListViews().get(0).getCount();
|
||||||
if (trackNumber <= 0) {
|
if (trackNumber <= 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (isClick) {
|
View oneTrack = SOLO.getCurrentListViews().get(0).getChildAt(0);
|
||||||
View oneTrack = SOLO.getCurrentListViews().get(0).getChildAt(0);
|
View aa = oneTrack.findViewById(R.id.list_item_name);
|
||||||
|
if (aa != null) {
|
||||||
trackName = (String) ((TextView) oneTrack.findViewById(R.id.list_item_name)).getText();
|
trackName = (String) ((TextView) oneTrack.findViewById(R.id.list_item_name)).getText();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isClick) {
|
||||||
SOLO.scrollUp();
|
SOLO.scrollUp();
|
||||||
SOLO.clickOnView(oneTrack);
|
SOLO.clickOnView(oneTrack);
|
||||||
}
|
}
|
||||||
@@ -432,7 +433,7 @@ public class EndToEndTestUtils {
|
|||||||
*/
|
*/
|
||||||
public static void startRecording() {
|
public static void startRecording() {
|
||||||
View startButton = SOLO.getCurrentActivity().findViewById(R.id.track_controller_record);
|
View startButton = SOLO.getCurrentActivity().findViewById(R.id.track_controller_record);
|
||||||
if(startButton != null && startButton.isShown()) {
|
if (startButton != null && startButton.isShown()) {
|
||||||
SOLO.clickOnView(startButton);
|
SOLO.clickOnView(startButton);
|
||||||
}
|
}
|
||||||
instrumentation.waitForIdleSync();
|
instrumentation.waitForIdleSync();
|
||||||
@@ -443,7 +444,7 @@ public class EndToEndTestUtils {
|
|||||||
*/
|
*/
|
||||||
public static void pauseRecording() {
|
public static void pauseRecording() {
|
||||||
View pauseButton = SOLO.getCurrentActivity().findViewById(R.id.track_controller_record);
|
View pauseButton = SOLO.getCurrentActivity().findViewById(R.id.track_controller_record);
|
||||||
if(pauseButton != null && pauseButton.isShown()) {
|
if (pauseButton != null && pauseButton.isShown()) {
|
||||||
SOLO.clickOnView(pauseButton);
|
SOLO.clickOnView(pauseButton);
|
||||||
}
|
}
|
||||||
instrumentation.waitForIdleSync();
|
instrumentation.waitForIdleSync();
|
||||||
@@ -454,7 +455,7 @@ public class EndToEndTestUtils {
|
|||||||
*/
|
*/
|
||||||
public static void resumeRecording() {
|
public static void resumeRecording() {
|
||||||
View startButton = SOLO.getCurrentActivity().findViewById(R.id.track_controller_record);
|
View startButton = SOLO.getCurrentActivity().findViewById(R.id.track_controller_record);
|
||||||
if(startButton != null && startButton.isShown()) {
|
if (startButton != null && startButton.isShown()) {
|
||||||
SOLO.clickOnView(startButton);
|
SOLO.clickOnView(startButton);
|
||||||
}
|
}
|
||||||
instrumentation.waitForIdleSync();
|
instrumentation.waitForIdleSync();
|
||||||
@@ -477,14 +478,13 @@ public class EndToEndTestUtils {
|
|||||||
*/
|
*/
|
||||||
public static void stopRecording(boolean isSave) {
|
public static void stopRecording(boolean isSave) {
|
||||||
View stopButton = SOLO.getCurrentActivity().findViewById(R.id.track_controller_stop);
|
View stopButton = SOLO.getCurrentActivity().findViewById(R.id.track_controller_stop);
|
||||||
if(stopButton != null && stopButton.isShown() ) {
|
if (stopButton != null && stopButton.isShown()) {
|
||||||
SOLO.clickOnView(stopButton);
|
SOLO.clickOnView(stopButton);
|
||||||
if (isSave) {
|
if (isSave) {
|
||||||
SOLO.waitForText(activityMytracks.getString(R.string.generic_save), 1, 5000);
|
SOLO.waitForText(activityMytracks.getString(R.string.generic_save), 1, 5000);
|
||||||
// Make every track name is unique to make sure every check can be
|
// Make every track name is unique to make sure every check can be
|
||||||
// trusted.
|
// trusted.
|
||||||
trackName = TRACK_NAME_PREFIX
|
trackName = TRACK_NAME_PREFIX + System.currentTimeMillis();
|
||||||
+ System.currentTimeMillis();
|
|
||||||
SOLO.sendKey(KeyEvent.KEYCODE_DEL);
|
SOLO.sendKey(KeyEvent.KEYCODE_DEL);
|
||||||
enterTextAvoidSoftKeyBoard(0, trackName);
|
enterTextAvoidSoftKeyBoard(0, trackName);
|
||||||
enterTextAvoidSoftKeyBoard(1, activityType);
|
enterTextAvoidSoftKeyBoard(1, activityType);
|
||||||
@@ -548,7 +548,7 @@ public class EndToEndTestUtils {
|
|||||||
findMenuItem(activityMytracks.getString(R.string.menu_save), true);
|
findMenuItem(activityMytracks.getString(R.string.menu_save), true);
|
||||||
instrumentation.waitForIdleSync();
|
instrumentation.waitForIdleSync();
|
||||||
SOLO.clickOnText(trackKind.toUpperCase());
|
SOLO.clickOnText(trackKind.toUpperCase());
|
||||||
// rotateAllActivities();
|
// rotateAllActivities();
|
||||||
SOLO.waitForText(activityMytracks.getString(R.string.generic_success_title));
|
SOLO.waitForText(activityMytracks.getString(R.string.generic_success_title));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -560,7 +560,7 @@ public class EndToEndTestUtils {
|
|||||||
* @param isClick whether click the button if find it
|
* @param isClick whether click the button if find it
|
||||||
* @return the button to search, and null means can not find the button
|
* @return the button to search, and null means can not find the button
|
||||||
*/
|
*/
|
||||||
public static View getButtonOnScreen(String buttonName, boolean isWait,boolean isClick) {
|
public static View getButtonOnScreen(String buttonName, boolean isWait, boolean isClick) {
|
||||||
View button = null;
|
View button = null;
|
||||||
|
|
||||||
instrumentation.waitForIdleSync();
|
instrumentation.waitForIdleSync();
|
||||||
@@ -573,9 +573,9 @@ public class EndToEndTestUtils {
|
|||||||
ArrayList<View> allViews = SOLO.getViews();
|
ArrayList<View> allViews = SOLO.getViews();
|
||||||
for (View view : allViews) {
|
for (View view : allViews) {
|
||||||
String className = view.getClass().getName();
|
String className = view.getClass().getName();
|
||||||
if(className.indexOf("ActionMenuItemView") > 0) {
|
if (className.indexOf("ActionMenuItemView") > 0) {
|
||||||
String menuItemNameString = view.getContentDescription().toString();
|
String menuItemNameString = view.getContentDescription().toString();
|
||||||
if(menuItemNameString.equalsIgnoreCase(buttonName)) {
|
if (menuItemNameString.equalsIgnoreCase(buttonName)) {
|
||||||
button = view;
|
button = view;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -584,7 +584,7 @@ public class EndToEndTestUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get all buttons and find.
|
// Get all buttons and find.
|
||||||
if(button == null) {
|
if (button == null) {
|
||||||
ArrayList<Button> currentButtons = SOLO.getCurrentButtons();
|
ArrayList<Button> currentButtons = SOLO.getCurrentButtons();
|
||||||
for (Button oneButton : currentButtons) {
|
for (Button oneButton : currentButtons) {
|
||||||
String title = (String) oneButton.getText();
|
String title = (String) oneButton.getText();
|
||||||
@@ -594,7 +594,7 @@ public class EndToEndTestUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(button != null && isClick) {
|
if (button != null && isClick) {
|
||||||
SOLO.clickOnView(button);
|
SOLO.clickOnView(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -613,7 +613,7 @@ public class EndToEndTestUtils {
|
|||||||
private static boolean setHasActionBar() {
|
private static boolean setHasActionBar() {
|
||||||
try {
|
try {
|
||||||
return activityMytracks.getActionBar() == null ? false : true;
|
return activityMytracks.getActionBar() == null ? false : true;
|
||||||
}catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
// For in Android which does not has action bar, here will meet a error.
|
// For in Android which does not has action bar, here will meet a error.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -737,6 +737,7 @@ public class EndToEndTestUtils {
|
|||||||
* <li>The view extends ImageButton.</li>
|
* <li>The view extends ImageButton.</li>
|
||||||
* <li>The view name equals {@link #MOREOPTION_CLASSNAME}.</li>
|
* <li>The view name equals {@link #MOREOPTION_CLASSNAME}.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
|
*
|
||||||
* @return the more option view. Null means can not find it.
|
* @return the more option view. Null means can not find it.
|
||||||
*/
|
*/
|
||||||
private static View getMoreOptionView() {
|
private static View getMoreOptionView() {
|
||||||
@@ -867,7 +868,8 @@ public class EndToEndTestUtils {
|
|||||||
* @param text to enter
|
* @param text to enter
|
||||||
*/
|
*/
|
||||||
public static void enterTextAvoidSoftKeyBoard(int editTextIndex, String text) {
|
public static void enterTextAvoidSoftKeyBoard(int editTextIndex, String text) {
|
||||||
InputMethodManager imm = (InputMethodManager) activityMytracks.getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager imm = (InputMethodManager) activityMytracks.getApplicationContext()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
EditText editText = SOLO.getEditText(editTextIndex);
|
EditText editText = SOLO.getEditText(editTextIndex);
|
||||||
imm.hideSoftInputFromWindow(editText.getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY);
|
imm.hideSoftInputFromWindow(editText.getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY);
|
||||||
SOLO.enterText(editText, text);
|
SOLO.enterText(editText, text);
|
||||||
@@ -897,7 +899,8 @@ public class EndToEndTestUtils {
|
|||||||
.isEnabled());
|
.isEnabled());
|
||||||
Assert.assertNull(findTextView(activityMytracks.getString(R.string.generic_recording)));
|
Assert.assertNull(findTextView(activityMytracks.getString(R.string.generic_recording)));
|
||||||
Assert.assertNull(findTextView(activityMytracks.getString(R.string.generic_paused)));
|
Assert.assertNull(findTextView(activityMytracks.getString(R.string.generic_paused)));
|
||||||
TextView totalTime = (TextView) SOLO.getCurrentActivity().findViewById(R.id.track_controller_total_time);
|
TextView totalTime = (TextView) SOLO.getCurrentActivity().findViewById(
|
||||||
|
R.id.track_controller_total_time);
|
||||||
Assert.assertEquals(StringUtils.formatElapsedTimeWithHour(0), totalTime.getText().toString());
|
Assert.assertEquals(StringUtils.formatElapsedTimeWithHour(0), totalTime.getText().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -933,15 +936,14 @@ public class EndToEndTestUtils {
|
|||||||
Assert.assertNull(findTextView(activityMytracks.getString(R.string.generic_recording)));
|
Assert.assertNull(findTextView(activityMytracks.getString(R.string.generic_recording)));
|
||||||
Assert.assertNotNull(findTextView(activityMytracks.getString(R.string.generic_paused)));
|
Assert.assertNotNull(findTextView(activityMytracks.getString(R.string.generic_paused)));
|
||||||
|
|
||||||
String totalTimeOld = ((TextView) SOLO.getCurrentActivity()
|
String totalTimeOld = ((TextView) SOLO.getCurrentActivity().findViewById(
|
||||||
.findViewById(R.id.track_controller_total_time)).getText().toString();
|
R.id.track_controller_total_time)).getText().toString();
|
||||||
sleep(2000);
|
sleep(2000);
|
||||||
String totalTimeNew = ((TextView) SOLO.getCurrentActivity()
|
String totalTimeNew = ((TextView) SOLO.getCurrentActivity().findViewById(
|
||||||
.findViewById(R.id.track_controller_total_time)).getText().toString();
|
R.id.track_controller_total_time)).getText().toString();
|
||||||
Assert.assertTrue(totalTimeOld.equalsIgnoreCase(totalTimeNew));
|
Assert.assertTrue(totalTimeOld.equalsIgnoreCase(totalTimeNew));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a way point during track recording.
|
* Creates a way point during track recording.
|
||||||
*
|
*
|
||||||
@@ -977,4 +979,29 @@ public class EndToEndTestUtils {
|
|||||||
while (SOLO.waitForText(text, 1, VERY_SHORT_WAIT_TIME)) {}
|
while (SOLO.waitForText(text, 1, VERY_SHORT_WAIT_TIME)) {}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds the My Location view and click it.
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
*/
|
||||||
|
public static void findAndClickMyLocation(Activity activity) {
|
||||||
|
createTrackIfEmpty(1, false);
|
||||||
|
sendGps(30);
|
||||||
|
|
||||||
|
View myLocation = SOLO.getCurrentActivity().findViewById(R.id.map_my_location);
|
||||||
|
// Find the My Location button in another if null.
|
||||||
|
if (myLocation == null) {
|
||||||
|
ArrayList<ImageButton> aa = SOLO.getCurrentImageButtons();
|
||||||
|
for (ImageButton imageButton : aa) {
|
||||||
|
if (imageButton.getContentDescription() != null
|
||||||
|
&& imageButton.getContentDescription().equals(
|
||||||
|
activity.getString(R.string.icon_my_location))) {
|
||||||
|
myLocation = imageButton;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SOLO.clickOnView(myLocation);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+1
-31
@@ -19,13 +19,9 @@ import com.google.android.apps.mytracks.TrackListActivity;
|
|||||||
import com.google.android.apps.mytracks.util.GoogleLocationUtils;
|
import com.google.android.apps.mytracks.util.GoogleLocationUtils;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.Instrumentation;
|
import android.app.Instrumentation;
|
||||||
import android.test.ActivityInstrumentationTestCase2;
|
import android.test.ActivityInstrumentationTestCase2;
|
||||||
import android.view.View;
|
|
||||||
import android.widget.ImageButton;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests the function of go to my location.
|
* Tests the function of go to my location.
|
||||||
@@ -53,7 +49,7 @@ public class GoToMyLocationTest extends ActivityInstrumentationTestCase2<TrackLi
|
|||||||
* Tests the menu My Location.
|
* Tests the menu My Location.
|
||||||
*/
|
*/
|
||||||
public void testGotoMyLocation() {
|
public void testGotoMyLocation() {
|
||||||
findAndClickMyLocation(activityMyTracks);
|
EndToEndTestUtils.findAndClickMyLocation(activityMyTracks);
|
||||||
if (EndToEndTestUtils.isEmulator) {
|
if (EndToEndTestUtils.isEmulator) {
|
||||||
String setting = activityMyTracks.getString(
|
String setting = activityMyTracks.getString(
|
||||||
GoogleLocationUtils.isAvailable(activityMyTracks) ? R.string.gps_google_location_settings
|
GoogleLocationUtils.isAvailable(activityMyTracks) ? R.string.gps_google_location_settings
|
||||||
@@ -66,32 +62,6 @@ public class GoToMyLocationTest extends ActivityInstrumentationTestCase2<TrackLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Finds the My Location view and click it.
|
|
||||||
*
|
|
||||||
* @param activity
|
|
||||||
*/
|
|
||||||
public static void findAndClickMyLocation(Activity activity) {
|
|
||||||
EndToEndTestUtils.createTrackIfEmpty(1, false);
|
|
||||||
EndToEndTestUtils.sendGps(30);
|
|
||||||
|
|
||||||
View myLocation = EndToEndTestUtils.SOLO.getCurrentActivity()
|
|
||||||
.findViewById(R.id.map_my_location);
|
|
||||||
// Find the My Location button in another if null.
|
|
||||||
if (myLocation == null) {
|
|
||||||
ArrayList<ImageButton> aa = EndToEndTestUtils.SOLO.getCurrentImageButtons();
|
|
||||||
for (ImageButton imageButton : aa) {
|
|
||||||
if (imageButton.getContentDescription() != null
|
|
||||||
&& imageButton.getContentDescription().equals(
|
|
||||||
activity.getString(R.string.icon_my_location))) {
|
|
||||||
myLocation = imageButton;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EndToEndTestUtils.SOLO.clickOnView(myLocation);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
EndToEndTestUtils.SOLO.finishOpenedActivities();
|
EndToEndTestUtils.SOLO.finishOpenedActivities();
|
||||||
+148
@@ -0,0 +1,148 @@
|
|||||||
|
package com.google.android.apps.mytracks.endtoendtest.others;
|
||||||
|
|
||||||
|
import com.google.android.apps.mytracks.endtoendtest.EndToEndTestUtils;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.ActivityManager;
|
||||||
|
import android.app.ActivityManager.RunningAppProcessInfo;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.IntentFilter;
|
||||||
|
import android.os.Environment;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager.LayoutParams;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.OutputStreamWriter;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import junit.framework.Assert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A utility to support the big test cases, such as sensor test, stress test and
|
||||||
|
* so forth which under the package
|
||||||
|
* {@link com.google.android.apps.mytracks.endtoendtest.others}.
|
||||||
|
*
|
||||||
|
* @author Youtao Liu
|
||||||
|
*/
|
||||||
|
public class BigTestUtils {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to false as default. True to run the test. Default to false since this
|
||||||
|
* test can take a long time.
|
||||||
|
*/
|
||||||
|
public static boolean runStressTest = true;
|
||||||
|
public static boolean runSensorTest = true;
|
||||||
|
public static boolean runResourceUsageTest = true;
|
||||||
|
protected static final String DISABLE_MESSAGE = "This test is disabled";
|
||||||
|
protected final static String MYTRACKS_PROCESS_NAME = "com.google.android.maps.mytracks";
|
||||||
|
protected final static String MYTRACKS_TEST_INFO_FILE = "MyTracksTestInfo.txt";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the memory usage of MyTracks process.
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
*/
|
||||||
|
public static String getMyTracksPssMemoryInfo(Context context) {
|
||||||
|
int MyTracksProcessId = -1;
|
||||||
|
ActivityManager activityManager = (ActivityManager) context
|
||||||
|
.getSystemService(Activity.ACTIVITY_SERVICE);
|
||||||
|
List<RunningAppProcessInfo> runningAppProcesses = activityManager.getRunningAppProcesses();
|
||||||
|
|
||||||
|
for (RunningAppProcessInfo runningAppProcessInfo : runningAppProcesses) {
|
||||||
|
if (runningAppProcessInfo.processName.equalsIgnoreCase(MYTRACKS_PROCESS_NAME)) {
|
||||||
|
MyTracksProcessId = runningAppProcessInfo.pid;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (MyTracksProcessId == -1) {
|
||||||
|
Assert.fail();
|
||||||
|
}
|
||||||
|
int pids[] = { MyTracksProcessId };
|
||||||
|
android.os.Debug.MemoryInfo[] memoryInfoArray = activityManager.getProcessMemoryInfo(pids);
|
||||||
|
int memoryUsage = memoryInfoArray[0].getTotalPss();
|
||||||
|
return String.format(" MyTracks TotalPss Memory: %d (kB) ", memoryUsage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the battery info of device, and then writes it to a file.
|
||||||
|
*
|
||||||
|
* @param context the context of application
|
||||||
|
*/
|
||||||
|
public static String getBatteryUsageInfo(Context context) {
|
||||||
|
Intent batteryIntent = context.getApplicationContext().registerReceiver(null,
|
||||||
|
new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
|
||||||
|
int rawlevel = batteryIntent.getIntExtra("level", -1);
|
||||||
|
double scale = batteryIntent.getIntExtra("scale", -1);
|
||||||
|
return "Device has " + rawlevel + " of " + scale + " battery left";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a string to battery info file. This method would add a time string
|
||||||
|
* before the given value.
|
||||||
|
*
|
||||||
|
* @param string string to write
|
||||||
|
* @param isAppend true means append to file
|
||||||
|
*/
|
||||||
|
public static void writeToFile(String string, boolean isAppend) {
|
||||||
|
String path = Environment.getExternalStorageDirectory() + File.separator
|
||||||
|
+ MYTRACKS_TEST_INFO_FILE;
|
||||||
|
try {
|
||||||
|
FileOutputStream fileOutputStream = new FileOutputStream(new File(path), isAppend);
|
||||||
|
OutputStreamWriter osw = new OutputStreamWriter(fileOutputStream);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Write the string to the file
|
||||||
|
osw.write(string);
|
||||||
|
} finally {
|
||||||
|
osw.flush();
|
||||||
|
osw.close();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.i(EndToEndTestUtils.LOG_TAG, "Meet error when write test info to file.");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Monitors the battery and memory usage during test, and writes the usage
|
||||||
|
* info to a local file.
|
||||||
|
*
|
||||||
|
* @param context application context
|
||||||
|
* @param interval the milliseconds to get usage info
|
||||||
|
* @param testTime the total test milliseconds
|
||||||
|
*/
|
||||||
|
public static void moniterTest(Context context, int interval, int testTime) {
|
||||||
|
long startTime = (new Date()).getTime();
|
||||||
|
|
||||||
|
while (((new Date()).getTime() - startTime) < testTime) {
|
||||||
|
String memoryUsageString = getMyTracksPssMemoryInfo(context);
|
||||||
|
String batteryUsageString = getBatteryUsageInfo(context);
|
||||||
|
String oneInfo = (new java.util.Date()).toString() + ":" + memoryUsageString + ", "
|
||||||
|
+ batteryUsageString + ".\r\n";
|
||||||
|
writeToFile(oneInfo, true);
|
||||||
|
Log.i(EndToEndTestUtils.LOG_TAG, oneInfo);
|
||||||
|
EndToEndTestUtils.sleep(interval);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unlocks the device screen.
|
||||||
|
*/
|
||||||
|
public static void unlockDevice() {
|
||||||
|
// The menu item of setting should be found if the screen is not locked.
|
||||||
|
try {
|
||||||
|
Window wind = EndToEndTestUtils.SOLO.getCurrentActivity().getWindow();
|
||||||
|
wind.addFlags(LayoutParams.FLAG_DISMISS_KEYGUARD);
|
||||||
|
wind.addFlags(LayoutParams.FLAG_SHOW_WHEN_LOCKED);
|
||||||
|
wind.addFlags(LayoutParams.FLAG_TURN_SCREEN_ON);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.i(EndToEndTestUtils.LOG_TAG,
|
||||||
|
"Meet error when unlock device screen, may the device is not locked.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+174
@@ -0,0 +1,174 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2012 Google Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
|
* the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations under
|
||||||
|
* the License.
|
||||||
|
*/
|
||||||
|
package com.google.android.apps.mytracks.endtoendtest.others;
|
||||||
|
|
||||||
|
import com.google.android.apps.mytracks.TrackListActivity;
|
||||||
|
import com.google.android.apps.mytracks.endtoendtest.EndToEndTestUtils;
|
||||||
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.app.Instrumentation;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.test.ActivityInstrumentationTestCase2;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests the battery and memory usage of long tracks. As this test may be run a
|
||||||
|
* long time test and without connect to desktop computer during test. The test
|
||||||
|
* result will be recorded to a file. And at the beginning of test, it need
|
||||||
|
* user's confirm by click a button.
|
||||||
|
*
|
||||||
|
* @author Youtao Liu
|
||||||
|
*/
|
||||||
|
public class ResourceUsageTest extends ActivityInstrumentationTestCase2<TrackListActivity> {
|
||||||
|
|
||||||
|
public ResourceUsageTest() {
|
||||||
|
super(TrackListActivity.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Instrumentation instrumentation;
|
||||||
|
private TrackListActivity trackListActivity;
|
||||||
|
private boolean runTest = false;
|
||||||
|
private static boolean isUserConfirmed = false;
|
||||||
|
private Context context;
|
||||||
|
/**
|
||||||
|
* Default duration for each test is half one hour.
|
||||||
|
*/
|
||||||
|
private int TEST_DURATION_IN_MILLISECONDS = 30 * 60 * 1000;
|
||||||
|
private int INTERVALE_TO_CHECK = 5 * 60 * 1000;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setUp() throws Exception {
|
||||||
|
runTest = BigTestUtils.runResourceUsageTest;
|
||||||
|
super.setUp();
|
||||||
|
if (!runTest) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
instrumentation = getInstrumentation();
|
||||||
|
trackListActivity = getActivity();
|
||||||
|
context = trackListActivity.getApplicationContext();
|
||||||
|
instrumentation.waitForIdleSync();
|
||||||
|
EndToEndTestUtils.setupForDebug(instrumentation, trackListActivity);
|
||||||
|
BigTestUtils.unlockDevice();
|
||||||
|
if (!isUserConfirmed) {
|
||||||
|
confirmTest();
|
||||||
|
}
|
||||||
|
BigTestUtils.writeToFile("Test case start:" + getName() + "\r\n", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prompts a dialog to make user confirm whether start the test.
|
||||||
|
*/
|
||||||
|
private void confirmTest() {
|
||||||
|
try {
|
||||||
|
trackListActivity.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
new AlertDialog.Builder(EndToEndTestUtils.SOLO.getCurrentActivity())
|
||||||
|
.setTitle("Confirm long time test.")
|
||||||
|
.setMessage(
|
||||||
|
"Please disconnect the power cord of your device and click 'Start' button. Each case need run "
|
||||||
|
+ TEST_DURATION_IN_MILLISECONDS / 1000 / 60
|
||||||
|
+ " minutes, and the battery/memory usage will be recorded in every "
|
||||||
|
+ INTERVALE_TO_CHECK / 60 / 1000 + "minutes.")
|
||||||
|
.setPositiveButton("Start Test", new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
isUserConfirmed = true;
|
||||||
|
runTest = true;
|
||||||
|
BigTestUtils.writeToFile("Test start:\r\n", false);
|
||||||
|
}
|
||||||
|
}).setNegativeButton("Cancel Test", new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
isUserConfirmed = true;
|
||||||
|
runTest = false;
|
||||||
|
fail();
|
||||||
|
}
|
||||||
|
}).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Throwable e) {
|
||||||
|
Log.i(EndToEndTestUtils.LOG_TAG, "Meet error when create confirm dialog.");
|
||||||
|
}
|
||||||
|
// Waiting user confirm the testing
|
||||||
|
while (!isUserConfirmed) {
|
||||||
|
EndToEndTestUtils.sleep(EndToEndTestUtils.TINY_WAIT_TIME);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests the resource usage when display track list activity during recording.
|
||||||
|
*/
|
||||||
|
public void testBatteryUsage_showTrackList() {
|
||||||
|
recordingLongTrack(true, R.string.track_detail_map_tab);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests the resource usage when display map view during recording.
|
||||||
|
*/
|
||||||
|
public void testBatteryUsage_showMapView() {
|
||||||
|
recordingLongTrack(false, R.string.track_detail_map_tab);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests the resource usage when display chart view during recording.
|
||||||
|
*/
|
||||||
|
public void testBatteryUsage_showChartView() {
|
||||||
|
recordingLongTrack(false, R.string.track_detail_chart_tab);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests the resource usage when display stats view during recording.
|
||||||
|
*/
|
||||||
|
public void testBatteryUsage_showStatsView() {
|
||||||
|
recordingLongTrack(false, R.string.track_detail_stats_tab);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Records a long time track and keeps in the specified tab or in tracks list
|
||||||
|
* during recording.
|
||||||
|
*
|
||||||
|
* @param isShowTracksList true means show tracks list
|
||||||
|
* @param tabNameId the name string id of tab, it's useless when the first parameter is
|
||||||
|
* true.
|
||||||
|
*/
|
||||||
|
public void recordingLongTrack(boolean isShowTracksList, int tabNameId) {
|
||||||
|
if (!runTest) {
|
||||||
|
Log.i(EndToEndTestUtils.LOG_TAG, BigTestUtils.DISABLE_MESSAGE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
EndToEndTestUtils.startRecording();
|
||||||
|
if (isShowTracksList) {
|
||||||
|
EndToEndTestUtils.SOLO.goBack();
|
||||||
|
} else {
|
||||||
|
EndToEndTestUtils.SOLO.clickOnText(trackListActivity.getString(tabNameId));
|
||||||
|
}
|
||||||
|
BigTestUtils.moniterTest(context, INTERVALE_TO_CHECK, TEST_DURATION_IN_MILLISECONDS);
|
||||||
|
BigTestUtils.unlockDevice();
|
||||||
|
EndToEndTestUtils.stopRecording(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void tearDown() throws Exception {
|
||||||
|
if (!runTest) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
EndToEndTestUtils.SOLO.finishOpenedActivities();
|
||||||
|
BigTestUtils.writeToFile("Test case done:" + getName() + "\r\n\r\n", true);
|
||||||
|
super.tearDown();
|
||||||
|
}
|
||||||
|
}
|
||||||
+16
@@ -125,6 +125,22 @@ public class StressTest extends ActivityInstrumentationTestCase2<TrackListActivi
|
|||||||
EndToEndTestUtils.stopRecording(true);
|
EndToEndTestUtils.stopRecording(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Records a long track.
|
||||||
|
*/
|
||||||
|
public void testRecordLongTrack() {
|
||||||
|
if (!runTest) {
|
||||||
|
Log.i(EndToEndTestUtils.LOG_TAG, BigTestUtils.DISABLE_MESSAGE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
EndToEndTestUtils.startRecording();
|
||||||
|
int gpsNumber = 5000;
|
||||||
|
for (int i = 0; i < gpsNumber / 10; i++) {
|
||||||
|
EndToEndTestUtils.sendGps(10, i * 10);
|
||||||
|
}
|
||||||
|
EndToEndTestUtils.stopRecording(true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switches view between MAP, CHART and STAT. And create way points, pause and
|
* Switches view between MAP, CHART and STAT. And create way points, pause and
|
||||||
* resume the track during recording.
|
* resume the track during recording.
|
||||||
Reference in New Issue
Block a user