Title: [199226] trunk
- Revision
- 199226
- Author
- [email protected]
- Date
- 2016-04-08 09:04:24 -0700 (Fri, 08 Apr 2016)
Log Message
Web Inspector: Quick Open fails to match pattern "bB" in file "abBc"
https://bugs.webkit.org/show_bug.cgi?id=156398
Reviewed by Timothy Hatcher.
Source/WebInspectorUI:
Correct an off-by-one error in the backtrack routine that set the dead
branch index to the character just before the match that was popped.
The dead branch index should equal the index of the popped match.
* UserInterface/Controllers/ResourceQueryController.js:
(WebInspector.ResourceQueryController.prototype._findQueryMatches.backtrack):
(WebInspector.ResourceQueryController.prototype._findQueryMatches):
LayoutTests:
* inspector/unit-tests/resource-query-controller-expected.txt:
* inspector/unit-tests/resource-query-controller.html:
Test that two repeated characters in the search string are correctly
matched when the first character is lowercase and the second is uppercase.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (199225 => 199226)
--- trunk/LayoutTests/ChangeLog 2016-04-08 14:45:24 UTC (rev 199225)
+++ trunk/LayoutTests/ChangeLog 2016-04-08 16:04:24 UTC (rev 199226)
@@ -1,3 +1,15 @@
+2016-04-08 Matt Baker <[email protected]>
+
+ Web Inspector: Quick Open fails to match pattern "bB" in file "abBc"
+ https://bugs.webkit.org/show_bug.cgi?id=156398
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/unit-tests/resource-query-controller-expected.txt:
+ * inspector/unit-tests/resource-query-controller.html:
+ Test that two repeated characters in the search string are correctly
+ matched when the first character is lowercase and the second is uppercase.
+
2016-04-08 Youenn Fablet <[email protected]>
Testharness-based tests that time out should be able to produce a detailled output
Modified: trunk/LayoutTests/inspector/unit-tests/resource-query-controller-expected.txt (199225 => 199226)
--- trunk/LayoutTests/inspector/unit-tests/resource-query-controller-expected.txt 2016-04-08 14:45:24 UTC (rev 199225)
+++ trunk/LayoutTests/inspector/unit-tests/resource-query-controller-expected.txt 2016-04-08 16:04:24 UTC (rev 199226)
@@ -45,6 +45,7 @@
PASS: Query "abcde" should match "A B C De" in "AbcdBcdCdDe".
PASS: Query "abcdex" should match "A B C d ex" in "AxBxCxdxexDxyxEF".
PASS: Query "bc" should match " bC" in "abCd".
+PASS: Query "bb" should match " bB" in "abBc".
-- Running test case: ExecuteQueryShouldIgnoreCase
All case permutations of query "abcd" should match "abcd" in "abcde".
Modified: trunk/LayoutTests/inspector/unit-tests/resource-query-controller.html (199225 => 199226)
--- trunk/LayoutTests/inspector/unit-tests/resource-query-controller.html 2016-04-08 14:45:24 UTC (rev 199225)
+++ trunk/LayoutTests/inspector/unit-tests/resource-query-controller.html 2016-04-08 16:04:24 UTC (rev 199226)
@@ -179,6 +179,11 @@
filename: "abCd",
expected: " bC"
},
+ {
+ query: "bb",
+ filename: "abBc",
+ expected: " bB"
+ }
];
for (let {query, filename, expected} of tests) {
@@ -187,7 +192,7 @@
let results = matcher.executeQuery(query);
InspectorTest.assert(results.length === 1, "Should return exactly one match.");
- let actual = results[0].__test_createMatchesMask();
+ let actual = results.length ? results[0].__test_createMatchesMask() : null;
InspectorTest.expectThat(actual === expected, `Query "${query}" should match "${expected}" in "${filename}".`);
}
}
Modified: trunk/Source/WebInspectorUI/ChangeLog (199225 => 199226)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-04-08 14:45:24 UTC (rev 199225)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-04-08 16:04:24 UTC (rev 199226)
@@ -1,3 +1,18 @@
+2016-04-08 Matt Baker <[email protected]>
+
+ Web Inspector: Quick Open fails to match pattern "bB" in file "abBc"
+ https://bugs.webkit.org/show_bug.cgi?id=156398
+
+ Reviewed by Timothy Hatcher.
+
+ Correct an off-by-one error in the backtrack routine that set the dead
+ branch index to the character just before the match that was popped.
+ The dead branch index should equal the index of the popped match.
+
+ * UserInterface/Controllers/ResourceQueryController.js:
+ (WebInspector.ResourceQueryController.prototype._findQueryMatches.backtrack):
+ (WebInspector.ResourceQueryController.prototype._findQueryMatches):
+
2016-04-07 Matt Baker <[email protected]>
Web Inspector: OpenResourceDialog should keep its resources list up-to-date
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/ResourceQueryController.js (199225 => 199226)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/ResourceQueryController.js 2016-04-08 14:45:24 UTC (rev 199225)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/ResourceQueryController.js 2016-04-08 16:04:24 UTC (rev 199226)
@@ -129,7 +129,7 @@
if (lastMatch.type !== WebInspector.ResourceQueryMatch.Type.Special)
continue;
- deadBranches[lastMatch.queryIndex] = lastMatch.index - 1;
+ deadBranches[lastMatch.queryIndex] = lastMatch.index;
searchIndex = matches.lastValue ? matches.lastValue.index + 1 : 0;
return true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes