img-topics-attribute.tentative.https.html (870B)
1 <!doctype html> 2 <body> 3 <script src=/resources/testharness.js></script> 4 <script src=/resources/testharnessreport.js></script> 5 <script src=/common/utils.js></script> 6 <script src=/browsing-topics/resources/load_img.sub.js></script> 7 <script> 8 const EMPTY_TOPICS_HEADER = '();p=P0000000000000000000000000000000'; 9 10 promise_test(async () => { 11 const topics_header = await load_topics_image( 12 /*has_browsing_topics_attribute=*/false, /*is_same_origin=*/true); 13 assert_equals(topics_header, 'NO_TOPICS_HEADER'); 14 }, 'test <img src=[url]></img>'); 15 promise_test(async () => { 16 const topics_header = await load_topics_image( 17 /*has_browsing_topics_attribute=*/true, /*is_same_origin=*/true); 18 assert_equals(topics_header, EMPTY_TOPICS_HEADER); 19 }, 'test <img browsingtopics src=[url]></img>'); 20 21 </script> 22 </body>