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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/window-internals-isCSSPropertyUseCounted.html

Issue 1711703002: Add internals.isCSSPropertyUseCounted functionality (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4
5 <style>
6 div {
7 padding-left: 100px;
8 padding-bottom: 100px;
9 color:green;
10 background-color: blue;
11 opacity: invalid value;
12 border: black solid 5px;
13 }
14 </style>
15
16 <div id="target"></div>
17
18 <script>
19 test(function() {
20 assert_true(internals.isCSSPropertyUseCounted(document, "color"));
21 assert_true(internals.isCSSPropertyUseCounted(document, "background-colo r"));
22 assert_true(internals.isCSSPropertyUseCounted(document, "padding-bottom" ));
23 assert_true(internals.isCSSPropertyUseCounted(document, "padding-left")) ;
24 }, "Test setting and reading css properties");
25
26 test(function() {
27 assert_true(internals.isCSSPropertyUseCounted(document, "border"))
28 assert_false(internals.isCSSPropertyUseCounted(document, "border-color") );
Timothy Loh 2016/02/24 03:40:35 should also check a few props like border-left, bo
nainar 2016/02/24 04:29:53 Done.
29 assert_false(internals.isCSSPropertyUseCounted(document, "border-style") );
30 assert_false(internals.isCSSPropertyUseCounted(document, "border-width") );
31 }, "Test setting a shorthand and reading longhand");
32
33 test(function() {
34 assert_false(internals.isCSSPropertyUseCounted(document, "opacity"));
35 }, "Test that properties with invalid values aren't counted");
36
37 test(function() {
38 assert_false(internals.isCSSPropertyUseCounted(document, "box-sizing"));
39 }, "Test that properties specified in UA stylesheet aren't counted");
40
41 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | third_party/WebKit/Source/core/frame/UseCounter.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698