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

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

Issue 2858353002: MediaPerceptionPrivate API impl and testing. (Closed)
Patch Set: ImageFrameProtoToIdl and unittest 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 chrome.test.runTests([
9 function registerListener() {
10 // Need to start the mocked media analytics process.
11 chrome.mediaPerceptionPrivate.setState(
tbarzic 2017/05/11 00:38:27 same feedback as previous test
Luke Sorenson 2017/05/11 23:57:58 Done.
12 { status: 'RUNNING' }, chrome.test.callbackPass(function(state) {
13 chrome.test.assertEq(state.status, 'RUNNING');
14 }));
15 chrome.test.listenOnce(
16 chrome.mediaPerceptionPrivate.onMediaPerception,
17 function(evt) {
18 chrome.test.assertEq(evt.framePerceptions[0].frameId, 1);
19 });
20 // By sending this message, we trigger the fake D-Bus client to fire an
21 // onMediaPerception event.
22 chrome.test.sendMessage('mediaPerceptionListenerSet');
23 }
24 ]);
25
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698