Last Comment Bug 770456 - Intermittent Robocop | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
: Intermittent Robocop | testHistoryTab | Exception caught - junit.framework.As...
Status: RESOLVED FIXED
: intermittent-failure
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: Trunk
: ARM Android
: -- normal (vote)
: Firefox 17
Assigned To: Geoff Brown [:gbrown] (pto May 28-June 13)
:
Mentors:
Depends on:
Blocks: 438871
  Show dependency treegraph
 
Reported: 2012-07-03 02:50 PDT by Ed Morley [:emorley]
Modified: 2012-11-25 19:31 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed


Attachments
wait for child view to be populated (4.38 KB, patch)
2012-07-13 08:32 PDT, Geoff Brown [:gbrown] (pto May 28-June 13)
wjohnston2000: review+
lukasblakk+bugs: approval‑mozilla‑aurora+
Details | Diff | Review
use more care when accessing history child view (4.96 KB, patch)
2012-08-23 08:58 PDT, Geoff Brown [:gbrown] (pto May 28-June 13)
jmaher: review+
Details | Diff | Review
use more care when accessing history child view (5.92 KB, patch)
2012-08-24 17:59 PDT, Geoff Brown [:gbrown] (pto May 28-June 13)
gbrown: review+
Details | Diff | Review

Description Ed Morley [:emorley] 2012-07-03 02:50:28 PDT
Android Tegra 250 mozilla-inbound opt test robocop on 2012-07-02 15:05:00 PDT for push 8c50b2ddc155

slave: tegra-094

https://tbpl.mozilla.org/php/getParsedLog.php?id=13172075&tree=Mozilla-Inbound

{
0 INFO SimpleTest START
1 INFO TEST-START | testHistoryTab
2 INFO TEST-PASS | testHistoryTab | Awesomebar URL typed properly - http://mochi.test:8888/tests/robocop/robocop_big_link.html should equal http://mochi.test:8888/tests/robocop/robocop_big_link.html
3 INFO TEST-PASS | testHistoryTab | Awesomebar URL typed properly - http://mochi.test:8888/tests/robocop/robocop_blank_01.html should equal http://mochi.test:8888/tests/robocop/robocop_blank_01.html
4 INFO TEST-PASS | testHistoryTab | bookmark added sucessfully - true should equal true
5 INFO TEST-PASS | testHistoryTab | checking that history list exists - android.widget.ExpandableListView@443fdaf8
6 INFO TEST-PASS | testHistoryTab | history list has 3 children - 3 should equal 3
7 INFO TEST-PASS | testHistoryTab | TextView is filled in - Big Link
8 INFO TEST-PASS | testHistoryTab | TextView is filled in - http://mochi.test:8888/tests/robocop/robocop_big_link.html
9 INFO TEST-PASS | testHistoryTab | Correct number of ImageViews visible - 1 should equal 1
10 INFO TEST-PASS | testHistoryTab | TextView is filled in - Browser Blank Page 01
11 INFO TEST-PASS | testHistoryTab | TextView is filled in - http://mochi.test:8888/tests/robocop/robocop_blank_01.html
12 INFO TEST-PASS | testHistoryTab | Correct number of ImageViews visible - 2 should equal 2
13 INFO TEST-PASS | testHistoryTab | First row has Today header - Today
14 INFO TEST-PASS | testHistoryTab | Correct number of ImageViews visible - 0 should equal 0
15 INFO TEST-PASS | testHistoryTab | Header rows should not show a context menu - false should equal false
Exception caught during test!
junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at com.jayway.android.robotium.solo.Clicker.clickOnScreen(Clicker.java:144)
	at com.jayway.android.robotium.solo.Solo.clickLongOnView(Solo.java:797)
	at org.mozilla.fennec.tests.testHistoryTab.testContextMenu(testHistoryTab.java:125)
	at org.mozilla.fennec.tests.testHistoryTab.testHistoryTab(testHistoryTab.java:58)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:521)
	at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:204)
	at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:194)
	at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:186)
	at org.mozilla.fennec.tests.BaseTest.runTest(BaseTest.java:93)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
	at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:520)
	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)
