blob: e93fcf7c9b635f6c68881d76f2285fe643a92e01 [file] [log] [blame]
* Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
* @assertion
* @description Test for <a href="">bug 12359</a>:
* XPathEvaluator may return some nodes more than once in a result set.
import "dart:html";
import "../../../Utils/expect.dart";
const String htmlEL = r'''
void main() {
document.body.appendHtml(htmlEL, treeSanitizer: NodeTreeSanitizer.trusted);
XPathEvaluator evaluator = new XPathEvaluator();
var result = evaluator.evaluate("//div//div | //div/div", document, null,
Expect.equals(2, result.snapshotLength);