bluetooth_AdapterLEAdvertising: add 16 test cases for multi-advertising

This patch implements a number of test cases to verify bluetooth
low-energy advertising as a peripheral where each test case
comprises a distinct combination and permutation of tests.

Specifically, this autotest includes the following test cases:
    self.run_multiple_advertising_test_cases()
    self.test_case_SI200_RA3_CD_UA3()
    self.test_case_SI200_RA3_CD_RA1_CD_UA1_CD_UA3()
    self.test_case_SI200_RA3_CD_RS()
    self.test_case_SI200_RA3_CD_UA1_CD_RS()
    self.test_case_SI200_RA3_CD_PC_CD_UA3()
    self.test_case_SI200_RA3_CD_SR_CD_UA3()
    self.test_case_SI200_RA3_CD_UA1_CD_RA2_CD_UA4()
    self.test_case_SI200_RA5_CD_FRA1_CD_UA5()
    self.test_case_RA3_CD_SI200_CD_UA3()
    self.test_case_RA3_CD_SI200_CD_RS()
    self.test_case_RA3_CD_SI200_CD_UA1_CD_RS()
    self.test_case_RA3_CD_SI200_CD_SI2000_CD_UA3()
    self.test_case_RA5_CD_SI200_CD_FRA1_CD_UA5()
    self.test_case_RA3_CD_SI200_CD_FSI10_CD_FSI20000_CD_UA3()
    self.test_case_RA3_CD_SI200_CD_PC_CD_UA3()
    self.test_case_RA3_CD_SI200_CD_SR_CD_UA3()

Mnemonics of the test cases:
    CD: check advertising duration and intervals
    RA: register advertisements
    UA: unregister advertisements
    SI: set advertising intervals
    RS: reset advertising
    FRA: fail to register extra advertisements when max ones have
         been registered.
    FSI: fail to set advertising intervals beyond legitimate range
         of [20 ms, 10,240 ms].
    PC: power cycle the bluetooth adapter (controller).
    SR: suspend and resume the DUT (chromebook)

BUG=chromium:602461
TEST=Conduct the autotest as follows:
Test advertising with multiple advertisement instances simultaneously.
(cr) $ test_that --board=$BOARD $DUT_IP bluetooth_AdapterLEAdvertising.multiple

Change-Id: I49c606f624561b6d017cadf5911298285df7834f
Reviewed-on: https://chromium-review.googlesource.com/412911
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
diff --git a/server/cros/bluetooth/advertisements_data.py b/server/cros/bluetooth/advertisements_data.py
new file mode 100644
index 0000000..916df82
--- /dev/null
+++ b/server/cros/bluetooth/advertisements_data.py
@@ -0,0 +1,69 @@
+# Copyright 2016 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""A list of advertisements data for testing purpose."""
+
+
+ADVERTISEMENT1 = {
+    'Path': '/org/bluez/test/advertisement1',
+    'Type': 'peripheral',
+    'ManufacturerData': {'0xff01': [0x1a, 0x1b, 0x1c, 0x1d, 0x1e]},
+    'ServiceUUIDs': ['180D', '180F'],
+    'SolicitUUIDs': [],
+    'ServiceData': {'9991': [0x11, 0x12, 0x13, 0x14, 0x15]},
+    'IncludeTxPower': True}
+
+
+ADVERTISEMENT2 = {
+    'Path': '/org/bluez/test/advertisement2',
+    'Type': 'peripheral',
+    'ManufacturerData': {'0xff02': [0x2a, 0x2b, 0x2c, 0x2d, 0x2e]},
+    'ServiceUUIDs': ['1821'],
+    'SolicitUUIDs': [],
+    'ServiceData': {'9992': [0x21, 0x22, 0x23, 0x24, 0x25]},
+    'IncludeTxPower': True}
+
+
+ADVERTISEMENT3 = {
+    'Path': '/org/bluez/test/advertisement3',
+    'Type': 'peripheral',
+    'ManufacturerData': {'0xff03': [0x3a, 0x3b, 0x3c, 0x3d, 0x3e]},
+    'ServiceUUIDs': ['1819', '180E'],
+    'SolicitUUIDs': [],
+    'ServiceData': {'9993': [0x31, 0x32, 0x33, 0x34, 0x35]},
+    'IncludeTxPower': True}
+
+
+ADVERTISEMENT4 = {
+    'Path': '/org/bluez/test/advertisement4',
+    'Type': 'peripheral',
+    'ManufacturerData': {'0xff04': [0x4a, 0x4b, 0x4c, 0x4d, 0x4e]},
+    'ServiceUUIDs': ['1808', '1810'],
+    'SolicitUUIDs': [],
+    'ServiceData': {'9994': [0x41, 0x42, 0x43, 0x44, 0x45]},
+    'IncludeTxPower': True}
+
+
+ADVERTISEMENT5 = {
+    'Path': '/org/bluez/test/advertisement5',
+    'Type': 'peripheral',
+    'ManufacturerData': {'0xff05': [0x5a, 0x5b, 0x5c, 0x5d, 0x5e]},
+    'ServiceUUIDs': ['1818', '181B'],
+    'SolicitUUIDs': [],
+    'ServiceData': {'9995': [0x51, 0x52, 0x53, 0x54, 0x55]},
+    'IncludeTxPower': True}
+
+
+ADVERTISEMENT6 = {
+    'Path': '/org/bluez/test/advertisement6',
+    'Type': 'peripheral',
+    'ManufacturerData': {'0xff06': [0x6a, 0x6b, 0x6c, 0x6d, 0x6e]},
+    'ServiceUUIDs': ['1820'],
+    'SolicitUUIDs': [],
+    'ServiceData': {'9996': [0x61, 0x62, 0x63, 0x64, 0x65]},
+    'IncludeTxPower': True}
+
+
+ADVERTISEMENTS = [ADVERTISEMENT1, ADVERTISEMENT2, ADVERTISEMENT3,
+                  ADVERTISEMENT4, ADVERTISEMENT5, ADVERTISEMENT6]