WebKit Bugzilla
Attachment 342054 Details for
Bug 186259
: [MotionMark] Strip out more characters when creating permalinks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186259-20180606095058.patch (text/plain), 4.21 KB, created by
Jon Lee
on 2018-06-06 09:50:59 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jon Lee
Created:
2018-06-06 09:50:59 PDT
Size:
4.21 KB
patch
obsolete
>Subversion Revision: 232544 >diff --git a/PerformanceTests/ChangeLog b/PerformanceTests/ChangeLog >index e397ecb3d416394e32014eaf6984b4b3e0b39a39..593b1c0ef92c87a840176021bb250f6587812ee1 100644 >--- a/PerformanceTests/ChangeLog >+++ b/PerformanceTests/ChangeLog >@@ -1,3 +1,19 @@ >+2018-06-06 Jon Lee <jonlee@apple.com> >+ >+ Strip out more characters when creating permalinks >+ https://bugs.webkit.org/show_bug.cgi?id=186259 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Tests and suites may have names that make permalinks to the tests less readable when >+ shared. Expand the set of characters that are stripped out of the names. >+ >+ * MotionMark/resources/debug-runner/motionmark.js: Refactor to call >+ stripUnwantedCharactersForURL. For existing links, decode the suite and test names. >+ * MotionMark/resources/extensions.js: >+ (Utilities.stripUnwantedCharactersForURL): Rename from stripNonASCIICharacters. >+ Remove any non-alphanumeric character. >+ > 2018-06-04 Jon Lee <jonlee@apple.com> > > Remove unnecessary MotionMark controllers >diff --git a/PerformanceTests/MotionMark/resources/debug-runner/motionmark.js b/PerformanceTests/MotionMark/resources/debug-runner/motionmark.js >index 88b1c3de72a175b7166b9ce899e79582838effc7..ffc7a7dbcf12cf38bf177d5d7d3fdb731ad93f0e 100644 >--- a/PerformanceTests/MotionMark/resources/debug-runner/motionmark.js >+++ b/PerformanceTests/MotionMark/resources/debug-runner/motionmark.js >@@ -360,7 +360,7 @@ window.suitesManager = > var link = Utilities.createElement("span", {}, testElement); > link.classList.add("link"); > link.textContent = "link"; >- link.suiteName = Utilities.stripNonASCIICharacters(suiteCheckbox.suite.name); >+ link.suiteName = Utilities.stripUnwantedCharactersForURL(suiteCheckbox.suite.name); > link.testName = test.name; > link.onclick = function(event) { > var element = event.target; >@@ -369,7 +369,7 @@ window.suitesManager = > var options = optionsManager.updateLocalStorageFromUI(); > Utilities.extendObject(options, { > "suite-name": element.suiteName, >- "test-name": Utilities.stripNonASCIICharacters(element.testName) >+ "test-name": Utilities.stripUnwantedCharactersForURL(element.testName) > }); > var complexity = suitesManager._editElement(element.parentNode).value; > if (complexity) >@@ -481,19 +481,22 @@ window.suitesManager = > > suitesFromQueryString: function(suiteName, testName) > { >+ suiteName = decodeURIComponent(suiteName); >+ testName = decodeURIComponent(testName); >+ > var suites = []; > var suiteRegExp = new RegExp(suiteName, "i"); > var testRegExp = new RegExp(testName, "i"); > > for (var i = 0; i < Suites.length; ++i) { > var suite = Suites[i]; >- if (!Utilities.stripNonASCIICharacters(suite.name).match(suiteRegExp)) >+ if (!Utilities.stripUnwantedCharactersForURL(suite.name).match(suiteRegExp)) > continue; > > var test; > for (var j = 0; j < suite.tests.length; ++j) { > suiteTest = suite.tests[j]; >- if (Utilities.stripNonASCIICharacters(suiteTest.name).match(testRegExp)) { >+ if (Utilities.stripUnwantedCharactersForURL(suiteTest.name).match(testRegExp)) { > test = suiteTest; > break; > } >diff --git a/PerformanceTests/MotionMark/resources/extensions.js b/PerformanceTests/MotionMark/resources/extensions.js >index 38c72d6c7a67f837777156e243a97d1c3da3ecf1..e4a7efd385dfe9703c23291306e598385a81c1ce 100644 >--- a/PerformanceTests/MotionMark/resources/extensions.js >+++ b/PerformanceTests/MotionMark/resources/extensions.js >@@ -147,9 +147,9 @@ Utilities = > element.style[property] = element.style[this.browserPrefix().js + property[0].toUpperCase() + property.substr(1)] = value; > }, > >- stripNonASCIICharacters: function(inputString) >+ stripUnwantedCharactersForURL: function(inputString) > { >- return inputString.replace(/[ .,]/g, ''); >+ return inputString.replace(/\W/g, ''); > }, > > convertObjectToQueryString: function(object)
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186259
:
341892
|
341925
| 342054