16 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
}
Comment 1 Treeherder Robot 2012-07-03 08:24:32 PDT
edmorley
https://tbpl.mozilla.org/php/getParsedLog.php?id=13194880&tree=Profiling
Android Tegra 250 profiling opt test robocop on 2012-07-03 07:14:26
slave: tegra-120

16 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 2 Treeherder Robot 2012-07-03 19:13:48 PDT
ryanvm%gmail.com
https://tbpl.mozilla.org/php/getParsedLog.php?id=13211919&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-07-03 18:02:57
slave: tegra-173

16 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 3 Treeherder Robot 2012-07-06 09:35:15 PDT
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=13290359&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-07-06 07:58:29
slave: tegra-046

16 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 4 Treeherder Robot 2012-07-07 06:53:12 PDT
ryanvm%gmail.com
https://tbpl.mozilla.org/php/getParsedLog.php?id=13313970&tree=Firefox
Android Tegra 250 mozilla-central opt test robocop on 2012-07-07 03:52:58
slave: tegra-084

16 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 5 Treeherder Robot 2012-07-09 06:38:15 PDT
edmorley
https://tbpl.mozilla.org/php/getParsedLog.php?id=13352640&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-07-09 05:33:43
slave: tegra-060

16 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
TEST-UNEXPECTED-FAIL | Unable to copy profile to device. | Exception caught while running robocop tests.
Comment 6 Treeherder Robot 2012-07-10 15:13:06 PDT
jwalker%mozilla.com
https://tbpl.mozilla.org/php/getParsedLog.php?id=13400304&tree=Fx-Team
Android Tegra 250 fx-team opt test robocop on 2012-07-10 12:54:49
slave: tegra-080

16 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
TEST-UNEXPECTED-FAIL | Unable to copy profile to device. | Exception caught while running robocop tests.
Comment 7 Treeherder Robot 2012-07-13 07:52:49 PDT
edmorley
https://tbpl.mozilla.org/php/getParsedLog.php?id=13494715&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-07-13 06:35:43
slave: tegra-091

16 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 8 Geoff Brown [:gbrown] (pto May 28-June 13) 2012-07-13 08:32:22 PDT
Created attachment 641914 [details] [diff] [review]
wait for child view to be populated

I tested this quite a bit and found that in all the occasional failures, the view was non-null if we simply checked again a little while later (say, 100 ms). The patch uses waitForTest to check for the problematic views periodically for up to 2000 ms. I also added code to send BACK to clear the VKB and ensure that the entire list is visible -- we are doing this in other tests now, as it has been a source of intermittent failures.
Comment 9 Geoff Brown [:gbrown] (pto May 28-June 13) 2012-07-17 12:06:45 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/c4f26b2a26c4
Comment 10 Ed Morley [:emorley] 2012-07-18 05:54:56 PDT
https://hg.mozilla.org/mozilla-central/rev/c4f26b2a26c4
Comment 11 Treeherder Robot 2012-07-24 05:59:07 PDT
edmorley
https://tbpl.mozilla.org/php/getParsedLog.php?id=13800982&tree=Mozilla-Aurora
Android Tegra 250 mozilla-aurora opt test robocop on 2012-07-24 03:43:52
slave: tegra-087

16 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 12 Ed Morley [:emorley] 2012-07-24 06:00:04 PDT
Please may this be backported to aurora? :-)
Comment 13 Geoff Brown [:gbrown] (pto May 28-June 13) 2012-07-24 06:42:43 PDT
Comment on attachment 641914 [details] [diff] [review]
wait for child view to be populated

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Race condition in Robocop test.
User impact if declined: None -- only affects a test case. Expect intermittent Robocop orange on aurora if declined.
Testing completed (on m-c, etc.): On m-c since 2012-07-18.
Risk to taking this patch (and alternatives if risky): Minor risk of making the test behavior worse.
String or UUID changes made by this patch: none
Comment 14 Lukas Blakk [:lsblakk] use ?needinfo 2012-07-24 14:35:02 PDT
Comment on attachment 641914 [details] [diff] [review]
wait for child view to be populated

