Web Inspector: searching for <u> in elements panel finds all tags containing "u"
[WebKit-https.git] / LayoutTests / inspector / elements / elements-panel-search.html
index 8807377..1e8f795 100644 (file)
@@ -9,6 +9,12 @@ function test()
 
     function searchCallback(next, resultCount)
     {
+        if (resultCount == 0) {
+            InspectorTest.addResult("Nothing found");
+            WebInspector.domAgent.cancelSearch();
+            next();
+        }
+
         for (var i = 0; i < resultCount; ++i)
             WebInspector.domAgent.searchResult(i, searchResultCallback.bind(this, i + 1 === resultCount));
 
@@ -48,11 +54,31 @@ function test()
             WebInspector.domAgent.performSearch("<inpu" + "t", searchCallback.bind(this, next));
         },
 
+        function testEndTag(next)
+        {
+            WebInspector.domAgent.performSearch("npu" + "t>", searchCallback.bind(this, next));
+        },
+
         function testPartialTag(next)
         {
             WebInspector.domAgent.performSearch("npu" + "t", searchCallback.bind(this, next));
         },
 
+        function testPartialAbsentTagStart(next)
+        {
+            WebInspector.domAgent.performSearch("<npu" + "t", searchCallback.bind(this, next));
+        },
+
+        function testPartialAbsentTagEnd(next)
+        {
+            WebInspector.domAgent.performSearch("npu" + ">", searchCallback.bind(this, next));
+        },
+
+        function testFullTag(next)
+        {
+            WebInspector.domAgent.performSearch("<inpu" + "t>", searchCallback.bind(this, next));
+        },
+
         function testExactAttributeName(next)
         {
             WebInspector.domAgent.performSearch("valu" + "e", searchCallback.bind(this, next));