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

Side by Side Diff: chrome/test/data/webui/engagement/site_engagement_browsertest.js

Issue 2953553002: Reenable SiteEngagementBrowserTest.All for non-Windows platforms. (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | 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 /** 5 /**
6 * @fileoverview Test suite for the Site Engagement WebUI. 6 * @fileoverview Test suite for the Site Engagement WebUI.
7 */ 7 */
8 var ROOT_PATH = '../../../../../'; 8 var ROOT_PATH = '../../../../../';
9 var EXAMPLE_URL_1 = 'http://example.com/'; 9 var EXAMPLE_URL_1 = 'http://example.com/';
10 var EXAMPLE_URL_2 = 'http://shmlexample.com/'; 10 var EXAMPLE_URL_2 = 'http://shmlexample.com/';
(...skipping 28 matching lines...) Expand all
39 39
40 /** @override */ 40 /** @override */
41 setUp: function() { 41 setUp: function() {
42 testing.Test.prototype.setUp.call(this); 42 testing.Test.prototype.setUp.call(this);
43 suiteSetup(function() { 43 suiteSetup(function() {
44 return whenPageIsPopulatedForTest(); 44 return whenPageIsPopulatedForTest();
45 }); 45 });
46 }, 46 },
47 }; 47 };
48 48
49 // TODO(crbug.com/734716): This test is flaky. 49 // This test is flaky on Windows. See https://crbug.com/734716.
50 TEST_F('SiteEngagementBrowserTest', 'DISABLED_All', function() { 50 GEN('#if defined(OS_WIN)');
51 GEN('#define MAYBE_All DISABLED_All');
52 GEN('#else');
53 GEN('#define MAYBE_All All');
54 GEN('#endif');
55 TEST_F('SiteEngagementBrowserTest', 'MAYBE_All', function() {
51 test('check engagement values are loaded', function() { 56 test('check engagement values are loaded', function() {
52 var originCells = 57 var originCells =
53 Array.from(document.getElementsByClassName('origin-cell')); 58 Array.from(document.getElementsByClassName('origin-cell'));
54 assertDeepEquals( 59 assertDeepEquals(
55 [EXAMPLE_URL_1, EXAMPLE_URL_2], originCells.map(x => x.textContent)); 60 [EXAMPLE_URL_1, EXAMPLE_URL_2], originCells.map(x => x.textContent));
56 }); 61 });
57 62
58 test('scores rounded to 2 decimal places', function() { 63 test('scores rounded to 2 decimal places', function() {
59 var scoreInputs = 64 var scoreInputs =
60 Array.from(document.getElementsByClassName('base-score-input')); 65 Array.from(document.getElementsByClassName('base-score-input'));
61 assertDeepEquals(['10', '3.14'], scoreInputs.map(x => x.value)); 66 assertDeepEquals(['10', '3.14'], scoreInputs.map(x => x.value));
62 var bonusScoreCells = 67 var bonusScoreCells =
63 Array.from(document.getElementsByClassName('bonus-score-cell')); 68 Array.from(document.getElementsByClassName('bonus-score-cell'));
64 assertDeepEquals(['0', '0'], bonusScoreCells.map(x => x.textContent)); 69 assertDeepEquals(['0', '0'], bonusScoreCells.map(x => x.textContent));
65 var totalScoreCells = 70 var totalScoreCells =
66 Array.from(document.getElementsByClassName('total-score-cell')); 71 Array.from(document.getElementsByClassName('total-score-cell'));
67 assertDeepEquals(['10', '3.14'], totalScoreCells.map(x => x.textContent)); 72 assertDeepEquals(['10', '3.14'], totalScoreCells.map(x => x.textContent));
68 }); 73 });
69 mocha.run(); 74 mocha.run();
70 }); 75 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698