WebKit Bugzilla
Attachment 342238 Details for
Bug 186423
: Fix browser test failed assertions and a bug in 'common-component-base'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186423-20180607213249.patch (text/plain), 8.42 KB, created by
dewei_zhu
on 2018-06-07 21:32:50 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
dewei_zhu
Created:
2018-06-07 21:32:50 PDT
Size:
8.42 KB
patch
obsolete
>Subversion Revision: 232612 >diff --git a/Websites/perf.webkit.org/ChangeLog b/Websites/perf.webkit.org/ChangeLog >index 46d3bb439d27a25c9d8b40ef4688e397f57191b4..55820cb65c2cb34c392ada4c87ee260c9c6390b1 100644 >--- a/Websites/perf.webkit.org/ChangeLog >+++ b/Websites/perf.webkit.org/ChangeLog >@@ -1,3 +1,20 @@ >+2018-06-07 Dewei Zhu <dewei_zhu@apple.com> >+ >+ Fix browser test failed assertions and a bug in 'common-component-base' >+ https://bugs.webkit.org/show_bug.cgi?id=186423 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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 <dewei_zhu@apple.com> > > Added sending notification feature when test group finishes. >diff --git a/Websites/perf.webkit.org/browser-tests/chart-revision-range-tests.js b/Websites/perf.webkit.org/browser-tests/chart-revision-range-tests.js >index b1b706699b24ffddf5ac446c60004e33222f5935..89451d0a6147b7d72992954b9de500f6bcb73a21 100644 >--- a/Websites/perf.webkit.org/browser-tests/chart-revision-range-tests.js >+++ b/Websites/perf.webkit.org/browser-tests/chart-revision-range-tests.js >@@ -5,7 +5,7 @@ describe('ChartRevisionRange', () => { > { > 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'); > }); > } > >diff --git a/Websites/perf.webkit.org/browser-tests/chart-status-evaluator-tests.js b/Websites/perf.webkit.org/browser-tests/chart-status-evaluator-tests.js >index aeb7a8061596b2072f76181ce8cff27e47905c25..d935c46f76bcb4ef2fb6a5757ec1b420f820c41d 100644 >--- a/Websites/perf.webkit.org/browser-tests/chart-status-evaluator-tests.js >+++ b/Websites/perf.webkit.org/browser-tests/chart-status-evaluator-tests.js >@@ -3,9 +3,7 @@ describe('ChartStatusEvaluator', () => { > > 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'); >diff --git a/Websites/perf.webkit.org/browser-tests/component-base-tests.js b/Websites/perf.webkit.org/browser-tests/component-base-tests.js >index 897c24f65043164a691fb38572b740f002c7beac..adef69f58f8a3411d1532d38fc2f7963ea0f221b 100644 >--- a/Websites/perf.webkit.org/browser-tests/component-base-tests.js >+++ b/Websites/perf.webkit.org/browser-tests/component-base-tests.js >@@ -519,6 +519,19 @@ describe('ComponentBase', function() { > }); > }); > >+ 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) => { >diff --git a/Websites/perf.webkit.org/browser-tests/index.html b/Websites/perf.webkit.org/browser-tests/index.html >index 90f3c4dae07bd00013e59fbe984a90561dd27c9e..217b964f9c8868574c2b279712eff9c325a853fe 100644 >--- a/Websites/perf.webkit.org/browser-tests/index.html >+++ b/Websites/perf.webkit.org/browser-tests/index.html >@@ -272,37 +272,37 @@ const ChartTest = { > "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 > ] > ], >diff --git a/Websites/perf.webkit.org/public/shared/common-component-base.js b/Websites/perf.webkit.org/public/shared/common-component-base.js >index aafc9082939bb6d3c8aa003693205a4fb141bd90..799113f5e7e3bda0df649ccbfb9f661d9b160f8c 100644 >--- a/Websites/perf.webkit.org/public/shared/common-component-base.js >+++ b/Websites/perf.webkit.org/public/shared/common-component-base.js >@@ -112,7 +112,7 @@ class CommonComponentBase { > else if (attributes[name] === true) > element.setAttribute(name, ''); > else if (attributes[name] !== false) >- element.setAttribute(name, attributes[name].toString()); >+ element.setAttribute(name, attributes[name]); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
rniwa
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186423
: 342238