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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/constructors/security-policy-violation-event-constructor.html

Issue 2331213002: Add `disposition` to SecurityPolicyViolationEvent (Closed)
Patch Set: Fix a typo in rebased test expectation Created 4 years, 2 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
Index: third_party/WebKit/LayoutTests/fast/events/constructors/security-policy-violation-event-constructor.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/constructors/security-policy-violation-event-constructor.html b/third_party/WebKit/LayoutTests/fast/events/constructors/security-policy-violation-event-constructor.html
index 10ffd7b2ada29b202630dc6b49c090e0b01a1c3b..14b3a5688419e7b742cd4c8ca618f61ea5cb660e 100644
--- a/third_party/WebKit/LayoutTests/fast/events/constructors/security-policy-violation-event-constructor.html
+++ b/third_party/WebKit/LayoutTests/fast/events/constructors/security-policy-violation-event-constructor.html
@@ -21,6 +21,7 @@ shouldBeEmptyString("new SecurityPolicyViolationEvent('eventType').violatedDirec
shouldBeEmptyString("new SecurityPolicyViolationEvent('eventType').effectiveDirective");
shouldBeEmptyString("new SecurityPolicyViolationEvent('eventType').originalPolicy");
shouldBeEmptyString("new SecurityPolicyViolationEvent('eventType').sourceFile");
+shouldBeEqualToString("new SecurityPolicyViolationEvent('eventType').disposition", "enforce");
shouldBe("new SecurityPolicyViolationEvent('eventType').lineNumber", "0");
shouldBe("new SecurityPolicyViolationEvent('eventType').columnNumber", "0");
shouldBe("new SecurityPolicyViolationEvent('eventType').statusCode", "0");
@@ -38,6 +39,9 @@ shouldBeTrue("new SecurityPolicyViolationEvent('eventType', { cancelable: true }
shouldBeEqualToString("new SecurityPolicyViolationEvent('eventType', { " + member + ": 'foo' })." + member, "foo");
});
+// Enum members throw on unknown initializer values.
+shouldThrow("new SecurityPolicyViolationEvent('eventType', { disposition: 'foo' }).disposition");
+
// Number members are passed.
["lineNumber", "columnNumber", "statusCode"].forEach(function(member) {
shouldBe("new SecurityPolicyViolationEvent('eventType', { " + member + ": 42 })." + member, "42");

Powered by Google App Engine
This is Rietveld 408576698