test-only, fix intermittent orange - approving.
Comment 16 Treeherder Robot 2012-08-13 16:09:54 PDT
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=14350569&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-13 14:15:54
slave: tegra-108

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 17 Treeherder Robot 2012-08-15 23:19:42 PDT
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=14425083&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-15 21:11:20
slave: tegra-105

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 18 Treeherder Robot 2012-08-16 11:21:55 PDT
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=14441861&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-16 10:27:23
slave: tegra-155

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 19 Treeherder Robot 2012-08-16 18:58:55 PDT
ryanvm%gmail.com
https://tbpl.mozilla.org/php/getParsedLog.php?id=14453300&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-16 18:08:32
slave: tegra-281

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 20 Treeherder Robot 2012-08-16 21:49:15 PDT
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=14456783&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-16 20:24:32
slave: tegra-166

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 21 Treeherder Robot 2012-08-17 06:15:43 PDT
edmorley
https://tbpl.mozilla.org/php/getParsedLog.php?id=14467726&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-17 05:25:38
slave: tegra-058

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 22 Treeherder Robot 2012-08-18 04:12:09 PDT
ryanvm%gmail.com
https://tbpl.mozilla.org/php/getParsedLog.php?id=14492939&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-18 02:58:52
slave: tegra-052

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 23 Treeherder Robot 2012-08-18 04:32:29 PDT
ryanvm%gmail.com
https://tbpl.mozilla.org/php/getParsedLog.php?id=14493648&tree=Firefox
Android Tegra 250 mozilla-central opt test robocop on 2012-08-18 03:43:51
slave: tegra-121

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 24 Treeherder Robot 2012-08-19 12:23:08 PDT
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=14511332&tree=Firefox
Android Tegra 250 mozilla-central opt test robocop on 2012-08-19 11:37:51
slave: tegra-169

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 25 Treeherder Robot 2012-08-19 17:12:39 PDT
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=14513549&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-19 15:50:29
slave: tegra-279

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 26 Treeherder Robot 2012-08-19 22:38:44 PDT
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=14518437&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-19 21:44:02
slave: tegra-169

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 27 Treeherder Robot 2012-08-20 07:53:35 PDT
edmorley
https://tbpl.mozilla.org/php/getParsedLog.php?id=14525022&tree=Fx-Team
Android Tegra 250 fx-team opt test robocop on 2012-08-20 04:29:36
slave: tegra-192

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
buildbot.slave.commands.TimeoutError: command timed out: 2400 seconds without output, killing pid 48211
Comment 28 Treeherder Robot 2012-08-20 08:27:26 PDT
edmorley
https://tbpl.mozilla.org/php/getParsedLog.php?id=14527830&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-20 07:10:50
slave: tegra-093

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 29 Treeherder Robot 2012-08-20 08:27:54 PDT
edmorley
https://tbpl.mozilla.org/php/getParsedLog.php?id=14527830&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-20 07:10:50
slave: tegra-093

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 30 Treeherder Robot 2012-08-20 08:39:20 PDT
edmorley
https://tbpl.mozilla.org/php/getParsedLog.php?id=14528496&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-20 07:49:58
slave: tegra-227

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 31 Treeherder Robot 2012-08-20 21:44:24 PDT
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=14548779&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-20 20:44:52
slave: tegra-183

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 32 Treeherder Robot 2012-08-21 03:25:58 PDT
ryanvm%gmail.com
https://tbpl.mozilla.org/php/getParsedLog.php?id=14553276&tree=Try
Android Tegra 250 try opt test robocop on 2012-08-20 23:50:23
slave: tegra-108

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 33 Treeherder Robot 2012-08-21 08:24:23 PDT
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=14554066&tree=Ionmonkey
Android Tegra 250 ionmonkey opt test robocop on 2012-08-21 00:25:35
slave: tegra-130

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 34 Treeherder Robot 2012-08-21 17:58:47 PDT
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=14579012&tree=Ionmonkey
Android Tegra 250 ionmonkey opt test robocop on 2012-08-21 17:07:12
slave: tegra-159

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 35 Treeherder Robot 2012-08-22 01:31:49 PDT
edmorley
https://tbpl.mozilla.org/php/getParsedLog.php?id=14590249&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-22 00:47:38
slave: tegra-037

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 36 Treeherder Robot 2012-08-22 06:54:03 PDT
edmorley
https://tbpl.mozilla.org/php/getParsedLog.php?id=14597715&tree=Fx-Team
Android Tegra 250 fx-team opt test robocop on 2012-08-22 05:59:39
slave: tegra-054

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 37 Geoff Brown [:gbrown] (pto May 28-June 13) 2012-08-22 14:44:47 PDT
I was able to reproduce the problem on try, with additional diagnostics: https://tbpl.mozilla.org/?tree=Try&rev=0609ae830d45. Note that all the runs are green, but some would have been failures, except for the addition of automatic re-try code.

