Revision 8d877aacda3215c8ef53f1bb787c7c1d1b5d2fe5 authored by Fredrik Söderquist on 07 November 2018, 09:00:38 UTC, committed by Chromium WPT Sync on 07 November 2018, 09:00:38 UTC
In css_properties.json5 we list these keywords but we didn't recognize them when parsing. Synchronize the two lists. CSS Images L3 says the following about these two values: "This property previously accepted the values optimizeSpeed and optimizeQuality. These are now deprecated; a user agent must accept them as valid values but must treat them as having the same behavior as pixelated and auto respectively, and authors must not use them." (https://drafts.csswg.org/css-images-3/#propdef-image-rendering) Bug: 901669 Change-Id: Iecc4f38e711b14fa7b6fd4beb550abdaf99d5b46
1 parent e0e8196
event_constructor.html
<!DOCTYPE HTML>
<html>
<head>
<title>WebStorage Test: StorageEvent - constructor</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
test(function() {
assert_throws(new TypeError, () => new StorageEvent());
// should be redundant, but .length can be wrong with custom bindings
assert_equals(StorageEvent.length, 1, 'StorageEvent.length');
}, 'constructor with no arguments');
test(function() {
var event = new StorageEvent('type');
assert_equals(event.type, 'type', 'type');
assert_equals(event.key, null, 'key');
assert_equals(event.oldValue, null, 'oldValue');
assert_equals(event.newValue, null, 'newValue');
assert_equals(event.url, '', 'url');
assert_equals(event.storageArea, null, 'storageArea');
}, 'constructor with just type argument');
test(function() {
assert_not_equals(localStorage, null, 'localStorage'); // precondition
var event = new StorageEvent('storage', {
bubbles: true,
cancelable: true,
key: 'key',
oldValue: 'oldValue',
newValue: 'newValue',
url: 'url', // not an absolute URL to ensure it isn't resolved
storageArea: localStorage
});
assert_equals(event.type, 'storage', 'type');
assert_equals(event.bubbles, true, 'bubbles');
assert_equals(event.cancelable, true, 'cancelable');
assert_equals(event.key, 'key', 'key');
assert_equals(event.oldValue, 'oldValue', 'oldValue');
assert_equals(event.newValue, 'newValue', 'newValue');
assert_equals(event.url, 'url', 'url');
assert_equals(event.storageArea, localStorage, 'storageArea');
}, 'constructor with sensible type argument and members');
test(function() {
var event = new StorageEvent(null, {
key: null,
oldValue: null,
newValue: null,
url: null,
storageArea: null
});
assert_equals(event.type, 'null', 'type');
assert_equals(event.key, null, 'key');
assert_equals(event.oldValue, null, 'oldValue');
assert_equals(event.newValue, null, 'newValue');
assert_equals(event.url, 'null', 'url');
assert_equals(event.storageArea, null, 'storageArea');
}, 'constructor with null type argument and members');
test(function() {
var event = new StorageEvent(undefined, {
key: undefined,
oldValue: undefined,
newValue: undefined,
url: undefined,
storageArea: undefined
});
assert_equals(event.type, 'undefined', 'type');
assert_equals(event.key, null, 'key');
assert_equals(event.oldValue, null, 'oldValue');
assert_equals(event.newValue, null, 'newValue');
assert_equals(event.url, '', 'url'); // not 'undefined'!
assert_equals(event.storageArea, null, 'storageArea');
}, 'constructor with undefined type argument and members');
</script>
</body>
</html>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...