Log Message
Fix browser test failed assertions and a bug in 'common-component-base' https://bugs.webkit.org/show_bug.cgi?id=186423
Reviewed by Ryosuke Niwa. Fixed serveral assertion failures in browser tests. Fixed a bug in common-component-base that null/undefined as attribute value is not allowed. * browser-tests/chart-revision-range-tests.js: Should not import 'lazily-evaluated-function.js' twice. * browser-tests/chart-status-evaluator-tests.js: Should not import 'lazily-evaluated-function.js' twice. * browser-tests/component-base-tests.js: Added a unit test for element attributes being null or undefined. * browser-tests/index.html: Make mocked data from makeSampleCluster also contains commit_order. * public/shared/common-component-base.js: Make it allow to take null as attribute value. (CommonComponentBase.createElement):
Modified Paths
- trunk/Websites/perf.webkit.org/ChangeLog
- trunk/Websites/perf.webkit.org/browser-tests/chart-revision-range-tests.js
- trunk/Websites/perf.webkit.org/browser-tests/chart-status-evaluator-tests.js
- trunk/Websites/perf.webkit.org/browser-tests/component-base-tests.js
- trunk/Websites/perf.webkit.org/browser-tests/index.html
- trunk/Websites/perf.webkit.org/public/shared/common-component-base.js
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (232613 => 232614)
--- trunk/Websites/perf.webkit.org/ChangeLog 2018-06-08 03:56:04 UTC (rev 232613)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2018-06-08 04:40:42 UTC (rev 232614)
@@ -1,3 +1,20 @@
+2018-06-07 Dewei Zhu <[email protected]>
+
+ Fix browser test failed assertions and a bug in 'common-component-base'
+ https://bugs.webkit.org/show_bug.cgi?id=186423
+
+ Reviewed by Ryosuke Niwa.
+
+ Fixed serveral assertion failures in browser tests.
+ Fixed a bug in common-component-base that null/undefined as attribute value is not allowed.
+
+ * browser-tests/chart-revision-range-tests.js: Should not import 'lazily-evaluated-function.js' twice.
+ * browser-tests/chart-status-evaluator-tests.js: Should not import 'lazily-evaluated-function.js' twice.
+ * browser-tests/component-base-tests.js: Added a unit test for element attributes being null or undefined.
+ * browser-tests/index.html: Make mocked data from makeSampleCluster also contains commit_order.
+ * public/shared/common-component-base.js: Make it allow to take null as attribute value.
+ (CommonComponentBase.createElement):
+
2018-05-24 Dewei Zhu <[email protected]>
Added sending notification feature when test group finishes.
Modified: trunk/Websites/perf.webkit.org/browser-tests/chart-revision-range-tests.js (232613 => 232614)
--- trunk/Websites/perf.webkit.org/browser-tests/chart-revision-range-tests.js 2018-06-08 03:56:04 UTC (rev 232613)
+++ trunk/Websites/perf.webkit.org/browser-tests/chart-revision-range-tests.js 2018-06-08 04:40:42 UTC (rev 232614)
@@ -5,7 +5,7 @@
{
return ChartTest.importChartScripts(context).then(() => {
ChartTest.makeModelObjectsForSampleCluster(context);
- return context.importScripts(['lazily-evaluated-function.js', 'components/chart-revision-range.js'], 'ChartRevisionRange');
+ return context.importScripts(['components/chart-revision-range.js'], 'ChartRevisionRange');
});
}
Modified: trunk/Websites/perf.webkit.org/browser-tests/chart-status-evaluator-tests.js (232613 => 232614)
--- trunk/Websites/perf.webkit.org/browser-tests/chart-status-evaluator-tests.js 2018-06-08 03:56:04 UTC (rev 232613)
+++ trunk/Websites/perf.webkit.org/browser-tests/chart-status-evaluator-tests.js 2018-06-08 04:40:42 UTC (rev 232614)
@@ -3,9 +3,7 @@
function importEvaluator(context)
{
- const scripts = [
- 'lazily-evaluated-function.js',
- 'components/chart-status-evaluator.js'];
+ const scripts = ['components/chart-status-evaluator.js'];
return ChartTest.importChartScripts(context).then(() => {
return context.importScripts(scripts, 'Test', 'Metric', 'ChartStatusEvaluator');
Modified: trunk/Websites/perf.webkit.org/browser-tests/component-base-tests.js (232613 => 232614)
--- trunk/Websites/perf.webkit.org/browser-tests/component-base-tests.js 2018-06-08 03:56:04 UTC (rev 232613)
+++ trunk/Websites/perf.webkit.org/browser-tests/component-base-tests.js 2018-06-08 04:40:42 UTC (rev 232614)
@@ -519,6 +519,19 @@
});
});
+ it('should allow to create an element with attributes to be null or undefined', () => {
+ const context = new BrowsingContext();
+ return importComponentBase(context).then((ComponentBase) => {
+ const input = ComponentBase.createElement('input', {'title': null, 'required': undefined});
+ expect(input).to.be.a(context.global.HTMLInputElement);
+ expect(input.attributes.length).to.be(2);
+ expect(input.attributes[0].localName).to.be('title');
+ expect(input.attributes[0].value).to.be('null');
+ expect(input.attributes[1].localName).to.be('required');
+ expect(input.attributes[1].value).to.be('undefined');
+ });
+ });
+
it('should create an element with the specified attributes', () => {
const context = new BrowsingContext();
return importComponentBase(context).then((ComponentBase) => {
Modified: trunk/Websites/perf.webkit.org/browser-tests/index.html (232613 => 232614)
--- trunk/Websites/perf.webkit.org/browser-tests/index.html 2018-06-08 03:56:04 UTC (rev 232613)
+++ trunk/Websites/perf.webkit.org/browser-tests/index.html 2018-06-08 04:40:42 UTC (rev 232614)
@@ -272,37 +272,37 @@
"current": [
[
1000, 100, 1, 100, 100 * 100, false,
- [ [2000, 1, "4000", posixTime('2016-01-05T17:35:00Z')], [3000, 2, "15B42", 0] ],
+ [ [2000, 1, "4000", posixTime('2016-01-05T17:35:00Z')], [3000, 2, "15B42", 0, 0] ],
posixTime('2016-01-05T17:35:00Z'), 5000, posixTime('2016-01-05T19:23:00Z'), "10", 7
],
[
1001, 131, 1, 131, 131 * 131, true,
- [ [2001, 1, "4001", posixTime('2016-01-05T18:43:01Z')], [3000, 2, "15B42", 0] ],
+ [ [2001, 1, "4001", posixTime('2016-01-05T18:43:01Z')], [3000, 2, "15B42", 0, 0] ],
posixTime('2016-01-05T18:43:01Z'), 5001, posixTime('2016-01-05T20:58:01Z'), "11", 7
],
[
1002, 122, 1, 122, 122 * 122, false,
- [ [2002, 1, "4002", posixTime('2016-01-05T20:01:02Z')], [3000, 2, "15B42", 0] ],
+ [ [2002, 1, "4002", posixTime('2016-01-05T20:01:02Z')], [3000, 2, "15B42", 0, 0] ],
posixTime('2016-01-05T20:01:02Z'), 5002, posixTime('2016-01-05T22:37:02Z'), "12", 7
],
[
1003, 113, 1, 113, 113 * 113, false,
- [ [2003, 1, "4003", posixTime('2016-01-05T23:19:03Z')], [3000, 2, "15B42", 0] ],
+ [ [2003, 1, "4003", posixTime('2016-01-05T23:19:03Z')], [3000, 2, "15B42", 0, 0] ],
posixTime('2016-01-05T23:19:03Z'), 5003, posixTime('2016-01-06T23:19:03Z'), "13", 7
],
[
1004, 124, 1, 124, 124 * 124, false,
- [ [2004, 1, "4004", posixTime('2016-01-06T01:52:04Z')], [3001, 2, "15C50", 0] ],
+ [ [2004, 1, "4004", posixTime('2016-01-06T01:52:04Z')], [3001, 2, "15C50", 0, 0] ],
posixTime('2016-01-06T01:52:04Z'), 5004, posixTime('2016-01-06T02:42:04Z'), "14", 7
],
[
1005, 115, 1, 115, 115 * 115, true,
- [ [2005, 1, "4005", posixTime('2016-01-06T03:22:05Z')], [3001, 2, "15C50", 0] ],
+ [ [2005, 1, "4005", posixTime('2016-01-06T03:22:05Z')], [3001, 2, "15C50", 0, 0] ],
posixTime('2016-01-06T03:22:05Z'), 5005, posixTime('2016-01-06T06:01:05Z'), "15", 7
],
[
1006, 116, 1, 116, 116 * 116, false,
- [ [2006, 1, "4006", posixTime('2016-01-06T05:59:06Z')], [3001, 2, "15C50", 0] ],
+ [ [2006, 1, "4006", posixTime('2016-01-06T05:59:06Z')], [3001, 2, "15C50", 0, 0] ],
posixTime('2016-01-06T05:59:06Z'), 5006, posixTime('2016-01-06T08:34:06Z'), "16", 7
]
],
Modified: trunk/Websites/perf.webkit.org/public/shared/common-component-base.js (232613 => 232614)
--- trunk/Websites/perf.webkit.org/public/shared/common-component-base.js 2018-06-08 03:56:04 UTC (rev 232613)
+++ trunk/Websites/perf.webkit.org/public/shared/common-component-base.js 2018-06-08 04:40:42 UTC (rev 232614)
@@ -112,7 +112,7 @@
else if (attributes[name] === true)
element.setAttribute(name, '');
else if (attributes[name] !== false)
- element.setAttribute(name, attributes[name].toString());
+ element.setAttribute(name, attributes[name]);
}
}
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
