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

Unified Diff: chrome/test/data/webui/settings/category_default_setting_tests.js

Issue 2509163004: [MD settings] content category policy (Closed)
Patch Set: nits Created 4 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/browser/resources/settings/site_settings/category_default_setting.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/settings/category_default_setting_tests.js
diff --git a/chrome/test/data/webui/settings/category_default_setting_tests.js b/chrome/test/data/webui/settings/category_default_setting_tests.js
index 59a191bf38d78f668488929b392bfbe70903fb0c..306e535e0c5ea6365e3061e1523dfe326a86aa89 100644
--- a/chrome/test/data/webui/settings/category_default_setting_tests.js
+++ b/chrome/test/data/webui/settings/category_default_setting_tests.js
@@ -113,7 +113,8 @@ cr.define('category_default_setting', function() {
assertEquals(
settings.ContentSettingsTypes.GEOLOCATION, contentType);
assertEquals(enabled, testElement.categoryEnabled);
- MockInteractions.tap(testElement.$.toggle);
+ browserProxy.resetResolver('setDefaultValueForContentType');
+ MockInteractions.tap(testElement.$.toggle.$.control);
return browserProxy.whenCalled('setDefaultValueForContentType');
}).then(function(args) {
assertEquals(
@@ -192,10 +193,12 @@ cr.define('category_default_setting', function() {
assertEquals(category, contentType);
assertTrue(testElement.categoryEnabled);
+ assertTrue(testElement.categoryEnabled);
assertFalse(secondaryToggle.disabled);
assertTrue(secondaryToggle.checked);
- MockInteractions.tap(testElement.$.toggle);
+ browserProxy.resetResolver('setDefaultValueForContentType');
+ MockInteractions.tap(testElement.$.toggle.$.control);
return browserProxy.whenCalled('setDefaultValueForContentType');
}).then(function(args) {
// Check THIRD_STATE => BLOCK transition succeeded.
@@ -208,7 +211,7 @@ cr.define('category_default_setting', function() {
assertTrue(secondaryToggle.checked);
browserProxy.resetResolver('setDefaultValueForContentType');
- MockInteractions.tap(testElement.$.toggle);
+ MockInteractions.tap(testElement.$.toggle.$.control);
return browserProxy.whenCalled('setDefaultValueForContentType');
}).then(function(args) {
// Check BLOCK => THIRD_STATE transition succeeded.
@@ -221,7 +224,7 @@ cr.define('category_default_setting', function() {
assertTrue(secondaryToggle.checked);
browserProxy.resetResolver('setDefaultValueForContentType');
- MockInteractions.tap(secondaryToggle);
+ MockInteractions.tap(secondaryToggle.$.control);
return browserProxy.whenCalled('setDefaultValueForContentType');
}).then(function(args) {
// Check THIRD_STATE => ALLOW transition succeeded.
@@ -235,7 +238,7 @@ cr.define('category_default_setting', function() {
assertFalse(secondaryToggle.checked);
browserProxy.resetResolver('setDefaultValueForContentType');
- MockInteractions.tap(testElement.$.toggle);
+ MockInteractions.tap(testElement.$.toggle.$.control);
return browserProxy.whenCalled('setDefaultValueForContentType');
}).then(function(args) {
// Check ALLOW => BLOCK transition succeeded.
@@ -248,7 +251,7 @@ cr.define('category_default_setting', function() {
assertFalse(secondaryToggle.checked);
browserProxy.resetResolver('setDefaultValueForContentType');
- MockInteractions.tap(testElement.$.toggle);
+ MockInteractions.tap(testElement.$.toggle.$.control);
return browserProxy.whenCalled('setDefaultValueForContentType');
}).then(function(args) {
// Check BLOCK => ALLOW transition succeeded.
@@ -261,7 +264,7 @@ cr.define('category_default_setting', function() {
assertFalse(secondaryToggle.checked);
browserProxy.resetResolver('setDefaultValueForContentType');
- MockInteractions.tap(secondaryToggle);
+ MockInteractions.tap(secondaryToggle.$.control);
return browserProxy.whenCalled('setDefaultValueForContentType');
}).then(function(args) {
// Check ALLOW => THIRD_STATE transition succeeded.
« no previous file with comments | « chrome/browser/resources/settings/site_settings/category_default_setting.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698