1. 30 Oct, 2018 3 commits
    • Giovanni Ortuño Urquidi's avatar
      bluetooth: Check the correct value was set when powering on/off · c9a6360c
      Giovanni Ortuño Urquidi authored
      Part of a bigger refactor to change how tests work. Currently tests
      perform the following steps:
      
      1. Set the next response to a BlueZ method call
      2. Call a method that will call the BlueZ method
      3. Check that the BlueZ method was called the right number of times
      4. Apply the values that were passed to the BlueZ method
      
      With this approach, we have no control over when BlueZ replies and
      we don't know what values were passed to BlueZ until after we apply
      them.
      
      This CL address the second problem by exposing a GetSetValueForTesting
      method in dbus::Property and adding a GetLastSetPoweredValue() method
      to tests that use GetSetValueForTesting to test that the BlueZ method
      was called with the right value. Now that we don't need to apply the
      `set_value` to know what it was, we can remove
      SimulateSetPoweredCompleted.
      
      A follow up CL will address the first problem. In the end tests should
      perform the following steps:
      
      1. Call a method that will call a BlueZ method
      2. Check that the BlueZ method was called the right number of times
      3. Check that the BlueZ method was called with the right value
      4. Simulate the BlueZ method replying
      
      An added benefit of this approach is that we can simulate other
      operations, like the adapter getting removed, between steps 1.
      and 4., something that happens often in real devices.
      
      Bug: 870192
      Change-Id: I0c2cfc90a84d6d79b158804264c0e93664310a08
      Reviewed-on: https://chromium-review.googlesource.com/c/1298818Reviewed-by: default avatarRyo Hashimoto <hashimoto@chromium.org>
      Reviewed-by: default avatarOvidio Henriquez <odejesush@chromium.org>
      Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#603697}
      c9a6360c
    • Becky Zhou's avatar
      [Feed] Fix compile error and test crash when compiled with dummy version · 8dfabd8a
      Becky Zhou authored
      Bug: 897502
      Change-Id: If4e9c315c5742be40764e9a13f0d002acb96a43e
      Reviewed-on: https://chromium-review.googlesource.com/c/1305821
      Commit-Queue: Becky Zhou <huayinz@chromium.org>
      Reviewed-by: default avatarTheresa <twellington@chromium.org>
      Reviewed-by: default avatarSky Malice <skym@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#603696}
      8dfabd8a
    • Scott Violet's avatar
      chromeos: adds timeout to waiting for events · 5c8c1f9c
      Scott Violet authored
      This way, if a client is too slow we'll inject the next event. I have no
      doubt we will need more sophisticated things, but this is a start to ensure
      we don't get entirely wedged.
      
      BUG=none
      TEST=covered by test
      
      Change-Id: If4c233431be3239476227fc0271a5bc18cfff479
      Reviewed-on: https://chromium-review.googlesource.com/c/1303353
      Commit-Queue: Scott Violet <sky@chromium.org>
      Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#603695}
      5c8c1f9c
  2. 29 Oct, 2018 37 commits