OSDN Git Service

Fix NetworkNotificationManagerTest
authorHugo Benichi <hugobenichi@google.com>
Thu, 23 Mar 2017 03:32:27 +0000 (12:32 +0900)
committerHugo Benichi <hugobenichi@google.com>
Thu, 18 May 2017 02:08:31 +0000 (11:08 +0900)
commite6181b0c47c161be56bbc07f69275fe768634b82
treedc48d7023329e039403b35c9adc8c9e48b4bfed7
parentc01fbf0f0c7903f2181a8be933b7020cc6af85c5
Fix NetworkNotificationManagerTest

The testNotificationsShownAndCleared test was not doing anything
because the list of notification to show was always empty.

This patch fixes this issue and actually makes the test loop on
non-empty collections, and also fixes another ordering issue in
assertions themselves, hidden until now by the first issue.

Bug: 32561414
Test: runtest -x frameworks/base/tests/net/java/com/android/server/connectivity/NetworkNotificationManagerTest.java
Merged-In: I4837b1175d7c9133e9156e33acaa1e7e3341cc62
Change-Id: Ia30587bd68a87b83b62f57eeeb28fef7d95dbf81

(cherry picked from commit f8b804be5aeb5d0a36ff88649d7c5ecdc47c3ad1)
tests/net/java/com/android/server/connectivity/NetworkNotificationManagerTest.java