W3C home > Mailing lists > Public > public-webappsec@w3.org > June 2017

if the spec require FetchEvent return the integrity value

From: Zhang, Xiaofeng <xiaofeng.zhang@intel.com>
Date: Tue, 20 Jun 2017 06:22:31 +0000
To: "public-webappsec@w3.org" <public-webappsec@w3.org>
Message-ID: <0A69F75AE33F46479629A1B92848A62C3F76EB1B@SHSMSX104.ccr.corp.intel.com>

I am not sure this is a proper place to ask the question, but no reply in github: https://github.com/w3c/webappsec-subresource-integrity/issues/71

I am working a chromium fetch test issue, the test is to set a script.integrity, and then determine whether this integrity value and FetchEvent returned integrity value are equal.
My question is that if the spec require FetchEvent return this value? I didn't find that here https://www.w3.org/TR/SRI/.
Thanks a lot for your kindly answer!

Some test code:

function script_integrity_test(frame, url, integrity, expected_integrity) {
   var actual_url = url + (++url_count);
   expected_results[actual_url] = {
       url: actual_url,
       mode: 'no-cors',
       credentials: 'include',
       redirect: 'follow',
       integrity: expected_integrity,
       message: 'Script load (url:' + actual_url + ')'
   return frame.contentWindow.load_script_with_integrity(actual_url, integrity);
function load_script_with_integrity(url, integrity) {
var script = document.createElement('script');
script.src = url;
script.integrity = integrity;
assert_equals(result.integrity, expected.integrity)

Best Regards
Xiaofeng Zhang
Received on Tuesday, 20 June 2017 07:57:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:55:01 UTC