11cb0ef41Sopenharmony_ci<!DOCTYPE html> 21cb0ef41Sopenharmony_ci<meta charset="utf-8"> 31cb0ef41Sopenharmony_ci<title>FileAPI Test: Verify origin of Blob URL</title> 41cb0ef41Sopenharmony_ci<script src="/resources/testharness.js"></script> 51cb0ef41Sopenharmony_ci<script src="/resources/testharnessreport.js"></script> 61cb0ef41Sopenharmony_ci<body> 71cb0ef41Sopenharmony_ci<script> 81cb0ef41Sopenharmony_ciasync_test(t => { 91cb0ef41Sopenharmony_ci const frame = document.createElement('iframe'); 101cb0ef41Sopenharmony_ci self.addEventListener('message', t.step_func(e => { 111cb0ef41Sopenharmony_ci if (e.source != frame.contentWindow) return; 121cb0ef41Sopenharmony_ci const url = e.data.url; 131cb0ef41Sopenharmony_ci assert_false(url.includes('天気の良い日'), 141cb0ef41Sopenharmony_ci 'Origin should be ascii rather than unicode'); 151cb0ef41Sopenharmony_ci assert_equals(new URL(url).origin, e.origin, 161cb0ef41Sopenharmony_ci 'Origin of URL should match origin of frame'); 171cb0ef41Sopenharmony_ci assert_true(url.startsWith('blob:{{location[scheme]}}://xn--')); 181cb0ef41Sopenharmony_ci t.done(); 191cb0ef41Sopenharmony_ci })); 201cb0ef41Sopenharmony_ci frame.src = '{{location[scheme]}}://{{domains[天気の良い日]}}:{{location[port]}}/FileAPI/support/url-origin.html'; 211cb0ef41Sopenharmony_ci document.body.appendChild(frame); 221cb0ef41Sopenharmony_ci}, 'Verify serialization of non-ascii origin in Blob URLs'); 231cb0ef41Sopenharmony_ci</script> 24