Add end-to-end test on cross-repo below independent review

The merge of a cross-repo below an independent review is a use case we
partially support: the cross-repo can be merged but a "Code-Review -1"
is sometimes pushed on the cross-repo (this occurs when pushing a new
version of a patchset of the cross-repo). The next commit will avoid
this "Code-Review -1".

Change-Id: I920a075b81b9448010f68bd43bcc11c3f4146052
diff --git a/test.rb b/test.rb
index a03331a..65d7e24 100755
--- a/test.rb
+++ b/test.rb
@@ -73,6 +73,20 @@
     check_status(commit2, 'MERGED')
+ def test_crossrepo_topic_2_repos_below_not_merged_commit
+    commit1 = create_review(PROJECT1, "review1 on #{PROJECT1}", "crossrepo/topic2")
+    commit1b = create_review(PROJECT1, "review1b on #{PROJECT1}")
+    commit2 = create_review(PROJECT2, "review2 on #{PROJECT2}", "crossrepo/topic2")
+    approve_review(commit1)
+    check_status(commit1, 'NEW')
+    check_status(commit2, 'NEW')
+    approve_review(commit2)
+    check_status(commit1, 'MERGED')
+    check_status(commit2, 'MERGED')
+  end
   def test_refupdatedevent_merge_upper_commit
     commit1a = create_review(PROJECT1, "review1a on #{PROJECT1}")
     commit1b = create_review(PROJECT1, "review1b on #{PROJECT1}")