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

Side by Side Diff: chrome/test/data/webui/extensions/extension_load_error_test.js

Issue 2769293002: [MD Extensions] Include the manifest code snippet in load errors (Closed)
Patch Set: . Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « chrome/test/data/webui/extensions/extension_code_section_test.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** @fileoverview Suite of tests for extension-load-error. */ 5 /** @fileoverview Suite of tests for extension-load-error. */
6 cr.define('extension_load_error_tests', function() { 6 cr.define('extension_load_error_tests', function() {
7 /** @enum {string} */ 7 /** @enum {string} */
8 var TestNames = { 8 var TestNames = {
9 Interaction: 'Interaction', 9 Interaction: 'Interaction',
10 CodeSection: 'Code Section',
10 }; 11 };
11 12
12 /** 13 /**
13 * @implements {extensions.LoadErrorDelegate} 14 * @implements {extensions.LoadErrorDelegate}
14 * @extends {extension_test_util.ClickMock} 15 * @extends {extension_test_util.ClickMock}
15 * @constructor 16 * @constructor
16 */ 17 */
17 function MockDelegate() {} 18 function MockDelegate() {}
18 19
19 MockDelegate.prototype = { 20 MockDelegate.prototype = {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 expectTrue(isDialogVisible()); 52 expectTrue(isDialogVisible());
52 53
53 mockDelegate.testClickingCalls( 54 mockDelegate.testClickingCalls(
54 loadError.$$('#retry'), 'retryLoadUnpacked', []); 55 loadError.$$('#retry'), 'retryLoadUnpacked', []);
55 expectFalse(isDialogVisible()); 56 expectFalse(isDialogVisible());
56 57
57 loadError.show(); 58 loadError.show();
58 MockInteractions.tap(loadError.$$('#dismiss')); 59 MockInteractions.tap(loadError.$$('#dismiss'));
59 expectFalse(isDialogVisible()); 60 expectFalse(isDialogVisible());
60 }); 61 });
62
63 test(assert(TestNames.CodeSection), function() {
64 expectTrue(loadError.$.code.isEmpty());
65 var loadErrorProperties = {
66 error: 'Some error',
67 path: '/some/path',
68 source: {
69 beforeHighlight: 'before',
70 highlight: 'highlight',
71 afterHighlight: 'after',
72 },
73 };
74
75 loadError.set('loadError', loadErrorProperties);
76 expectFalse(loadError.$.code.isEmpty());
77 });
61 }); 78 });
62 } 79 }
63 80
64 return { 81 return {
65 registerTests: registerTests, 82 registerTests: registerTests,
66 TestNames: TestNames, 83 TestNames: TestNames,
67 }; 84 };
68 }); 85 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/extensions/extension_code_section_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698