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

Unified Diff: chrome/test/data/webui/extensions/extension_manager_test.js

Issue 2526893002: [MD Extensions] Update subpages when the backing extension data changes (Closed)
Patch Set: woot Created 4 years, 1 month 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/webui/extensions/cr_extensions_browsertest.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/extensions/extension_manager_test.js
diff --git a/chrome/test/data/webui/extensions/extension_manager_test.js b/chrome/test/data/webui/extensions/extension_manager_test.js
index 5e99cf68e4078a7307230eba431a76fa01fa08fd..52830c92957a5af174db424ca3d9faaa46ee2333 100644
--- a/chrome/test/data/webui/extensions/extension_manager_test.js
+++ b/chrome/test/data/webui/extensions/extension_manager_test.js
@@ -11,6 +11,7 @@ cr.define('extension_manager_tests', function() {
ShowItems: 'show items',
ChangePages: 'change pages',
UrlNavigationToDetails: 'url navigation to details',
+ UpdateItemData: 'update item data',
};
function getDataByName(list, name) {
@@ -159,6 +160,31 @@ cr.define('extension_manager_tests', function() {
var detailsView = manager.$['details-view'];
expectEquals('ldnnhddmnhbkjipkidpdiheffobcpfmf', detailsView.data.id);
});
+
+ test(assert(TestNames.UpdateItemData), function() {
+ var oldDescription = 'old description';
+ var newDescription = 'new description';
+ var extension = extension_test_util.createExtensionInfo(
+ {description: oldDescription});
+ manager.addItem(extension);
+ var data = manager.extensions[0];
+ manager.showItemDetails(extension);
+ var detailsView = manager.$['details-view'];
+ expectEquals(extension.id, detailsView.data.id);
+ expectEquals(oldDescription, detailsView.data.description);
+ expectEquals(
+ oldDescription,
+ detailsView.$$('.section .section-content').textContent.trim());
+
+ var extensionCopy = Object.assign({}, extension);
+ extensionCopy.description = newDescription;
+ manager.updateItem(extensionCopy);
+ expectEquals(extension.id, detailsView.data.id);
+ expectEquals(newDescription, detailsView.data.description);
+ expectEquals(
+ newDescription,
+ detailsView.$$('.section .section-content').textContent.trim());
michaelpg 2016/11/28 23:00:54 optional: add a different extension item, and veri
Devlin 2016/11/29 02:14:40 Sure, done.
+ });
});
}
« no previous file with comments | « chrome/test/data/webui/extensions/cr_extensions_browsertest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698