Merge mozilla-inbound to mozilla-central. a=merge

This commit is contained in:
Daniel Varga 2018-11-29 18:59:59 +02:00
commit b3613ec011
190 changed files with 3180 additions and 133 deletions

View File

@ -16,6 +16,12 @@ js/src/builtin/intl/TimeZoneDataGenerated.h
# Don't want to reformat irregexp. bug 1510128
js/src/irregexp/.*
# Generated by js/src/util/make_unicode.py
# Note: the irregexp files are already excluded with the rest of js/src/irregexp
# but we add them here in case that ever changes.
js/src/irregexp/RegExpCharacters-inl.h
js/src/irregexp/RegExpCharacters.cpp
js/src/util/Unicode.cpp
js/src/util/UnicodeNonBMP.h

View File

@ -7,7 +7,7 @@ const kURIs = [
add_task(async function() {
for (let uri of kURIs) {
let dataURI = `data:text/html,<a id=a href="${uri}" target=_blank>Link</a>`;
let dataURI = `data:text/html,<a id=a href="${uri}" target=_blank rel="opener">Link</a>`;
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, dataURI);
let tabSwitchPromise = BrowserTestUtils.switchTab(gBrowser, function() {});

View File

@ -182,7 +182,13 @@ void
ShadowRoot::Unattach()
{
MOZ_ASSERT(!HasSlots(), "Won't work!");
MOZ_ASSERT(GetHost());
if (!GetHost()) {
// It is possible that we've been unlinked already. In such case host
// should have called Unbind and ShadowRoot's own unlink
// RemoveMutationObserver.
return;
}
Unbind();
GetHost()->RemoveMutationObserver(this);
SetHost(nullptr);

View File

@ -1016,7 +1016,6 @@ js::FutexThread::notify(NotifyReason reason)
}
const JSFunctionSpec AtomicsMethods[] = {
// clang-format off
JS_INLINABLE_FN("compareExchange", atomics_compareExchange, 4,0, AtomicsCompareExchange),
JS_INLINABLE_FN("load", atomics_load, 2,0, AtomicsLoad),
JS_INLINABLE_FN("store", atomics_store, 3,0, AtomicsStore),
@ -1031,7 +1030,6 @@ const JSFunctionSpec AtomicsMethods[] = {
JS_FN("notify", atomics_notify, 3,0),
JS_FN("wake", atomics_notify, 3,0), // Legacy name
JS_FS_END
// clang-format on
};
JSObject*

View File

@ -928,7 +928,6 @@ const Class DataViewObject::protoClass_ = {
};
const JSFunctionSpec DataViewObject::methods[] = {
// clang-format off
JS_FN("getInt8", DataViewObject::fun_getInt8, 1,0),
JS_FN("getUint8", DataViewObject::fun_getUint8, 1,0),
JS_FN("getInt16", DataViewObject::fun_getInt16, 1,0),
@ -946,7 +945,6 @@ const JSFunctionSpec DataViewObject::methods[] = {
JS_FN("setFloat32", DataViewObject::fun_setFloat32, 2,0),
JS_FN("setFloat64", DataViewObject::fun_setFloat64, 2,0),
JS_FS_END
// clang-format on
};
const JSPropertySpec DataViewObject::properties[] = {

View File

@ -1105,12 +1105,10 @@ json_stringify(JSContext* cx, unsigned argc, Value* vp)
}
static const JSFunctionSpec json_static_methods[] = {
// clang-format off
JS_FN(js_toSource_str, json_toSource, 0, 0),
JS_FN("parse", json_parse, 2, 0),
JS_FN("stringify", json_stringify, 3, 0),
JS_FS_END
// clang-format on
};
JSObject*

View File

@ -460,7 +460,6 @@ const JSPropertySpec MapObject::properties[] = {
};
const JSFunctionSpec MapObject::methods[] = {
// clang-format off
JS_FN("get", get, 1, 0),
JS_FN("has", has, 1, 0),
JS_FN("set", set, 2, 0),
@ -474,7 +473,6 @@ const JSFunctionSpec MapObject::methods[] = {
JS_SELF_HOSTED_FN("entries", "MapEntries", 0, 0),
JS_SELF_HOSTED_SYM_FN(iterator, "MapEntries", 0, 0),
JS_FS_END
// clang-format on
};
const JSPropertySpec MapObject::staticProperties[] = {
@ -1318,7 +1316,6 @@ const JSPropertySpec SetObject::properties[] = {
};
const JSFunctionSpec SetObject::methods[] = {
// clang-format off
JS_FN("has", has, 1, 0),
JS_FN("add", add, 1, 0),
JS_FN("delete", delete_, 1, 0),
@ -1331,7 +1328,6 @@ const JSFunctionSpec SetObject::methods[] = {
JS_SELF_HOSTED_FN("keys", "SetValues", 0, 0),
JS_SELF_HOSTED_SYM_FN(iterator, "SetValues", 0, 0),
JS_FS_END
// clang-format on
};
const JSPropertySpec SetObject::staticProperties[] = {

View File

@ -2118,7 +2118,6 @@ ProtoSetter(JSContext* cx, unsigned argc, Value* vp)
}
static const JSFunctionSpec object_methods[] = {
// clang-format off
JS_FN(js_toSource_str, obj_toSource, 0,0),
JS_INLINABLE_FN(js_toString_str, obj_toString, 0,0, ObjectToString),
JS_SELF_HOSTED_FN(js_toLocaleString_str, "Object_toLocaleString", 0, 0),
@ -2131,18 +2130,14 @@ static const JSFunctionSpec object_methods[] = {
JS_SELF_HOSTED_FN(js_lookupGetter_str, "ObjectLookupGetter", 1,0),
JS_SELF_HOSTED_FN(js_lookupSetter_str, "ObjectLookupSetter", 1,0),
JS_FS_END
// clang-format on
};
static const JSPropertySpec object_properties[] = {
// clang-format off
JS_PSGS("__proto__", ProtoGetter, ProtoSetter, 0),
JS_PS_END
// clang-format on
};
static const JSFunctionSpec object_static_methods[] = {
// clang-format off
JS_FN("assign", obj_assign, 2, 0),
JS_SELF_HOSTED_FN("getPrototypeOf", "ObjectGetPrototypeOf", 1, 0),
JS_FN("setPrototypeOf", obj_setPrototypeOf, 2, 0),
@ -2165,7 +2160,6 @@ static const JSFunctionSpec object_static_methods[] = {
JS_FN("isSealed", obj_isSealed, 1, 0),
JS_SELF_HOSTED_FN("fromEntries", "ObjectFromEntries", 1, 0),
JS_FS_END
// clang-format on
};
static JSObject*

View File

@ -385,7 +385,6 @@ str_uneval(JSContext* cx, unsigned argc, Value* vp)
}
static const JSFunctionSpec string_functions[] = {
// clang-format off
JS_FN(js_escape_str, str_escape, 1, JSPROP_RESOLVING),
JS_FN(js_unescape_str, str_unescape, 1, JSPROP_RESOLVING),
JS_FN(js_uneval_str, str_uneval, 1, JSPROP_RESOLVING),
@ -395,7 +394,6 @@ static const JSFunctionSpec string_functions[] = {
JS_FN(js_encodeURIComponent_str, str_encodeURI_Component, 1, JSPROP_RESOLVING),
JS_FS_END
// clang-format on
};
static const unsigned STRING_ELEMENT_ATTRS = JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT;
@ -3403,7 +3401,6 @@ js::str_concat(JSContext* cx, unsigned argc, Value* vp)
}
static const JSFunctionSpec string_methods[] = {
// clang-format off
JS_FN(js_toSource_str, str_toSource, 0,0),
/* Java-like methods. */
@ -3467,7 +3464,6 @@ static const JSFunctionSpec string_methods[] = {
JS_SELF_HOSTED_SYM_FN(iterator, "String_iterator", 0,0),
JS_FS_END
// clang-format on
};
// ES6 rev 27 (2014 Aug 24) 21.1.1
@ -3726,7 +3722,6 @@ js::str_fromCodePoint(JSContext* cx, unsigned argc, Value* vp)
}
static const JSFunctionSpec string_static_methods[] = {
// clang-format off
JS_INLINABLE_FN("fromCharCode", js::str_fromCharCode, 1, 0, StringFromCharCode),
JS_INLINABLE_FN("fromCodePoint", js::str_fromCodePoint, 1, 0, StringFromCodePoint),
@ -3761,7 +3756,6 @@ static const JSFunctionSpec string_static_methods[] = {
JS_SELF_HOSTED_FN("localeCompare", "String_static_localeCompare", 2,0),
JS_FS_END
// clang-format on
};
/* static */ Shape*

View File

@ -5812,6 +5812,7 @@ PCCountProfiling_ScriptContents(JSContext* cx, unsigned argc, Value* vp)
return true;
}
// clang-format off
static const JSFunctionSpecWithHelp TestingFunctions[] = {
JS_FN_HELP("gc", ::GC, 0, 0,
"gc([obj] | 'zone' [, 'shrinking'])",
@ -6514,7 +6515,9 @@ gc::ZealModeHelpText),
JS_FS_HELP_END
};
// clang-format on
// clang-format off
static const JSFunctionSpecWithHelp FuzzingUnsafeTestingFunctions[] = {
#ifdef DEBUG
JS_FN_HELP("parseRegExp", ParseRegExp, 3, 0,
@ -6544,7 +6547,9 @@ JS_FN_HELP("setDefaultLocale", SetDefaultLocale, 1, 0,
JS_FS_HELP_END
};
// clang-format on
// clang-format off
static const JSFunctionSpecWithHelp PCCountProfilingTestingFunctions[] = {
JS_FN_HELP("start", PCCountProfiling_Start, 0, 0,
"start()",
@ -6574,6 +6579,7 @@ static const JSFunctionSpecWithHelp PCCountProfilingTestingFunctions[] = {
JS_FS_HELP_END
};
// clang-format on
bool
js::DefineTestingFunctions(JSContext* cx, HandleObject obj, bool fuzzingSafe_,

View File

@ -314,11 +314,9 @@ const JSPropertySpec WeakMapObject::properties[] = {
};
const JSFunctionSpec WeakMapObject::methods[] = {
// clang-format off
JS_FN("has", has, 1, 0),
JS_FN("get", get, 1, 0),
JS_FN("delete", delete_, 1, 0),
JS_FN("set", set, 2, 0),
JS_FS_END
// clang-format on
};

View File

@ -162,12 +162,10 @@ const JSPropertySpec WeakSetObject::properties[] = {
};
const JSFunctionSpec WeakSetObject::methods[] = {
// clang-format off
JS_FN("add", add, 1, 0),
JS_FN("delete", delete_, 1, 0),
JS_FN("has", has, 1, 0),
JS_FS_END
// clang-format on
};
WeakSetObject*

View File

@ -20,12 +20,14 @@ Something(JSContext* cx, unsigned argc, JS::Value* vp)
return true;
}
// clang-format off
static const JSFunctionSpecWithHelp unwind_functions[] = {
JS_FN_HELP("something", Something, 0, 0,
"something()",
" Test function for test-unwind."),
JS_FS_HELP_END
};
// clang-format on
FRAGMENT(unwind, simple) {
using namespace JS;

View File

@ -3350,16 +3350,13 @@ date_toPrimitive(JSContext* cx, unsigned argc, Value* vp)
}
static const JSFunctionSpec date_static_methods[] = {
// clang-format off
JS_FN("UTC", date_UTC, 7,0),
JS_FN("parse", date_parse, 1,0),
JS_FN("now", date_now, 0,0),
JS_FS_END
// clang-format on
};
static const JSFunctionSpec date_methods[] = {
// clang-format off
JS_FN("getTime", date_getTime, 0,0),
JS_FN("getTimezoneOffset", date_getTimezoneOffset, 0,0),
JS_FN("getYear", date_getYear, 0,0),
@ -3414,7 +3411,6 @@ static const JSFunctionSpec date_methods[] = {
JS_FN(js_valueOf_str, date_valueOf, 0,0),
JS_SYM_FN(toPrimitive, date_toPrimitive, 1,JSPROP_READONLY),
JS_FS_END
// clang-format on
};
static bool

View File

@ -1092,7 +1092,6 @@ math_toSource(JSContext* cx, unsigned argc, Value* vp)
}
static const JSFunctionSpec math_static_methods[] = {
// clang-format off
JS_FN(js_toSource_str, math_toSource, 0, 0),
JS_INLINABLE_FN("abs", math_abs, 1, 0, MathAbs),
JS_INLINABLE_FN("acos", math_acos, 1, 0, MathACos),
@ -1130,7 +1129,6 @@ static const JSFunctionSpec math_static_methods[] = {
JS_INLINABLE_FN("sign", math_sign, 1, 0, MathSign),
JS_INLINABLE_FN("cbrt", math_cbrt, 1, 0, MathCbrt),
JS_FS_END
// clang-format on
};
JSObject*

View File

@ -1205,7 +1205,6 @@ num_toPrecision(JSContext* cx, unsigned argc, Value* vp)
}
static const JSFunctionSpec number_methods[] = {
// clang-format off
JS_FN(js_toSource_str, num_toSource, 0, 0),
JS_FN(js_toString_str, num_toString, 1, 0),
#if EXPOSE_INTL_API
@ -1218,7 +1217,6 @@ static const JSFunctionSpec number_methods[] = {
JS_FN("toExponential", num_toExponential, 1, 0),
JS_FN("toPrecision", num_toPrecision, 1, 0),
JS_FS_END
// clang-format on
};
bool

View File

@ -100,13 +100,11 @@ pm_canMeasureSomething(JSContext* cx, unsigned argc, Value* vp)
static const uint8_t PM_FATTRS = JSPROP_READONLY | JSPROP_PERMANENT;
static const JSFunctionSpec pm_fns[] = {
// clang-format off
JS_FN("start", pm_start, 0, PM_FATTRS),
JS_FN("stop", pm_stop, 0, PM_FATTRS),
JS_FN("reset", pm_reset, 0, PM_FATTRS),
JS_FN("canMeasureSomething", pm_canMeasureSomething, 0, PM_FATTRS),
JS_FS_END
// clang-format on
};
static const uint8_t PM_PATTRS =

View File

@ -625,6 +625,7 @@ osfile_close(JSContext* cx, unsigned argc, Value* vp) {
return true;
}
// clang-format off
static const JSFunctionSpecWithHelp osfile_functions[] = {
JS_FN_HELP("readFile", osfile_readFile, 1, 0,
"readFile(filename, [\"binary\"])",
@ -639,7 +640,9 @@ static const JSFunctionSpecWithHelp osfile_functions[] = {
JS_FS_HELP_END
};
// clang-format on
// clang-format off
static const JSFunctionSpecWithHelp osfile_unsafe_functions[] = {
JS_FN_HELP("writeTypedArrayToFile", osfile_writeTypedArrayToFile, 2, 0,
"writeTypedArrayToFile(filename, data)",
@ -661,6 +664,7 @@ static const JSFunctionSpecWithHelp osfile_unsafe_functions[] = {
JS_FS_HELP_END
};
// clang-format on
static bool
ospath_isAbsolute(JSContext* cx, unsigned argc, Value* vp)
@ -730,6 +734,7 @@ ospath_join(JSContext* cx, unsigned argc, Value* vp)
return true;
}
// clang-format off
static const JSFunctionSpecWithHelp ospath_functions[] = {
JS_FN_HELP("isAbsolute", ospath_isAbsolute, 1, 0,
"isAbsolute(path)",
@ -741,6 +746,7 @@ static const JSFunctionSpecWithHelp ospath_functions[] = {
JS_FS_HELP_END
};
// clang-format on
static bool
os_getenv(JSContext* cx, unsigned argc, Value* vp)
@ -984,6 +990,7 @@ os_waitpid(JSContext* cx, unsigned argc, Value* vp)
}
#endif
// clang-format off
static const JSFunctionSpecWithHelp os_functions[] = {
JS_FN_HELP("getenv", os_getenv, 1, 0,
"getenv(variable)",
@ -1017,6 +1024,7 @@ static const JSFunctionSpecWithHelp os_functions[] = {
JS_FS_HELP_END
};
// clang-format on
bool
DefineOS(JSContext* cx, HandleObject global,

View File

@ -8381,6 +8381,7 @@ WasmLoop(JSContext* cx, unsigned argc, Value* vp)
#endif
}
// clang-format off
static const JSFunctionSpecWithHelp shell_functions[] = {
JS_FN_HELP("clone", Clone, 1, 0,
"clone(fun[, scope])",
@ -9020,7 +9021,9 @@ JS_FN_HELP("parseBin", BinParse, 1, 0,
JS_FS_HELP_END
};
// clang-format on
// clang-format off
static const JSFunctionSpecWithHelp fuzzing_unsafe_functions[] = {
JS_FN_HELP("getSelfHostedValue", GetSelfHostedValue, 1, 0,
"getSelfHostedValue()",
@ -9104,7 +9107,9 @@ TestAssertRecoveredOnBailout,
JS_FS_HELP_END
};
// clang-format on
// clang-format off
static const JSFunctionSpecWithHelp performance_functions[] = {
JS_FN_HELP("now", Now, 0, 0,
"now()",
@ -9112,7 +9117,9 @@ static const JSFunctionSpecWithHelp performance_functions[] = {
" This function is an alias of the dateNow() function."),
JS_FS_HELP_END
};
// clang-format on
// clang-format off
static const JSFunctionSpecWithHelp console_functions[] = {
JS_FN_HELP("log", Print, 0, 0,
"log([exp ...])",
@ -9120,6 +9127,7 @@ static const JSFunctionSpecWithHelp console_functions[] = {
" This function is an alias of the print() function."),
JS_FS_HELP_END
};
// clang-format on
bool
DefineConsole(JSContext* cx, HandleObject global)

View File

@ -1934,7 +1934,6 @@ JSFunction::maybeRelazify(JSRuntime* rt)
}
const JSFunctionSpec js::function_methods[] = {
// clang-format off
JS_FN(js_toSource_str, fun_toSource, 0,0),
JS_FN(js_toString_str, fun_toString, 0,0),
JS_FN(js_apply_str, fun_apply, 2,0),
@ -1942,7 +1941,6 @@ const JSFunctionSpec js::function_methods[] = {
JS_SELF_HOSTED_FN("bind", "FunctionBind", 2, 0),
JS_SYM_FN(hasInstance, fun_symbolHasInstance, 1, JSPROP_READONLY | JSPROP_PERMANENT),
JS_FS_END
// clang-format on
};
// ES2018 draft rev 2aea8f3e617b49df06414eb062ab44fad87661d3

View File

@ -2391,7 +2391,6 @@ intrinsic_CopyDataPropertiesOrGetOwnKeys(JSContext* cx, unsigned argc, Value* vp
// Additionally, a set of C++-implemented helper functions is defined on the
// self-hosting global.
static const JSFunctionSpec intrinsic_functions[] = {
// clang-format off
JS_INLINABLE_FN("std_Array", array_construct, 1,0, Array),
JS_INLINABLE_FN("std_Array_join", array_join, 1,0, ArrayJoin),
JS_INLINABLE_FN("std_Array_push", array_push, 1,0, ArrayPush),
@ -2665,16 +2664,20 @@ static const JSFunctionSpec intrinsic_functions[] = {
JS_INLINABLE_FN("SetTypedObjectOffset", js::SetTypedObjectOffset, 2, 0,
IntrinsicSetTypedObjectOffset),
// clang-format off
#define LOAD_AND_STORE_SCALAR_FN_DECLS(_constant, _type, _name) \
JS_FN("Store_" #_name, js::StoreScalar##_type::Func, 3, 0), \
JS_FN("Load_" #_name, js::LoadScalar##_type::Func, 3, 0),
JS_FOR_EACH_UNIQUE_SCALAR_TYPE_REPR_CTYPE(LOAD_AND_STORE_SCALAR_FN_DECLS)
// clang-format on
#undef LOAD_AND_STORE_SCALAR_FN_DECLS
// clang-format off
#define LOAD_AND_STORE_REFERENCE_FN_DECLS(_constant, _type, _name) \
JS_FN("Store_" #_name, js::StoreReference##_name::Func, 3, 0), \
JS_FN("Load_" #_name, js::LoadReference##_name::Func, 3, 0),
JS_FOR_EACH_REFERENCE_TYPE_REPR(LOAD_AND_STORE_REFERENCE_FN_DECLS)
// clang-format on
#undef LOAD_AND_STORE_REFERENCE_FN_DECLS
// See builtin/intl/*.h for descriptions of the intl_* functions.
@ -2803,7 +2806,6 @@ static const JSFunctionSpec intrinsic_functions[] = {
JS_FN("PromiseResolve", intrinsic_PromiseResolve, 2, 0),
JS_FS_END
// clang-format on
};
void

View File

@ -0,0 +1,8 @@
[idbfactory-databases-opaque-origin.html]
expected: TIMEOUT
[IDBFactory.databases() in sandboxed iframe should reject]
expected: NOTRUN
[IDBFactory.databases() in non-sandboxed iframe should not reject]
expected: TIMEOUT

View File

@ -0,0 +1,4 @@
[shape-margin-computed.html]
[Property shape-margin value 'calc(10px - 0.5em)' computes to '0px']
expected: FAIL

View File

@ -0,0 +1,4 @@
[shape-outside-computed.html]
[Property shape-outside value 'circle(calc(10px - 0.5em) at 50% -50%) border-box' computes to 'circle(0px at 50% -50%) border-box']
expected: FAIL

View File

@ -30,3 +30,4 @@
[Window unforgeable attribute: top]
expected: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1510437

View File

@ -377,6 +377,7 @@
expected: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1510437
[interfaces.https.html?include=HTML.*]
[HTMLAllCollection must be primary interface of document.all]
expected: FAIL

View File

@ -1,2 +1,2 @@
local: 2d41baf691dc7f46f11c88e5f59ae4bf73ea82e8
upstream: c00fd5dec24aac426acb570e9d253ec609b109bd
local: 701ab2cfa61e2dc4fd222206f74f06be7bfdfd67
upstream: fe0e2ce1f30ee67ed4c3be7ae420d49b48bc5749

View File

@ -1,7 +0,0 @@
[pointerevent_pointermove.html]
expected:
if os == "android": TIMEOUT
[pointermove event received]
expected:
if os == "android": NOTRUN

View File

@ -1,4 +1,3 @@
[client-navigate.https.html]
disabled:
if os == "android": https://bugzilla.mozilla.org/show_bug.cgi?id=1499003

View File

@ -1,4 +1,3 @@
[postmessage.https.html]
disabled:
if os == "android": https://bugzilla.mozilla.org/show_bug.cgi?id=1499003

View File

@ -0,0 +1,10 @@
[color-rendering-valid.svg]
[e.style['color-rendering'\] = "optimizespeed" should set the property value]
expected: FAIL
[e.style['color-rendering'\] = "auto" should set the property value]
expected: FAIL
[e.style['color-rendering'\] = "optimizequality" should set the property value]
expected: FAIL

View File

@ -0,0 +1,10 @@
[fill-opacity-valid.svg]
[e.style['fill-opacity'\] = "300%" should set the property value]
expected: FAIL
[e.style['fill-opacity'\] = "50%" should set the property value]
expected: FAIL
[e.style['fill-opacity'\] = "-100%" should set the property value]
expected: FAIL

View File

@ -0,0 +1,10 @@
[paint-order-valid.svg]
[e.style['paint-order'\] = "markers fill" should set the property value]
expected: FAIL
[e.style['paint-order'\] = "fill stroke" should set the property value]
expected: FAIL
[e.style['paint-order'\] = "stroke fill" should set the property value]
expected: FAIL

View File

@ -0,0 +1,7 @@
[stroke-linejoin-valid.svg]
[e.style['stroke-linejoin'\] = "arcs" should set the property value]
expected: FAIL
[e.style['stroke-linejoin'\] = "miter-clip" should set the property value]
expected: FAIL

View File

@ -0,0 +1,7 @@
[stroke-miterlimit-valid.svg]
[e.style['stroke-miterlimit'\] = "0.5" should set the property value]
expected: FAIL
[e.style['stroke-miterlimit'\] = "0" should set the property value]
expected: FAIL

View File

@ -0,0 +1,10 @@
[stroke-opacity-valid.svg]
[e.style['stroke-opacity'\] = "50%" should set the property value]
expected: FAIL
[e.style['stroke-opacity'\] = "-100%" should set the property value]
expected: FAIL
[e.style['stroke-opacity'\] = "300%" should set the property value]
expected: FAIL

View File

@ -0,0 +1,55 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>IDBFactory.databases() and opaque origins</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
function load_iframe(src, sandbox) {
return new Promise(resolve => {
const iframe = document.createElement('iframe');
iframe.onload = () => { resolve(iframe); };
if (sandbox)
iframe.sandbox = sandbox;
iframe.srcdoc = src;
iframe.style.display = 'none';
document.documentElement.appendChild(iframe);
});
}
function wait_for_message(iframe) {
return new Promise(resolve => {
self.addEventListener('message', function listener(e) {
if (e.source === iframe.contentWindow) {
resolve(e.data);
self.removeEventListener('message', listener);
}
});
});
}
const script =
'<script>' +
' window.onmessage = () => {' +
' indexedDB.databases().then(' +
' () => window.parent.postMessage({result: "no exception"}, "*"),' +
' ex => window.parent.postMessage({result: ex.name}, "*"));' +
' };' +
'<\/script>';
promise_test(async t => {
const iframe = await load_iframe(script);
iframe.contentWindow.postMessage({}, '*');
const message = await wait_for_message(iframe);
assert_equals(message.result, 'no exception',
'IDBFactory.databases() should not reject');
}, 'IDBFactory.databases() in non-sandboxed iframe should not reject');
promise_test(async t => {
const iframe = await load_iframe(script, 'allow-scripts');
iframe.contentWindow.postMessage({}, '*');
const message = await wait_for_message(iframe);
assert_equals(message.result, 'SecurityError',
'Exception should be SecurityError');
}, 'IDBFactory.databases() in sandboxed iframe should reject');
</script>

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Animations: getComputedValue().animationDirection</title>
<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-direction">
<meta name="assert" content="animation-direction computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("animation-direction", "normal, reverse, alternate, alternate-reverse");
</script>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Animations: getComputedValue().animationFillMode</title>
<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-fill-mode">
<meta name="assert" content="animation-fill-mode computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("animation-fill-mode", "none, forwards, backwards, both");
</script>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Animations: getComputedValue().animationIterationCount</title>
<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-iteration-count">
<meta name="assert" content="animation-iteration-count computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("animation-iteration-count", "0, infinite, 3");
</script>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Animations: getComputedValue().animationPlayState</title>
<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-play-state">
<meta name="assert" content="animation-play-state computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("animation-play-state", "running, paused");
</script>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Shapes Module Level 1: getComputedValue().shapeImageThreshold</title>
<link rel="help" href="https://drafts.csswg.org/css-shapes/#shape-image-threshold-property">
<meta name="assert" content="shape-image-threshold computed value is as specified, clamped to [0,1].">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("shape-image-threshold", "-7", "0");
test_computed_value("shape-image-threshold", "0.5");
test_computed_value("shape-image-threshold", "12.5", "1");
</script>
</body>
</html>

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Shapes Module Level 1: getComputedValue().shapeMargin</title>
<link rel="help" href="https://drafts.csswg.org/css-shapes/#shape-margin-property">
<meta name="assert" content="shape-margin computed value is non-negative <length-percentage>.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<style>
#target {
font-size: 40px;
}
</style>
<div id="target"></div>
<script>
test_computed_value("shape-margin", "calc(10px + 0.5em)", "30px");
test_computed_value("shape-margin", "calc(10px - 0.5em)", "0px");
test_computed_value("shape-margin", "50%");
</script>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Shapes Module Level 1: getComputedValue().shapeOutside</title>
<link rel="help" href="https://drafts.csswg.org/css-shapes/#shape-outside-property">
<meta name="assert" content="shape-outside computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<style>
#target {
font-size: 40px;
}
</style>
<div id="target"></div>
<script>
test_computed_value("shape-outside", "circle(calc(10px + 0.5em) at -50% 50%) border-box", "circle(30px at -50% 50%) border-box");
test_computed_value("shape-outside", "circle(calc(10px - 0.5em) at 50% -50%) border-box", "circle(0px at 50% -50%) border-box");
</script>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Transitions: getComputedValue().transitionDelay</title>
<link rel="help" href="https://drafts.csswg.org/css-transitions/#propdef-transition-delay">
<meta name="assert" content="transition-delay converts to seconds.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("transition-delay", "-500ms, calc(2 * 3s)", "-0.5s, 6s");
</script>
</body>
</html>

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Transitions: getComputedValue().transitionProperty</title>
<link rel="help" href="https://drafts.csswg.org/css-transitions/#propdef-transition-property">
<meta name="assert" content="transition-property keeps unrecognized properties.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("transition-property", "left, top, right, bottom");
test_computed_value("transition-property", "one, two, three");
</script>
</body>
</html>

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: getComputedValue().boxSizing</title>
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#box-sizing">
<meta name="assert" content="box-sizing computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("box-sizing", "content-box");
test_computed_value("box-sizing", "border-box");
</script>
</body>
</html>

View File

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: getComputedValue().cursor</title>
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#cursor">
<meta name="assert" content="cursor computed value is as specified for keywords.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("cursor", "auto");
test_computed_value("cursor", "default");
test_computed_value("cursor", "none");
test_computed_value("cursor", "context-menu");
test_computed_value("cursor", "help");
test_computed_value("cursor", "pointer");
test_computed_value("cursor", "progress");
test_computed_value("cursor", "wait");
test_computed_value("cursor", "cell");
test_computed_value("cursor", "crosshair");
test_computed_value("cursor", "text");
test_computed_value("cursor", "vertical-text");
test_computed_value("cursor", "alias");
test_computed_value("cursor", "copy");
test_computed_value("cursor", "move");
test_computed_value("cursor", "no-drop");
test_computed_value("cursor", "not-allowed");
test_computed_value("cursor", "grab");
test_computed_value("cursor", "grabbing");
test_computed_value("cursor", "e-resize");
test_computed_value("cursor", "n-resize");
test_computed_value("cursor", "ne-resize");
test_computed_value("cursor", "nw-resize");
test_computed_value("cursor", "s-resize");
test_computed_value("cursor", "se-resize");
test_computed_value("cursor", "sw-resize");
test_computed_value("cursor", "w-resize");
test_computed_value("cursor", "ew-resize");
test_computed_value("cursor", "ns-resize");
test_computed_value("cursor", "nesw-resize");
test_computed_value("cursor", "nwse-resize");
test_computed_value("cursor", "col-resize");
test_computed_value("cursor", "row-resize");
test_computed_value("cursor", "all-scroll");
test_computed_value("cursor", "zoom-in");
test_computed_value("cursor", "zoom-out");
// Not yet tested: // [ [<url> [<x> <y>]?,]*
// "relative URLs converted to absolute"
</script>
</body>
</html>

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: getComputedValue().outlineOffset</title>
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-offset">
<meta name="assert" content="outline-offset computed value is absolute length.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<style>
#target {
font-size: 40px;
outline-width: 100px;
outline-style: dotted; /* Avoid outline-width computed style 0 */
}
</style>
<div id="target"></div>
<script>
test_computed_value("outline-offset", "10px");
test_computed_value("outline-offset", "0.5em", "20px");
test_computed_value("outline-offset", "calc(10px + 0.5em)", "30px");
test_computed_value("outline-offset", "calc(10px - 0.5em)", "-10px");
</script>
</body>
</html>

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: getComputedValue().outlineStyle</title>
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-style">
<meta name="assert" content="outline-style computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("outline-style", "auto");
test_computed_value("outline-style", "none");
test_computed_value("outline-style", "dotted");
test_computed_value("outline-style", "dashed");
test_computed_value("outline-style", "solid");
test_computed_value("outline-style", "double");
test_computed_value("outline-style", "groove");
test_computed_value("outline-style", "ridge");
test_computed_value("outline-style", "inset");
test_computed_value("outline-style", "outset");
</script>
</body>
</html>

View File

@ -13,6 +13,7 @@
<body>
<script>
test_valid_value("outline-style", "auto");
test_valid_value("outline-style", "none");
test_valid_value("outline-style", "dotted");
test_valid_value("outline-style", "dashed");

View File

@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: getComputedValue().outlineWidth</title>
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-width">
<meta name="assert" content="outline-width computed value is absolute length, 0 if the outline style is none.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<style>
#target {
font-size: 40px;
border-style: dotted; /* Avoid border-*-width computed style 0 */
border-top-width: thin;
border-right-width: medium;
border-bottom-width: thick;
outline-style: dotted; /* Avoid outline-width computed style 0 */
}
</style>
<div id="target"></div>
<script>
test_computed_value("outline-width", "10px");
test_computed_value("outline-width", "0.5em", "20px");
test_computed_value("outline-width", "calc(10px + 0.5em)", "30px");
test_computed_value("outline-width", "calc(10px - 0.5em)", "0px");
test_computed_value("outline-width", "thin", getComputedStyle(target).borderTopWidth);
test_computed_value("outline-width", "medium", getComputedStyle(target).borderRightWidth);
test_computed_value("outline-width", "thick", getComputedStyle(target).borderBottomWidth);
test(() => {
target.style['outline-width'] = '10px';
target.style['outline-style'] = 'none';
assert_equals(getComputedStyle(target)['outline-width'], '0px');
target.style['outline-style'] = '';
}, 'outline-width is 0 when outline-style is none');
</script>
</body>
</html>

View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: getComputedValue().resize</title>
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#resize">
<meta name="assert" content="resize computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("resize", "none");
test_computed_value("resize", "both");
test_computed_value("resize", "horizontal");
test_computed_value("resize", "vertical");
</script>
</body>
</html>

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS UI Level 3: getComputedValue().textOverflow</title>
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#text-overflow">
<meta name="assert" content="text-overflow computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("text-overflow", "clip");
test_computed_value("text-overflow", "ellipsis");
</script>
</body>
</html>

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Writing Modes: getComputedValue().direction</title>
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-direction">
<meta name="assert" content="direction computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("direction", "ltr");
test_computed_value("direction", "rtl");
</script>
</body>
</html>

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Writing Modes: getComputedValue().textCombineUpright</title>
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-text-combine-upright">
<meta name="assert" content="text-combine-upright computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("text-combine-upright", "none");
test_computed_value("text-combine-upright", "all");
</script>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Writing Modes: getComputedValue().textOrientation</title>
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-text-orientation">
<meta name="assert" content="text-orientation computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("text-orientation", "mixed");
test_computed_value("text-orientation", "upright");
test_computed_value("text-orientation", "sideways");
</script>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Writing Modes: getComputedValue().unicodeBidi</title>
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-unicode-bidi">
<meta name="assert" content="unicode-bidi computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("unicode-bidi", "normal");
test_computed_value("unicode-bidi", "embed");
test_computed_value("unicode-bidi", "isolate");
test_computed_value("unicode-bidi", "bidi-override");
test_computed_value("unicode-bidi", "isolate-override");
test_computed_value("unicode-bidi", "plaintext");
</script>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Writing Modes: getComputedValue().writingMode</title>
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-writing-mode">
<meta name="assert" content="writing-mode computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("writing-mode", "horizontal-tb");
test_computed_value("writing-mode", "vertical-rl");
test_computed_value("writing-mode", "vertical-lr");
</script>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Filter Effects Module Level 1: getComputedValue().colorInterpolationFilters</title>
<link rel="help" href="https://drafts.fxtf.org/filter-effects/#ColorInterpolationFiltersProperty">
<meta name="assert" content="color-interpolation-filters computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("color-interpolation-filters", "auto");
test_computed_value("color-interpolation-filters", "srgb");
test_computed_value("color-interpolation-filters", "linearrgb");
</script>
</body>
</html>

View File

@ -5,7 +5,9 @@
<title>Filter Effects Module Level 1: parsing color-interpolation-filters with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/filter-effects/#ColorInterpolationFiltersProperty">
<link rel="help" href="https://drafts.csswg.org/cssom/#serializing-css-values">
<meta name="assert" content="color-interpolation-filters supports the full grammar 'auto | sRGB | linearRGB'.">
<meta name="assert" content="Keywords serialize in lower case.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
@ -13,14 +15,9 @@
<body>
<script>
test_valid_value("color-interpolation-filters", "auto");
// Blink serializes these keywords as mixed case. Firefox serializes as lowercase.
test_valid_value("color-interpolation-filters", "sRGB", ["sRGB", "srgb"]);
test_valid_value("color-interpolation-filters", "srgb", ["sRGB", "srgb"]);
test_valid_value("color-interpolation-filters", "SrGb", ["sRGB", "srgb"]);
test_valid_value("color-interpolation-filters", "linearRGB", ["linearRGB", "linearrgb"]);
test_valid_value("color-interpolation-filters", "linearrgb", ["linearRGB", "linearrgb"]);
test_valid_value("color-interpolation-filters", "LiNeArRgB", ["linearRGB", "linearrgb"]);
test_valid_value("color-interpolation-filters", "sRGB", "srgb");
test_valid_value("color-interpolation-filters", "linearRGB", "linearrgb");
test_valid_value("color-interpolation-filters", "LiNeArRgB", "linearrgb");
</script>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Filter Effects Module Level 1: getComputedValue().lightingColor</title>
<link rel="help" href="https://drafts.fxtf.org/filter-effects/#LightingColorProperty">
<meta name="assert" content="lighting-color computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("lighting-color", "rgb(1, 2, 3)");
</script>
</body>
</html>

View File

@ -5,7 +5,7 @@
<title>Filter Effects Module Level 1: parsing lighting-color with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/filter-effects/#LightingColorProperty">
<meta name="assert" content="lighting-color supports only the grammar 'auto | sRGB | linearRGB'.">
<meta name="assert" content="lighting-color supports only the grammar '<color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>

View File

@ -5,7 +5,7 @@
<title>Filter Effects Module Level 1: parsing lighting-color with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/filter-effects/#LightingColorProperty">
<meta name="assert" content="lighting-color supports the full grammar 'auto | sRGB | linearRGB'.">
<meta name="assert" content="lighting-color supports the full grammar '<color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>

View File

@ -0,0 +1,3 @@
[pause.html]
expected:
if product == "chrome" or product == "safari" or product == "safari_webdriver": ERROR

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>TestDriver actions: pause</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script>
promise_test(() => {
let t0 = performance.now();
return new test_driver.Actions()
.addTick(1000)
.send()
.then(() => assert_greater_than(performance.now() - t0, 1000));
})
</script>

View File

@ -21,6 +21,7 @@ enum MediaSessionAction {
"seekforward",
"previoustrack",
"nexttrack",
"skip-ad",
};
callback MediaSessionActionHandler = void();

View File

@ -0,0 +1,4 @@
<!-- quirks mode -->
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="width:100px; height:100px; background:green;"></div>

View File

@ -0,0 +1,12 @@
<!-- quirks mode -->
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
<link rel="help" href="https://quirks.spec.whatwg.org/#the-blocks-ignore-line-height-quirk">
<link rel="match" href="line-height-trailing-collapsable-whitespace-ref.html">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="font-size:100px;">
<div style="display:inline-block; width:100px; height:50px; background:green;"></div>
<!-- Having collapsable whitespace here triggers a bug in Blink.
See crbug.com/845902#c2 -->
<br>
<div style="width:100px; height:50px; background:green;"></div>
</div>

View File

@ -179,6 +179,14 @@ function queryWorker(url, callback) {
};
}
function queryModuleWorkerTopLevel(url, callback) {
var worker = new Worker(url, {type: "module"});
worker.onmessage = function(event) {
var server_data = event.data;
callback(wrapResult(url, server_data), url);
};
}
function queryFetch(url, callback) {
fetch(url).then(function(response) {
response.json().then(function(server_data) {

View File

@ -21,6 +21,7 @@ function ReferrerPolicyTestCase(scenario, testDescription, sanityChecker) {
"img-tag": queryImage,
"script-tag": queryScript,
"worker-request": queryWorker,
"module-worker": queryModuleWorkerTopLevel,
"xhr-request": queryXhr
};

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer-when-downgrade'</title>
<meta name="description" content="Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.">
<!-- No meta: Referrer policy delivered via HTTP headers. -->
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade">
<meta name="assert" content="The referrer URL is stripped-referrer when a
document served over http requires an http
sub-resource via module-worker using the http-rp
delivery method with keep-origin-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "no-referrer-when-downgrade",
"delivery_method": "http-rp",
"redirection": "keep-origin-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "stripped-referrer"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,2 @@
Referrer-Policy: no-referrer-when-downgrade
Access-Control-Allow-Origin: *

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer-when-downgrade'</title>
<meta name="description" content="Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.">
<!-- No meta: Referrer policy delivered via HTTP headers. -->
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade">
<meta name="assert" content="The referrer URL is stripped-referrer when a
document served over http requires an http
sub-resource via module-worker using the http-rp
delivery method with no-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "no-referrer-when-downgrade",
"delivery_method": "http-rp",
"redirection": "no-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "stripped-referrer"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,2 @@
Referrer-Policy: no-referrer-when-downgrade
Access-Control-Allow-Origin: *

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer-when-downgrade'</title>
<meta name="description" content="Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.">
<meta name="referrer" content="no-referrer-when-downgrade">
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade">
<meta name="assert" content="The referrer URL is stripped-referrer when a
document served over http requires an http
sub-resource via module-worker using the meta-referrer
delivery method with keep-origin-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "no-referrer-when-downgrade",
"delivery_method": "meta-referrer",
"redirection": "keep-origin-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "stripped-referrer"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer-when-downgrade'</title>
<meta name="description" content="Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.">
<meta name="referrer" content="no-referrer-when-downgrade">
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade">
<meta name="assert" content="The referrer URL is stripped-referrer when a
document served over http requires an http
sub-resource via module-worker using the meta-referrer
delivery method with no-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "no-referrer-when-downgrade",
"delivery_method": "meta-referrer",
"redirection": "no-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "stripped-referrer"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer'</title>
<meta name="description" content="Check that sub-resource never gets the referrer URL.">
<!-- No meta: Referrer policy delivered via HTTP headers. -->
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer">
<meta name="assert" content="The referrer URL is omitted when a
document served over http requires an http
sub-resource via module-worker using the http-rp
delivery method with keep-origin-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "no-referrer",
"delivery_method": "http-rp",
"redirection": "keep-origin-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "omitted"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,2 @@
Referrer-Policy: no-referrer
Access-Control-Allow-Origin: *

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer'</title>
<meta name="description" content="Check that sub-resource never gets the referrer URL.">
<!-- No meta: Referrer policy delivered via HTTP headers. -->
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer">
<meta name="assert" content="The referrer URL is omitted when a
document served over http requires an http
sub-resource via module-worker using the http-rp
delivery method with no-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "no-referrer",
"delivery_method": "http-rp",
"redirection": "no-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "omitted"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,2 @@
Referrer-Policy: no-referrer
Access-Control-Allow-Origin: *

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer'</title>
<meta name="description" content="Check that sub-resource never gets the referrer URL.">
<meta name="referrer" content="no-referrer">
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer">
<meta name="assert" content="The referrer URL is omitted when a
document served over http requires an http
sub-resource via module-worker using the meta-referrer
delivery method with keep-origin-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "no-referrer",
"delivery_method": "meta-referrer",
"redirection": "keep-origin-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "omitted"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer'</title>
<meta name="description" content="Check that sub-resource never gets the referrer URL.">
<meta name="referrer" content="no-referrer">
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer">
<meta name="assert" content="The referrer URL is omitted when a
document served over http requires an http
sub-resource via module-worker using the meta-referrer
delivery method with no-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "no-referrer",
"delivery_method": "meta-referrer",
"redirection": "no-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "omitted"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
<meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
<!-- No meta: Referrer policy delivered via HTTP headers. -->
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
<meta name="assert" content="The referrer URL is stripped-referrer when a
document served over http requires an http
sub-resource via module-worker using the http-rp
delivery method with keep-origin-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "origin-when-cross-origin",
"delivery_method": "http-rp",
"redirection": "keep-origin-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "stripped-referrer"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,2 @@
Referrer-Policy: origin-when-cross-origin
Access-Control-Allow-Origin: *

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
<meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
<!-- No meta: Referrer policy delivered via HTTP headers. -->
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
<meta name="assert" content="The referrer URL is stripped-referrer when a
document served over http requires an http
sub-resource via module-worker using the http-rp
delivery method with no-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "origin-when-cross-origin",
"delivery_method": "http-rp",
"redirection": "no-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "stripped-referrer"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,2 @@
Referrer-Policy: origin-when-cross-origin
Access-Control-Allow-Origin: *

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
<meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
<meta name="referrer" content="origin-when-cross-origin">
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
<meta name="assert" content="The referrer URL is stripped-referrer when a
document served over http requires an http
sub-resource via module-worker using the meta-referrer
delivery method with keep-origin-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "origin-when-cross-origin",
"delivery_method": "meta-referrer",
"redirection": "keep-origin-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "stripped-referrer"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
<meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
<meta name="referrer" content="origin-when-cross-origin">
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
<meta name="assert" content="The referrer URL is stripped-referrer when a
document served over http requires an http
sub-resource via module-worker using the meta-referrer
delivery method with no-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "origin-when-cross-origin",
"delivery_method": "meta-referrer",
"redirection": "no-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "stripped-referrer"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
<meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
<!-- No meta: Referrer policy delivered via HTTP headers. -->
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
<meta name="assert" content="The referrer URL is origin when a
document served over http requires an http
sub-resource via module-worker using the http-rp
delivery method with keep-origin-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "origin",
"delivery_method": "http-rp",
"redirection": "keep-origin-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "origin"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,2 @@
Referrer-Policy: origin
Access-Control-Allow-Origin: *

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
<meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
<!-- No meta: Referrer policy delivered via HTTP headers. -->
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
<meta name="assert" content="The referrer URL is origin when a
document served over http requires an http
sub-resource via module-worker using the http-rp
delivery method with no-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "origin",
"delivery_method": "http-rp",
"redirection": "no-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "origin"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,2 @@
Referrer-Policy: origin
Access-Control-Allow-Origin: *

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
<meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
<meta name="referrer" content="origin">
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
<meta name="assert" content="The referrer URL is origin when a
document served over http requires an http
sub-resource via module-worker using the meta-referrer
delivery method with keep-origin-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "origin",
"delivery_method": "meta-referrer",
"redirection": "keep-origin-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "origin"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'origin'</title>
<meta name="description" content="Check that all subresources in all casses get only the origin portion of the referrer URL.">
<meta name="referrer" content="origin">
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin">
<meta name="assert" content="The referrer URL is origin when a
document served over http requires an http
sub-resource via module-worker using the meta-referrer
delivery method with no-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "origin",
"delivery_method": "meta-referrer",
"redirection": "no-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "origin"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'same-origin'</title>
<meta name="description" content="Check that cross-origin subresources get no referrer information and same-origin get the stripped referrer URL.">
<!-- No meta: Referrer policy delivered via HTTP headers. -->
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-same-origin">
<meta name="assert" content="The referrer URL is stripped-referrer when a
document served over http requires an http
sub-resource via module-worker using the http-rp
delivery method with keep-origin-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "same-origin",
"delivery_method": "http-rp",
"redirection": "keep-origin-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "stripped-referrer"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'same-origin'</title>
<meta name="description" content="Check that cross-origin subresources get no referrer information and same-origin get the stripped referrer URL.">
<!-- No meta: Referrer policy delivered via HTTP headers. -->
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-same-origin">
<meta name="assert" content="The referrer URL is stripped-referrer when a
document served over http requires an http
sub-resource via module-worker using the http-rp
delivery method with no-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "same-origin",
"delivery_method": "http-rp",
"redirection": "no-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "stripped-referrer"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,2 @@
Referrer-Policy: same-origin
Access-Control-Allow-Origin: *

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
<html>
<head>
<title>Referrer-Policy: Referrer Policy is set to 'same-origin'</title>
<meta name="description" content="Check that cross-origin subresources get no referrer information and same-origin get the stripped referrer URL.">
<meta name="referrer" content="same-origin">
<link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-same-origin">
<meta name="assert" content="The referrer URL is stripped-referrer when a
document served over http requires an http
sub-resource via module-worker using the meta-referrer
delivery method with keep-origin-redirect and when
the target request is same-origin.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- TODO(kristijanburnik): Minify and merge both: -->
<script src="/referrer-policy/generic/common.js"></script>
<script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
</head>
<body>
<script>
ReferrerPolicyTestCase(
{
"referrer_policy": "same-origin",
"delivery_method": "meta-referrer",
"redirection": "keep-origin-redirect",
"origin": "same-origin",
"source_protocol": "http",
"target_protocol": "http",
"subresource": "module-worker",
"subresource_path": "/referrer-policy/generic/subresource/worker.py",
"referrer_url": "stripped-referrer"
},
document.querySelector("meta[name=assert]").content,
new SanityChecker()
).start();
</script>
<div id="log"></div>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More