Commit 67713153 authored by kalman@chromium.org's avatar kalman@chromium.org

Re-enable ExtensionSettingsApiTest after removing the "throttling" JS test

which is extremely slow.

BUG=248032
R=yoz@chromium.org

Review URL: https://codereview.chromium.org/129603002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243877 0039d316-1c4b-4281-b951-d872f2087c98
parent 670f140e
......@@ -251,8 +251,7 @@ class ExtensionSettingsApiTest : public ExtensionApiTest {
#endif
};
// Flaky. http://crbug.com/248032
IN_PROC_BROWSER_TEST_F(ExtensionSettingsApiTest, DISABLED_SimpleTest) {
IN_PROC_BROWSER_TEST_F(ExtensionSettingsApiTest, SimpleTest) {
ASSERT_TRUE(RunExtensionTest("settings/simple_test")) << message_;
}
......
......@@ -362,41 +362,4 @@ chrome.test.runTests([
}
area.clear(stage0);
},
// NOTE: throttling test must come last, since each test runs with a single
// quota.
function throttling() {
// Test script is as so:
// 1 - storage.local shouldn't be exceeded.
// 2 - storage.sync should be exceeded.
// 3 - storage.local still shouldn't be exceeded.
// 4 - storage.sync should still be exceeded.
//
// In general, things should get throttled after 1000 calls (though in
// reality will be fewer due to previous tests).
function clearNTimes(area, n, whenDone) {
if (n <= 0) {
whenDone();
} else {
area.clear(function() {
clearNTimes(area, n - 1, whenDone);
});
}
}
var local = chrome.storage.local;
var sync = chrome.storage.sync;
var test = chrome.test;
var quotaError =
"This request exceeds the MAX_WRITE_OPERATIONS_PER_HOUR quota.";
clearNTimes(local, 1001, test.callbackPass(function() {
clearNTimes(sync, 1001, test.callbackFail(quotaError, function() {
clearNTimes(local, 1, test.callbackPass(function() {
clearNTimes(sync, 1, test.callbackFail(quotaError, test.succeed));
}));
}));
}));
},
]);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment