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

Side by Side Diff: chrome/test/data/extensions/api_test/tabs/basics/muted.js

Issue 987583004: Add audible, muted to Tab, c.t.query, c.t.update, and c.t.onUpdated where relevant (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patch1
Patch Set: tests; also mutedCause is a part of the tab object and capture mutedCause changed to just 'capture' Created 5 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 (c) 2011 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 var testTabId_;
6
7 chrome.test.runTests([
8 function setupWindow() {
9 chrome.tabs.getCurrent(pass(function(tab) {
10 testTabId_ = tab.id;
11 }));
12 },
13
14 function mutedStartsFalse() {
15 chrome.tabs.get(testTabId_, pass(function(tab) {
16 assertEq(false, tab.muted);
17 checkQuery(testTabId_, "muted", false, true, null);
18 checkQuery(testTabId_, "muted", true, false, null);
19 }));
20 },
21
22 function makeMuted() {
23 onUpdatedExpect("muted", true, {mutedCause: chrome.runtime.id});
24 chrome.tabs.update(testTabId_, {muted: true}, pass());
25 },
26
27 function testStaysMutedAfterChangingWindow() {
28 chrome.windows.create({}, pass(function(window)
29 {
30 chrome.tabs.move(testTabId_, {windowId: window.id, index: -1},
31 pass(function(tab) {
32 assertEq(true, tab.muted);
33 }));
34 }));
35 },
36
37 function makeNotMuted() {
38 onUpdatedExpect("muted", false, {mutedCause: chrome.runtime.id});
39 chrome.tabs.update(testTabId_, {muted: false}, pass());
40 }
41 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698