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

Unified Diff: chrome/test/data/extensions/api_test/preference/data_reduction_proxy/test.js

Issue 823703002: Check that dataReductionUpdateDailyLengths is reset. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename drp and pp. Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/api_test/preference/data_reduction_proxy/manifest.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/preference/data_reduction_proxy/test.js
diff --git a/chrome/test/data/extensions/api_test/preference/data_reduction_proxy/test.js b/chrome/test/data/extensions/api_test/preference/data_reduction_proxy/test.js
index d76d6e12a0dee7de8af29692fab08807c4d9789a..414ef39d564a1b09cc5aa64c30f6acf6b8c51d68 100644
--- a/chrome/test/data/extensions/api_test/preference/data_reduction_proxy/test.js
+++ b/chrome/test/data/extensions/api_test/preference/data_reduction_proxy/test.js
@@ -5,10 +5,11 @@
// Content settings API test
// Run with browser_tests --gtest_filter=ExtensionApiTest.DataReductionProxy
-var drp = chrome.dataReductionProxy;
+var dataReductionProxy = chrome.dataReductionProxy;
+var privatePreferences = chrome.preferencesPrivate;
chrome.test.runTests([
function getDrpPrefs() {
- drp.spdyProxyEnabled.get({}, chrome.test.callbackPass(
+ dataReductionProxy.spdyProxyEnabled.get({}, chrome.test.callbackPass(
function(result) {
chrome.test.assertEq(
{
@@ -17,8 +18,8 @@ chrome.test.runTests([
},
result);
}));
- drp.dataReductionDailyContentLength.get({}, chrome.test.callbackPass(
- function(result) {
+ dataReductionProxy.dataReductionDailyContentLength.get({},
+ chrome.test.callbackPass(function(result) {
chrome.test.assertEq(
{
'value': [],
@@ -26,8 +27,8 @@ chrome.test.runTests([
},
result);
}));
- drp.dataReductionDailyReceivedLength.get({}, chrome.test.callbackPass(
- function(result) {
+ dataReductionProxy.dataReductionDailyReceivedLength.get({},
+ chrome.test.callbackPass(function(result) {
chrome.test.assertEq(
{
'value': [],
@@ -35,26 +36,25 @@ chrome.test.runTests([
},
result);
}));
- drp.dataReductionUpdateDailyLengths.get({}, chrome.test.callbackPass(
- function(result) {
+ privatePreferences.dataReductionUpdateDailyLengths.get({},
+ chrome.test.callbackPass(function(result) {
chrome.test.assertEq(
{
- 'value': false,
- 'levelOfControl': 'controllable_by_this_extension'
+ 'value': false
},
result);
}));
},
function updateDailyLengths() {
- drp.dataReductionDailyContentLength.onChange.addListener(
+ dataReductionProxy.dataReductionDailyContentLength.onChange.addListener(
confirmDailyContentLength);
- drp.dataReductionDailyReceivedLength.onChange.addListener(
+ dataReductionProxy.dataReductionDailyReceivedLength.onChange.addListener(
confirmRecievedLength);
// Trigger calls to confirmDailyContentLength.onChange and
// dataReductionDailyReceivedLength.onChange listeners.
- drp.spdyProxyEnabled.set({ 'value': true });
- drp.dataReductionUpdateDailyLengths.set({'value': true});
+ dataReductionProxy.spdyProxyEnabled.set({ 'value': true });
+ privatePreferences.dataReductionUpdateDailyLengths.set({'value': true});
// Helper methods.
var expectedDailyLengths = [];
@@ -62,7 +62,7 @@ chrome.test.runTests([
expectedDailyLengths[i] = '0';
}
function confirmRecievedLength() {
- drp.dataReductionDailyReceivedLength.get({},
+ dataReductionProxy.dataReductionDailyReceivedLength.get({},
chrome.test.callbackPass(function(result) {
chrome.test.assertEq(
{
@@ -71,9 +71,17 @@ chrome.test.runTests([
},
result);
}));
+ privatePreferences.dataReductionUpdateDailyLengths.get({},
+ chrome.test.callbackPass(function(result) {
+ chrome.test.assertEq(
+ {
+ 'value': false
+ },
+ result);
+ }));
}
function confirmDailyContentLength() {
- drp.dataReductionDailyContentLength.get({},
+ dataReductionProxy.dataReductionDailyContentLength.get({},
chrome.test.callbackPass(function(result) {
chrome.test.assertEq(
{
@@ -82,6 +90,14 @@ chrome.test.runTests([
},
result);
}));
+ privatePreferences.dataReductionUpdateDailyLengths.get({},
+ chrome.test.callbackPass(function(result) {
+ chrome.test.assertEq(
+ {
+ 'value': false
+ },
+ result);
+ }));
}
}
]);
« no previous file with comments | « chrome/test/data/extensions/api_test/preference/data_reduction_proxy/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698