Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Issue 2462833002: Refactor audio API tests (Closed)

Created:
4 years, 1 month ago by tbarzic
Modified:
4 years, 1 month ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor audio API tests Instead of using custom messages to send test reuslts from test app to test runner for tests for API events, use standard extensions::ResultCatcher to get results - it workss better with chrome.test.assert methods and produces better failure messages. Use chrome.test.listenOnce to register event listeners in tests. Note that there is no need for chrome.test.succeed for test cases using listenOnce - it will get called once listener is run (unless listener function asserts, in which case test will fail). Refactors audio/test.js - added helper methods for testing relevant properties of devices returned by chrome.audio.getInfo to make expectations a bit easier to specify/understand. The refactored test are less dependent on exact order in which audio devices are reported in device list (as the order is of no relevance). Committed: https://crrev.com/65dca4379e4a31128c1328c6d5e6b83840b4f9da Cr-Commit-Position: refs/heads/master@{#429678}

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : Refactor audio API tests #

Patch Set 4 : Refactor audio API tests #

Patch Set 5 : . #

Total comments: 2

Patch Set 6 : Refactor audio API tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+307 lines, -213 lines) Patch
M extensions/browser/api/audio/audio_apitest.cc View 11 chunks +13 lines, -21 lines 0 comments Download
M extensions/test/data/api_test/audio/add_nodes/background.js View 1 2 3 4 5 1 chunk +42 lines, -38 lines 0 comments Download
M extensions/test/data/api_test/audio/input_mute_change/background.js View 1 chunk +11 lines, -9 lines 0 comments Download
M extensions/test/data/api_test/audio/output_mute_change/background.js View 1 chunk +11 lines, -9 lines 0 comments Download
M extensions/test/data/api_test/audio/remove_nodes/background.js View 1 2 3 4 5 1 chunk +35 lines, -28 lines 0 comments Download
M extensions/test/data/api_test/audio/test.js View 1 2 3 4 1 chunk +186 lines, -99 lines 0 comments Download
M extensions/test/data/api_test/audio/volume_change/background.js View 1 chunk +9 lines, -9 lines 0 comments Download

Messages

Total messages: 23 (16 generated)
tbarzic
4 years, 1 month ago (2016-10-31 19:01:03 UTC) #10
Rahul Chaturvedi
lgtm! Thanks for fixing these up. (Adding Jenny, 'cause Audio) https://codereview.chromium.org/2462833002/diff/80001/extensions/test/data/api_test/audio/remove_nodes/background.js File extensions/test/data/api_test/audio/remove_nodes/background.js (right): https://codereview.chromium.org/2462833002/diff/80001/extensions/test/data/api_test/audio/remove_nodes/background.js#newcode40 ...
4 years, 1 month ago (2016-10-31 20:30:10 UTC) #14
tbarzic
https://codereview.chromium.org/2462833002/diff/80001/extensions/test/data/api_test/audio/remove_nodes/background.js File extensions/test/data/api_test/audio/remove_nodes/background.js (right): https://codereview.chromium.org/2462833002/diff/80001/extensions/test/data/api_test/audio/remove_nodes/background.js#newcode40 extensions/test/data/api_test/audio/remove_nodes/background.js:40: chrome.test.sendMessage("loaded"); On 2016/10/31 20:30:10, Rahul Chaturvedi wrote: > nit: ...
4 years, 1 month ago (2016-10-31 20:37:11 UTC) #15
jennyz
lgtm
4 years, 1 month ago (2016-11-02 23:45:09 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2462833002/100001
4 years, 1 month ago (2016-11-03 17:00:01 UTC) #19
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 1 month ago (2016-11-03 20:00:09 UTC) #21
commit-bot: I haz the power
4 years, 1 month ago (2016-11-03 20:03:52 UTC) #23
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/65dca4379e4a31128c1328c6d5e6b83840b4f9da
Cr-Commit-Position: refs/heads/master@{#429678}

Powered by Google App Engine
This is Rietveld 408576698