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

Unified Diff: chrome/browser/ui/webui/options/options_browsertest.js

Issue 2630583002: Add setting to isolate zoom changes by default. (Closed)
Patch Set: Use code review comments for questions instead of TODOs. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/options_browsertest.js
diff --git a/chrome/browser/ui/webui/options/options_browsertest.js b/chrome/browser/ui/webui/options/options_browsertest.js
index bbb019fea0d1f2675009f26c54794cacd111358d..3cb7f54e01843668182c813c4df273bc527f4f70 100644
--- a/chrome/browser/ui/webui/options/options_browsertest.js
+++ b/chrome/browser/ui/webui/options/options_browsertest.js
@@ -62,6 +62,7 @@ OptionsWebUITest.prototype = {
preLoad: function() {
this.makeAndRegisterMockHandler(
['defaultZoomFactorAction',
+ 'defaultZoomScopeAction',
'fetchPrefs',
'observePrefs',
'setBooleanPref',
@@ -203,6 +204,20 @@ TEST_F('OptionsWebUITest', 'testDefaultZoomFactor', function() {
});
/**
+ * Test the default zoom scope checkbox.
+ */
+TEST_F('OptionsWebUITest', 'testDefaultZoomScope', function() {
+ // Verify that the zoom scope checkbox exists.
+ var defaultZoomScope = $('defaultZoomScope');
+ assertNotEquals(defaultZoomScope, null);
+ var initialValue = $('defaultZoomScope').checked;
+
+ this.mockHandler.expects(once()).defaultZoomScopeAction([!initialValue]);
+ defaultZoomScope.click();
+ testDone();
+});
+
+/**
* If |confirmInterstitial| is true, the OK button of the Do Not Track
* interstitial is pressed, otherwise the abort button is pressed.
* @param {boolean} confirmInterstitial Whether to confirm the Do Not Track

Powered by Google App Engine
This is Rietveld 408576698