| Index: chrome/test/data/extensions/api_test/tabs/basics/muted.js
|
| diff --git a/chrome/test/data/extensions/api_test/tabs/basics/muted.js b/chrome/test/data/extensions/api_test/tabs/basics/muted.js
|
| index 6487325f95811273a99361c1bd3ae46b0da954c8..5399bb738cae37e9a879742499bad55827f14bdd 100644
|
| --- a/chrome/test/data/extensions/api_test/tabs/basics/muted.js
|
| +++ b/chrome/test/data/extensions/api_test/tabs/basics/muted.js
|
| @@ -30,8 +30,7 @@ chrome.test.runTests([
|
| },
|
|
|
| function testStaysMutedAfterChangingWindow() {
|
| - chrome.windows.create({}, pass(function(window)
|
| - {
|
| + chrome.windows.create({}, pass(function(window) {
|
| chrome.tabs.move(testTabId_, {windowId: window.id, index: -1},
|
| pass(function(tab) {
|
| assertEq(true, tab.muted);
|
| @@ -42,5 +41,19 @@ chrome.test.runTests([
|
| function makeNotMuted() {
|
| onUpdatedExpect("muted", false, {mutedCause: chrome.runtime.id});
|
| chrome.tabs.update(testTabId_, {muted: false}, pass());
|
| + },
|
| +
|
| + // Prior tests in this file have already toggled the muted state twice.
|
| + // We update a third (and final) time before rate limiting kicks in.
|
| + // (except rate limiting is ignored when we set muted/mutedCause to
|
| + // the same values.)
|
| + function frequentRequestsRateLimited() {
|
| + chrome.tabs.update(testTabId_, {muted: true}, pass());
|
| + chrome.tabs.update(testTabId_, {muted: true}, pass()); // ignored
|
| + chrome.tabs.update(testTabId_, {muted: false}, function(tab) {
|
| + var errMsg = "Rate limit exceeded when updating mute state for tab " +
|
| + testTabId_ + ".";
|
| + chrome.test.assertLastError(errMsg);
|
| + });
|
| }
|
| ]);
|
|
|