Chromium Code Reviews| 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..1dcfd213484f39597ba52a4a38162debccf81dc1 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,16 @@ 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. |
| + function frequentRequestsRateLimited() { |
| + chrome.tabs.update(testTabId_, {muted: true}, pass()); |
| + chrome.tabs.update(testTabId_, {muted: false}, function(tab) { |
| + var errMsg = "Rate limit exceeded when updating mute state for tab " + |
| + testTabId_ + "."; |
| + chrome.test.assertLastError(errMsg); |
|
miu
2015/07/18 00:42:42
To answer your question: Yes, this is better than
Jared Sohn
2015/07/18 23:57:24
I have added a new test case to show that setting
|
| + }); |
| } |
| ]); |