Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: third_party/WebKit/LayoutTests/inspector/console/console-xpath.html

Issue 1983423002: [DevTools] Move CommandLineAPI querySelector and querySelectorAll to native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-bind-remote-object
Patch Set: rebased Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector/console/console-xpath.html
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-xpath.html b/third_party/WebKit/LayoutTests/inspector/console/console-xpath.html
index 8ec0d777f61d0c0c0efb1ff7adf0ffcdf5fb4755..00dff30cb1ccbadb7842e40eeda21f3b56d4696c 100644
--- a/third_party/WebKit/LayoutTests/inspector/console/console-xpath.html
+++ b/third_party/WebKit/LayoutTests/inspector/console/console-xpath.html
@@ -6,7 +6,7 @@
function test()
{
- InspectorTest.addSniffer(WebInspector.ConsoleViewMessage.prototype, "_formattedParameterAsNodeForTest", formattedParameter);
+ InspectorTest.addSniffer(WebInspector.ConsoleViewMessage.prototype, "_formattedParameterAsNodeForTest", formattedParameter, true);
InspectorTest.addConsoleViewSniffer(messageSniffer, true);
InspectorTest.evaluateInConsole("$x('42')"); // number
@@ -14,6 +14,8 @@ function test()
InspectorTest.evaluateInConsole("$x('not(42)')"); // boolean
InspectorTest.evaluateInConsole("$x('/html/body/p').length"); // node iterator
InspectorTest.evaluateInConsole("$x('//a/@href')[0]"); // href, should not throw
+ InspectorTest.evaluateInConsole("$x('./a/@href', document.body)[0]"); // relative to document.body selector
+ InspectorTest.evaluateInConsole("$x('./a@href', document.body)"); // incorrect selector, shouldn't crash
InspectorTest.evaluateInPage("console.log('complete')"); // node iterator
var completeMessageReceived = false;
@@ -25,16 +27,16 @@ function test()
}
}
- var parameterFormatted = false;
+ var waitForParameteres = 2;
function formattedParameter()
{
- parameterFormatted = true;
+ waitForParameteres--;
maybeCompleteTest();
}
function maybeCompleteTest()
{
- if (parameterFormatted && completeMessageReceived) {
+ if (!waitForParameteres && completeMessageReceived) {
InspectorTest.dumpConsoleMessages();
InspectorTest.completeTest();
}
@@ -43,8 +45,8 @@ function test()
</script>
</head>
-<a href="http://chromium.org"></a>
<body onload="runTest()">
+<a href="http://chromium.org"></a>
<p>
Tests $x for iterator and non-iterator types.
</p>

Powered by Google App Engine
This is Rietveld 408576698