summaryrefslogtreecommitdiffstats
path: root/testing/android/native_test_launcher.cc
Commit message (Collapse)AuthorAgeFilesLines
* [Android] Move testing/android/ to testing/android/native_test/jbudorick2015-04-091-161/+0
| | | | | | | | | | | This will let us put android test code unrelated to native test APK wrapping elsewhere in testing/android/*. BUG= Review URL: https://codereview.chromium.org/1071573003 Cr-Commit-Position: refs/heads/master@{#324512}
* This is the first patch to separate JNI registration with initialization, ↵michaelbai2015-01-281-26/+15
| | | | | | | | | | | | | | | | | | currently, we have JNI_OnLoad defined multiple places which has a lot of duplicated code and JNI registration and initialization are mixed; This patch - Added JNIOnLoadDelegate class for each component specific initialization. - Added base::android::OnJNIOnLoad() to call a list of delegates - Migrate testing, content_shell, chrome_shell. BUG=447393 TBR=thakis Review URL: https://codereview.chromium.org/864563002 Cr-Commit-Position: refs/heads/master@{#313592}
* [Android] Add regular file redirection for gtests.jbudorick2015-01-221-58/+16
| | | | | | | | | | | | | | This also removes support for stdin and separate stderr fifos. These are only used by the blink layout tests, which have their own mechanism for setting them up. See bug for additional context. BUG=449155 Review URL: https://codereview.chromium.org/855703004 Cr-Commit-Position: refs/heads/master@{#312622}
* Make callers of CommandLine use it via the base:: namespace.avi2014-12-231-4/+5
| | | | | | | | | | | | Covers testing/, tools/, ui/, and win8/. BUG=422426 TEST=none TBR=ben@chromium.org Review URL: https://codereview.chromium.org/819223002 Cr-Commit-Position: refs/heads/master@{#309538}
* [Android] Add Instrumentation wrapper for gtest APKs.jbudorick2014-11-101-1/+14
| | | | | | | | BUG=428942 Review URL: https://codereview.chromium.org/691103002 Cr-Commit-Position: refs/heads/master@{#303530}
* Cleanup: Use base/files/file_util.h instead of base/file_util.h in [r-t]*/thestig2014-09-121-1/+1
| | | | | | | | TBR=sergeyu@chromium.org,cpu@chromium.org,thakis@chromium.org,jamesr@chromium.org,zea@chromium.org,nduca@chromium.org Review URL: https://codereview.chromium.org/560883003 Cr-Commit-Position: refs/heads/master@{#294543}
* Have jni_generator.gypi specify include_dirs to dependent targets.blundell@chromium.org2013-12-171-1/+1
| | | | | | | | | | | | Rather than each dependent target of a target that generates jni headers having to specify the appropriate include_dir manually, jni_generator.gypi can do it via direct_dependent_settings. TBR=darin@chromium.org Review URL: https://codereview.chromium.org/111493006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241216 0039d316-1c4b-4281-b951-d872f2087c98
* Android: Allow duplicate calls to InitApplicationContext.torne@chromium.org2013-11-111-1/+1
| | | | | | | | | | | | | | | Allow InitApplicationContext to be called more than once as long as the same context is passed each time. This will make it possible for AwCookieManager to make use of certain JNI functions before Chromium has been initialised without needing to keep track of whether it's already passed the application context to native or not. BUG=304813 NOTRY=true Review URL: https://codereview.chromium.org/54923002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234271 0039d316-1c4b-4281-b951-d872f2087c98
* Android: removes obsolete comment.bulach@chromium.org2013-08-161-2/+0
| | | | | | | | | | | Following crrev.com/144038, RunTests is executed in the main thread, so the comment is obsolete. BUG= Review URL: https://chromiumcodereview.appspot.com/22890005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218032 0039d316-1c4b-4281-b951-d872f2087c98
* Move CreateFIFO() and RedirectStream() from testing/android/ to base/android/.scherkus@chromium.org2013-06-181-12/+46
| | | | | | | | | | | They will be used by content_shell to create the necessary fifos when running layout tests. BUG=232044 TBR=darin,yfriedman Review URL: https://chromiumcodereview.appspot.com/16599008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207060 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in testing/, third_party/, tools/.avi@chromium.org2013-06-111-1/+1
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/15851009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205470 0039d316-1c4b-4281-b951-d872f2087c98
* [Cleanup] Remove StringPrintf from global namespacegroby@chromium.org2013-03-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | use of StringPrintf now requires prefixing with base:: or a per-scope using directive TBR'd: abodenha: chrome/service brettw: content, third_party, webkit darin: base, chrome/browser, chrome/renderer dgarret: courgette enne: cc fischmann: media gbillock: sql joi: google_apis,components rsleevi: net, crypto sky: chrome/test thestig: printing, chrome/common, tsepez: ipc wez: remoting yfriedman: testing/android NOTRY=true R=brettw@chromium.org TBR=joi@chromium.org, rsleevi@chromium.org, enne@chromium.org, thestig@chromium.org, darin@chromium.org, abodenha@chromium.org, sky@chromium.org, dgarret@chromium.org, tsepez@chromium.org, fishman@chromium.org, wez@chromium.org, gbillock@chromium.org, yfriedman@chromium.org BUG= Review URL: https://codereview.chromium.org/12767006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188857 0039d316-1c4b-4281-b951-d872f2087c98
* Move file_path.h to base/files.brettw@chromium.org2013-02-241-1/+1
| | | | | | TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
* Fix more remaining FilePath -> base::FilePath.brettw@chromium.org2013-02-181-5/+6
| | | | | | | | This removes the "using" in file_path.h for Mac since Mac now passes trybots with no using. It still leaves the using for Windows. Review URL: https://codereview.chromium.org/12294008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183066 0039d316-1c4b-4281-b951-d872f2087c98
* Android: Refactor native test setup in a util class.nileshagrawal@chromium.org2013-02-091-86/+16
| | | | | | | | | | | | This is also needed by content_browsertests. Also redirecting stdout,stderr for content_browsertests to a fifo file to be read by the test runner scripts. BUG=138275 TBR=jam@chromium.org Review URL: https://chromiumcodereview.appspot.com/12213035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181587 0039d316-1c4b-4281-b951-d872f2087c98
* Move string tokenizer to base/strings.brettw@chromium.org2013-02-021-3/+3
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/12087091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180211 0039d316-1c4b-4281-b951-d872f2087c98
* Android: creates fifo for test runners in internal directory.bulach@chromium.org2012-09-211-1/+2
| | | | | | | | | | | | Some devices have $EXTERNAL_STORAGE filesystems that don't support mkfifo. Create in the internal app dir instead. BUG= TEST= Review URL: https://codereview.chromium.org/10957036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157962 0039d316-1c4b-4281-b951-d872f2087c98
* Support creating a fifo for stdin and separating stderr in its own fifo for ↵peter@chromium.org2012-09-211-8/+37
| | | | | | | | | | | | | | | Android This is necessary to properly support DumpRenderTree. Now that Chromium also uses fifos for getting output from the device, WebKit can change to using that. BUG= Review URL: https://chromiumcodereview.appspot.com/10969010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157882 0039d316-1c4b-4281-b951-d872f2087c98
* Android: uses a fifo rather than logcat for the test runner.bulach@chromium.org2012-09-191-76/+48
| | | | | | | | | | | | | | | | | | | - This uses the same mechanism as webkit drt. - It fixes the "timestamping" bug (147800), as the fifo order is guaranteed (as opposed to logcat). - It also removes AndroidLogPrinter which was injected in the gtest framework. - Downside is that we won't get inline crashstack. However, those were normally useless as they were not symbolized anyways. We can still get tombstones if we detect a crash. BUG=147800 TEST=build/android/run_tests.py Review URL: https://chromiumcodereview.appspot.com/10938014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157541 0039d316-1c4b-4281-b951-d872f2087c98
* Increase logging priority for test markers.nileshagrawal@chromium.org2012-08-311-5/+5
| | | | | | | | BUG= Review URL: https://chromiumcodereview.appspot.com/10910021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154333 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the invalid jni header in native_test_launcher on Android.shouqun.liu@intel.com2012-07-201-1/+1
| | | | | | | | | | | | | The rule of generating jni header is changed, need to update the related source file. BUG= TEST=unittests Review URL: https://chromiumcodereview.appspot.com/10809029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147609 0039d316-1c4b-4281-b951-d872f2087c98
* Add WaitForDebugger for android native testsshouqun.liu@intel.com2012-07-051-0/+14
| | | | | | | | | | | | For convenience of debugging APKs of native tests (*_unittests, DumpRenderTree) BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10697083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145538 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream: Fix the native test launcher for Chrome on Android.jknotten@chromium.org2012-07-051-4/+7
| | | | | | | | | | | | | We need to terminate our own constructed argv[] before passing it into gtest as gtest requires a null-terminated argv. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10692095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145525 0039d316-1c4b-4281-b951-d872f2087c98
* APK-based unittestsbulach@chromium.org2012-06-271-6/+10
| | | | | | | | | | | | | | Rather than chromium's LOG(ERROR) uses directly __android_log_write for the gtest printer. Cleans up the log and make it simpler to spot real errors. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10579040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144428 0039d316-1c4b-4281-b951-d872f2087c98
* Register JNI methods before running unittests on android.nileshagrawal@chromium.org2012-06-271-3/+2
| | | | | | | | | | | | | A better way to implement: http://codereview.chromium.org/10658017/ BUG=125059 TEST= Review URL: https://chromiumcodereview.appspot.com/10668047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144374 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Use a test specific macro to call JNI registrars during APK tests."nileshagrawal@chromium.org2012-06-261-21/+4
| | | | | | | | | | | | | | | | | TBR=jam@chromium.org,jrg@chromium.org (The original CL was submitted with a TBR too, incorrectly categorized as a simple gyp change) This reverts commit 575ab5330492664079ea89804bec615d15ea3b33. We intend to do this using run_all_unittests.cc in individual suites. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10662056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144240 0039d316-1c4b-4281-b951-d872f2087c98
* Use a test specific macro to call JNI registrars during APK tests.nileshagrawal@chromium.org2012-06-251-4/+21
| | | | | | | | | | | | | TBR=rsleevi@chromium.org,jam@chromium.org (Using TBR as this is a trivial gyp change) BUG=125059 TEST= Review URL: https://chromiumcodereview.appspot.com/10658017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144057 0039d316-1c4b-4281-b951-d872f2087c98
* Remove duplicate call to InitAndroidTest.nileshagrawal@chromium.org2012-06-111-3/+0
| | | | | | | | | | | | The method is called from test_suite.cc. Also moving methods in test_support_android inside a namespace. BUG=125059 TEST=None Review URL: https://chromiumcodereview.appspot.com/10538065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141473 0039d316-1c4b-4281-b951-d872f2087c98
* Chromium support of running DumpRenderTree as an apk on Androidwangxianzhu@chromium.org2012-06-011-44/+20
| | | | | | | | | | | | | | This is an upstream of chromium-android. The WebKit part is https://bugs.webkit.org/show_bug.cgi?id=86862. TBR=darin (for base/base.gyp) BUG=none TEST=build and run current native tests without error Review URL: https://chromiumcodereview.appspot.com/10408091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140046 0039d316-1c4b-4281-b951-d872f2087c98
* Put commandline for apk tests in /data/local/tmpnileshagrawal@chromium.org2012-05-161-7/+7
| | | | | | | | | | | | | | | We were trying to use the application directory which is not usually writable (unless the device is rooted). This allows us to run the tests on non-rooted devices. BUG=125059 TEST= Review URL: https://chromiumcodereview.appspot.com/10398049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137368 0039d316-1c4b-4281-b951-d872f2087c98
* Detect crashes while running native tests in APK.nileshagrawal@chromium.org2012-05-091-0/+41
| | | | | | | | | | | | | Adding signal handlers (for fatal signals) to output a marker indicating that the test crashed. BUG=125059 TEST= Review URL: https://chromiumcodereview.appspot.com/10310046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136050 0039d316-1c4b-4281-b951-d872f2087c98
* Reapply "Changes according to review comments"wangxianzhu@chromium.org2012-05-051-0/+2
| | | | | | | | | | | | | | | | | Fixed an "unused variable" issue of the original CL (http://codereview.chromium.org/10224004/). Use Android API for GetDisplayNameForLocale(). Using Android API, we can reduce the data size of ICU and thus reduce the binary size of chromium-android. BUG=none TEST=L10nUtilTest.GetDisplayNameForLocale,L10nUtilTest.GetDisplayNameForCountry TBR=jrg@chromium.org,isherman@chromium.org,mark@chromium.org,jshin@chromium.org,rvargas@chromium.org Review URL: http://codereview.chromium.org/10310029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135524 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 135484 - Use Android API for GetDisplayNameForLocale().rvargas@google.com2012-05-041-2/+0
| | | | | | | | | | | | | | | | | | | failure: http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20%28x86%29/builds/4835/steps/BuildTarget/logs/stdio Using Android API, we can reduce the data size of ICU and thus reduce the binary size of chromium-android. BUG=none TEST=L10nUtilTest.GetDisplayNameForLocale,L10nUtilTest.GetDisplayNameForCountry TBR=sky Review URL: http://codereview.chromium.org/10224004 TBR=wangxianzhu@chromium.org Review URL: https://chromiumcodereview.appspot.com/10380018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135490 0039d316-1c4b-4281-b951-d872f2087c98
* Use Android API for GetDisplayNameForLocale().wangxianzhu@chromium.org2012-05-041-0/+2
| | | | | | | | | | | | | Using Android API, we can reduce the data size of ICU and thus reduce the binary size of chromium-android. BUG=none TEST=L10nUtilTest.GetDisplayNameForLocale,L10nUtilTest.GetDisplayNameForCountry TBR=sky Review URL: http://codereview.chromium.org/10224004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135484 0039d316-1c4b-4281-b951-d872f2087c98
* Add PathUtilsTest.nileshagrawal@chromium.org2012-04-261-1/+10
| | | | | | | | | | | | - This test invokes JNI calls and included only if gtest_target_type=shared_library. - Also set the application context to get these JNI calls working. BUG=125059 TEST= Review URL: http://codereview.chromium.org/10161032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134144 0039d316-1c4b-4281-b951-d872f2087c98
* Fix commandline and disabling tests for apk based tests.nileshagrawal@chromium.org2012-04-251-1/+1
| | | | | | | | | | | | | | | | | Command for running with a test filter: ./build/android/run_tests.py -s out/Release/base_unittests_apk/base_unittests-debug.apk -f FileUtilTest.* The _disabled file should be base_unittests-debug_disabled BUG= TEST= Review URL: http://codereview.chromium.org/10214002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133838 0039d316-1c4b-4281-b951-d872f2087c98
* apk-based test runner work for android. 2 unit test bundles converted over ↵jrg@chromium.org2012-04-191-0/+190
(ipc, base). OFF by default; enable with a gyp var. E.g. GYP_DEFINES="$GYP_DEFINES gtest_target_type=shared_library" android_gyp Some useful commands: adb uninstall org.chromium.native_test adb install -r out/Release/base_unittests_apk/ChromeNativeTests-debug.apk adb shell am start -n org.chromium.native_test/org.chromium.native_test.ChromeNativeTestActivity For the moment, all apks can be built simultaneously but use the same activity name. Thus you cannot have more than one installed at the same time. BUG=None TEST= Review URL: http://codereview.chromium.org/10051021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133053 0039d316-1c4b-4281-b951-d872f2087c98