blob: bd09c5bd595341de459dee20f9bab37215a43248 [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.
* @description Test the setting of the -webkit-image-set function.
import "dart:html";
import "../../testcommon.dart";
main() {
<p id="description"></p>
<div id="console"></div>
''', treeSanitizer: new NullTreeSanitizer());
testComputedStyle(property, fullRule)
var div = document.createElement("div");
div.setAttribute("style", property + ": " + fullRule);
var computedValue =;
return computedValue;
testImageSetRule(description, property, rule)
debug(description + " : " + rule);
var fullRule = "-webkit-image-set(" + rule + ")";
shouldBeLikeString(testComputedStyle(property, fullRule), fullRule);
testImageSetRule("Single value for background-image",
"url( 1x");
testImageSetRule("Multiple values for background-image",
"url( 1x, url( 2x");
testImageSetRule("Multiple values for background-image, out of order",
"url( 3x, url( 2x, url( 1x");
testImageSetRule("Duplicate values for background-image",
"url( 1x, url( 2x, url( 1x");
testImageSetRule("Fractional values for background-image",
"url( 0.2x, url( 2.3x, url( 12.3456x");
// FIXME: We should also be testing the behavior of negative values somewhere, but it's currently
// broken.