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

Unified Diff: third_party/WebKit/LayoutTests/custom-properties/register-property-syntax-parsing.html

Issue 2369813002: Don't depend on unregisterProperty in register-property-syntax-parsing.html (Closed)
Patch Set: fix expected.txt Created 4 years, 3 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/custom-properties/register-property-syntax-parsing-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/custom-properties/register-property-syntax-parsing.html
diff --git a/third_party/WebKit/LayoutTests/custom-properties/register-property-syntax-parsing.html b/third_party/WebKit/LayoutTests/custom-properties/register-property-syntax-parsing.html
index b1152311bc4a49a4764229757c25575b4204f056..0195db8e0879e385fea76b27f6089d3f1b04225e 100644
--- a/third_party/WebKit/LayoutTests/custom-properties/register-property-syntax-parsing.html
+++ b/third_party/WebKit/LayoutTests/custom-properties/register-property-syntax-parsing.html
@@ -2,19 +2,21 @@
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
+test_count = 0;
+
function assert_valid(syntax, initialValue) {
// No actual assertions, this just shouldn't throw
test(function() {
- try { CSS.unregisterProperty('--syntax-test'); } catch(e) { }
- CSS.registerProperty({name: '--syntax-test', syntax: syntax, initialValue: initialValue});
+ var name = '--syntax-test-' + (test_count++);
+ CSS.registerProperty({name: name, syntax: syntax, initialValue: initialValue});
}, "syntax:'" + syntax + "', initialValue:'" + initialValue + "' is valid");
}
function assert_invalid(syntax, initialValue) {
test(function(){
- try { CSS.unregisterProperty('--syntax-test'); } catch(e) { }
+ var name = '--syntax-test-' + (test_count++);
assert_throws(new SyntaxError(),
- () => CSS.registerProperty({name: '--syntax-test', syntax: syntax, initialValue: initialValue}));
+ () => CSS.registerProperty({name: name, syntax: syntax, initialValue: initialValue}));
}, "syntax:'" + syntax + "', initialValue:'" + initialValue + "' is invalid");
}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/custom-properties/register-property-syntax-parsing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698