| Index: chrome/test/data/webui/about_invalidations_browsertest.js
|
| diff --git a/chrome/test/data/webui/about_invalidations_browsertest.js b/chrome/test/data/webui/about_invalidations_browsertest.js
|
| index 70a8a3dfc1bdc243226bed5a2c0af13ea4d020be..4ca728a3c76ae38250141c092a27f9866cd72cec 100644
|
| --- a/chrome/test/data/webui/about_invalidations_browsertest.js
|
| +++ b/chrome/test/data/webui/about_invalidations_browsertest.js
|
| @@ -60,3 +60,35 @@ TEST_F('InvalidationsWebUITest', 'testChangingInvalidationsState', function() {
|
| expectTrue(isContained, 'Actual log is:' + invalidationsLog.value);
|
| });
|
|
|
| +// Test that objects ids appear on the table.
|
| +TEST_F('InvalidationsWebUITest', 'testRegisteringNewIds', function() {
|
| + var newDataType = [
|
| + { name: 'EXTENSIONS', source: 1004},
|
| + { name: 'FAVICON_IMAGE', source: 1004},
|
| + ];
|
| + var pattern1 = ['Fake', '1004', 'EXTENSIONS', '0', '', '', ''];
|
| + var pattern2 = ['Fake', '1004', 'FAVICON_IMAGE', '0', '', '', ''];
|
| + chrome.invalidations.updateIds("Fake", newDataType);
|
| + var oidTable = $('objectsid-table-container');
|
| + expectEquals(3, oidTable.rows.length);
|
| + expectEquals('header', oidTable.rows[0].className);
|
| + expectEquals('content', oidTable.rows[1].className);
|
| + expectEquals('content', oidTable.rows[2].className);
|
| + expectEquals(7, oidTable.rows[1].cells.length);
|
| + expectEquals(7, oidTable.rows[2].cells.length);
|
| +
|
| + // Row 0 is headers.
|
| + for (var j = 0; j < oidTable.rows[1].cells.length; j++) {
|
| + var cellContent = oidTable.rows[1].cells[j].textContent;
|
| + expectEquals(pattern1[j], cellContent);
|
| + }
|
| + for (var j = 0; j < oidTable.rows[2].cells.length; j++) {
|
| + var cellContent = oidTable.rows[2].cells[j].textContent;
|
| + expectEquals(pattern2[j], cellContent);
|
| + }
|
| + newDataType = [{ name: 'FAVICON_IMAGE', source: 1004}];
|
| + chrome.invalidations.updateIds("Fake", newDataType);
|
| + expectEquals('header', oidTable.rows[0].className);
|
| + expectEquals('greyed', oidTable.rows[1].className);
|
| + expectEquals('content', oidTable.rows[2].className);
|
| +});
|
|
|