What I am seeing is that the history item view that we are trying to access is available in the waitForTest() call, but then sometimes cannot be retrieved a moment later, just after the waitForTest(); if the test waits just a little more and then re-tries, the view is available again -- and it's the same one we found during waitForTest. 

It seems to me that we ought to be able to simply click on the view we find during waitForTest -- I'm testing that approach now.
Comment 38 Treeherder Robot 2012-08-22 15:17:14 PDT
ryanvm%gmail.com
https://tbpl.mozilla.org/php/getParsedLog.php?id=14609450&tree=Firefox
Android Tegra 250 mozilla-central opt test robocop on 2012-08-22 14:29:30
slave: tegra-134

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 39 Treeherder Robot 2012-08-22 19:28:39 PDT
ryanvm%gmail.com
https://tbpl.mozilla.org/php/getParsedLog.php?id=14616225&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-22 18:41:28
slave: tegra-059

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 40 Treeherder Robot 2012-08-23 01:27:26 PDT
darktrojan
https://tbpl.mozilla.org/php/getParsedLog.php?id=14624935&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-23 00:26:06
slave: tegra-221

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 41 Treeherder Robot 2012-08-23 08:24:25 PDT
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=14624624&tree=Ionmonkey
Android Tegra 250 ionmonkey opt test robocop on 2012-08-23 00:19:20
slave: tegra-064

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 42 Geoff Brown [:gbrown] (pto May 28-June 13) 2012-08-23 08:58:12 PDT
Created attachment 654647 [details] [diff] [review]
use more care when accessing history child view

As discussed in comment 37, the failures seem to arise after finding the correct view in the waitForTest, because the subsequent re-retrieval fails. This patch avoids the re-retrieval -- we just use the view we find in the waitForTest. Try run looks good: https://tbpl.mozilla.org/?tree=Try&rev=7e67b2f8a3cc
Comment 43 Joel Maher (:jmaher) 2012-08-23 09:12:30 PDT
Comment on attachment 654647 [details] [diff] [review]
use more care when accessing history child view

Review of attachment 654647 [details] [diff] [review]:
-----------------------------------------------------------------

just the one concern below, otherwise this looks good.  Any chance other tests could benefit from this?

::: mobile/android/base/tests/testHistoryTab.java.in
@@ +159,5 @@
> +        if (!success) {
> +            mAsserter.ok(success != false, "waiting for history item", "history item available");
> +        }
> +        mAsserter.dumpLog("clickLongOnView: "+mFirstChild);
> +        mSolo.clickLongOnView(mFirstChild);

