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

Side by Side Diff: chrome/test/data/extensions/api_test/media_perception_private/media_perception/runtest.js

Issue 2791983004: DBus MediaAnalyticsClient and media_perception pb. (Closed)
Patch Set: Fixing compile error Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Set the state to STARTED to automatically start listening to
6 // MediaPerceptionDetection signals.
7
8 function setState() {
9 let kStatusEnum = "STARTED";
10 chrome.mediaPerceptionPrivate.setState(
11 { status: statusEnum }, chrome.test.callbackPass(
12 function (response) {
13 chrome.test.assertEq(response.status, statusEnum);
14 }));
15 }
16
17 function registerListener() {
18 chrome.test.listenOnce(
19 chrome.mediaPerceptionPrivate.onMediaPerception,
20 function(evt) {
21 chrome.test.assertEq(evt.timestamp, 1);
22 });
23 chrome.test.notifyPass();
tbarzic 2017/05/05 21:10:41 you should not need this.
Luke Sorenson 2017/05/08 19:06:06 Done. In https://codereview.chromium.org/285835300
24 }
25
26 chrome.test.runTests([setState, registerListener]);
27
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698