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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/window-internals-isCSSPropertyUseCounted.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/window-internals-isCSSPropertyUseCounted.html b/third_party/WebKit/LayoutTests/fast/css/window-internals-isCSSPropertyUseCounted.html
new file mode 100644
index 0000000000000000000000000000000000000000..3a81e4c6d7b5a290454205550a247358048a1b9f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/window-internals-isCSSPropertyUseCounted.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+
+<style>
+div {
+ padding-left: 100px;
+ padding-bottom: 100px;
+ color:green;
+ background-color: blue;
+ opacity: 100px;
alancutter (OOO until 2018) 2016/02/22 00:06:45 You should test setting shorthands + checking long
nainar 2016/02/24 02:31:22 Done.
+}
+</style>
+
+<div id="target"></div>
+
+<script>
+var CSSPropertyColor = 2; //taken from CSSPropertyNames.h
+var CSSPropertyBackgroundColor = 39; //taken from CSSPropertyNames.h
+var CSSPropertyOpacity = 155; //taken from CSSPropertyNames.h
+var CSSPropertyPaddingBottom = 165; //taken from CSSPropertyNames.h
+var CSSPropertyPaddingLeft = 166; //taken from CSSPropertyNames.h
alancutter (OOO until 2018) 2016/02/22 00:06:45 CSSPropertyNames is generated, these numbers can c
nainar 2016/02/24 02:31:22 Done.
+
+test(function() {
+ assert_true(window.internals.isCSSPropertyUseCounted(document, CSSPropertyColor));
+ assert_true(window.internals.isCSSPropertyUseCounted(document, CSSPropertyBackgroundColor));
+ assert_true(window.internals.isCSSPropertyUseCounted(document, CSSPropertyPaddingBottom));
+ assert_true(window.internals.isCSSPropertyUseCounted(document, CSSPropertyPaddingLeft));
+ assert_false(window.internals.isCSSPropertyUseCounted(document, CSSPropertyOpacity));
alancutter (OOO until 2018) 2016/02/22 00:06:45 Why is this false?
nainar 2016/02/24 02:31:22 Isn't specified in the author style sheet
+}, "Test windows.internal.isCSSPropertyUseCounted functionality");
+
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698