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

Side by Side Diff: LayoutTests/transforms/resources/parsing-test-helper.js

Issue 98663004: Add support for unprefixed CSS Transforms (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 window.expect = (function() {
5 var testElement = document.getElementById('target');
6
7 function assert_equals_or_matches(actual, expected, description) {
8 return expected instanceof RegExp ?
9 assert_regexp_match(actual, expected, description) :
10 assert_equals(actual, expected, description);
11 }
12 return function expect(property, camelProperty, input) {
13 return {
14 parsesAs: function(output) {
15 test(function() {
16 assert_true(CSS.supports(property, input), 'CSS.supports');
17 testElement.style[camelProperty] = input;
18 assert_equals(testElement.style[camelProperty], output);
19 }, '"' + property + ': ' + input + ';" should parse as "' + output + '"' );
20 return this;
21 },
22 isComputedTo: function(output) {
23 test(function() {
24 testElement.style[camelProperty] = input;
25 assert_equals_or_matches(getComputedStyle(testElement)[camelProperty], output);
26 }, '"' + property + ': ' + input + ';" should be computed to "' + output + '"');
27 },
28 isInvalid: function() {
29 test(function() {
30 assert_false(CSS.supports(property, input), 'CSS.supports');
31 }, '"' + property + ': ' + input + ';" should be invalid');
32 },
33 };
34 }
35 })();
OLDNEW
« no previous file with comments | « LayoutTests/transforms/perspective-parsing-expected.txt ('k') | LayoutTests/transforms/transform-origin-parsing.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698