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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/cssKeywordValue.html

Issue 1957163002: Rename KeywordValue to CSSKeywordValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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/LayoutTests/typedcssom/keywordValue.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/typedcssom/cssKeywordValue.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/cssKeywordValue.html b/third_party/WebKit/LayoutTests/typedcssom/cssKeywordValue.html
new file mode 100644
index 0000000000000000000000000000000000000000..35844dc0b994f7828e5a3c81d2aecd3efcc51c0f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/typedcssom/cssKeywordValue.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<script src='../resources/testharness.js'></script>
+<script src='../resources/testharnessreport.js'></script>
+<script>
+
+test(function() {
+ assert_throws(TypeError(), function() { new CSSKeywordValue("") });
+}, "Constructor should throw an error if given an empty string");
+
+//This test fails due to bug: 584999
+test(function() {
+ assert_equals(new CSSKeywordValue('initial').cssString, 'initial');
+ assert_equals(new CSSKeywordValue('center').cssString, 'center');
+ assert_equals(new CSSKeywordValue('customLemon').cssString, 'customLemon');
+ assert_equals(new CSSKeywordValue(' Hello World').cssString, CSS.escape(' Hello World'));
+ assert_equals(new CSSKeywordValue('3').cssString, CSS.escape('3'));
+}, 'cssString returns a string with a format similar to CSS.escape. This test also ' +
+ 'implies that toCSSValue supports all keywords including custom identifiers');
+
+test(function() {
+ assert_equals(new CSSKeywordValue('initial').keywordValue, 'initial');
+ assert_equals(new CSSKeywordValue('center').keywordValue, 'center');
+ assert_equals(new CSSKeywordValue('customLemon').keywordValue, 'customLemon');
+ assert_equals(new CSSKeywordValue(' Hello World').keywordValue, ' Hello World');
+ assert_equals(new CSSKeywordValue('3').keywordValue, '3');
+}, 'keywordValue returns a string equal to the string used in the constructor');
+
+</script>
+<body>
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/typedcssom/keywordValue.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698