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

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

Issue 1447183005: [MD Extensions] Fix item sorting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Michael's Created 5 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/extension_manager_test.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_test_util.js
diff --git a/chrome/test/data/webui/extensions/extension_test_util.js b/chrome/test/data/webui/extensions/extension_test_util.js
index ccea8dfed8aef36382e994b1bbf2289df49f6c56..72d845afe3b6306ac38cdf5963c7661499655bc2 100644
--- a/chrome/test/data/webui/extensions/extension_test_util.js
+++ b/chrome/test/data/webui/extensions/extension_test_util.js
@@ -46,8 +46,33 @@ cr.define('extension_test_util', function() {
expectEquals(opt_expected, element.textContent, selector);
}
+ /**
+ * Creates an ExtensionInfo object.
+ * @param {Object=} opt_properties A set of properties that will be used on
+ * the resulting ExtensionInfo (otherwise defaults will be used).
+ * @return {chrome.developerPrivate.ExtensionInfo}
+ */
+ function createExtensionInfo(opt_properties) {
+ var id = opt_properties && opt_properties.hasOwnProperty('id') ?
+ opt_properties[id] : 'a'.repeat(32);
+ var baseUrl = 'chrome-extension://' + id + '/';
+ return Object.assign({
+ description: 'This is an extension',
+ iconUrl: 'chrome://extension-icon/' + id + '/24/0',
+ id: id,
+ incognitoAccess: {isEnabled: true, isActive: false},
+ location: 'FROM_STORE',
+ name: 'Wonderful Extension',
+ state: 'ENABLED',
+ type: 'EXTENSION',
+ version: '2.0',
+ views: [{url: baseUrl + 'foo.html'}, {url: baseUrl + 'bar.html'}],
+ }, opt_properties);
+ }
+
return {
ClickMock: ClickMock,
testVisible: testVisible,
+ createExtensionInfo: createExtensionInfo,
};
});
« no previous file with comments | « chrome/test/data/webui/extensions/extension_manager_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698