what happens if mFirstChild is still null?  Would this be better suited in an else clause?
Comment 44 Treeherder Robot 2012-08-23 09:19:08 PDT
fitzgen
https://tbpl.mozilla.org/php/getParsedLog.php?id=14618905&tree=Try
Android Tegra 250 try opt test robocop on 2012-08-22 20:21:22
slave: tegra-263

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 45 Treeherder Robot 2012-08-23 10:59:35 PDT
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=14639034&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-23 10:03:27
slave: tegra-272

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
9 INFO TEST-UNEXPECTED-FAIL | testPasswordEncrypt | Storing a password while MP was set should fail - got content://org.mozilla.fennec.db.passwords/passwords/2?profilePath=%2Fmnt%2Fsdcard%2Ftests%2Fprofile, expected null
junit.framework.AssertionFailedError: 9 INFO TEST-UNEXPECTED-FAIL | testPasswordEncrypt | Storing a password while MP was set should fail - got content://org.mozilla.fennec.db.passwords/passwords/2?profilePath=%2Fmnt%2Fsdcard%2Ftests%2Fprofile, expected null
10 INFO TEST-UNEXPECTED-FAIL | testPasswordEncrypt | Exception caught - junit.framework.AssertionFailedError: 9 INFO TEST-UNEXPECTED-FAIL | testPasswordEncrypt | Storing a password while MP was set should fail - got content://org.mozilla.fennec.db.passwords/passwords/2?profilePath=%2Fmnt%2Fsdcard%2Ftests%2Fprofile, expected null
Comment 46 Treeherder Robot 2012-08-23 11:26:59 PDT
ttaubert
https://tbpl.mozilla.org/php/getParsedLog.php?id=14640037&tree=Fx-Team
Android Tegra 250 fx-team opt test robocop on 2012-08-23 10:39:03
slave: tegra-311

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 47 Geoff Brown [:gbrown] (pto May 28-June 13) 2012-08-24 17:59:50 PDT
Created attachment 655232 [details] [diff] [review]
use more care when accessing history child view

(In reply to Joel Maher (:jmaher) from comment #43)
> just the one concern below, otherwise this looks good.  Any chance other
> tests could benefit from this?

I checked all the other uses of waitForTest and couldn't find any instances where I could apply the same technique.
 
> what happens if mFirstChild is still null?  Would this be better suited in
> an else clause?

It's certainly easier to read as an else clause -- I've made this change.

r=jmaher carried.
Comment 48 Geoff Brown [:gbrown] (pto May 28-June 13) 2012-08-24 18:05:51 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/010b43686a5f
Comment 49 Treeherder Robot 2012-08-24 19:44:23 PDT
ryanvm%gmail.com
https://tbpl.mozilla.org/php/getParsedLog.php?id=14687848&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2012-08-24 18:03:41
slave: tegra-089

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 50 Treeherder Robot 2012-08-24 22:56:06 PDT
dcamp
https://tbpl.mozilla.org/php/getParsedLog.php?id=14692906&tree=Fx-Team
Android Tegra 250 fx-team opt test robocop on 2012-08-24 21:39:48
slave: tegra-051

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 51 Ryan VanderMeulen [:RyanVM] 2012-08-25 08:47:03 PDT
https://hg.mozilla.org/mozilla-central/rev/010b43686a5f
Comment 52 Treeherder Robot 2012-08-25 10:12:53 PDT
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=14704455&tree=Fx-Team
Android Tegra 250 fx-team opt test robocop on 2012-08-25 07:57:22
slave: tegra-083

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 53 Treeherder Robot 2012-08-25 11:43:43 PDT
Ms2ger%gmail.com
https://tbpl.mozilla.org/php/getParsedLog.php?id=14707280&tree=Try
Android Tegra 250 try opt test robocop on 2012-08-25 10:34:27
slave: tegra-106

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!
Comment 54 Treeherder Robot 2012-08-28 16:53:09 PDT
jimb
https://tbpl.mozilla.org/php/getParsedLog.php?id=14694511&tree=Try
Android Tegra 250 try opt test robocop on 2012-08-24 22:57:26
slave: tegra-209

18 INFO TEST-UNEXPECTED-FAIL | testHistoryTab | Exception caught - junit.framework.AssertionFailedError: View is null and can therefore not be clicked!

Note You need to log in before you can comment on or make changes to this bug.