Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-frame-errors.html

Issue 1861663002: CREDENTIAL: Block API access from non-top-level Documents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: security_check Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/credentialmanager/resources/iframed-credentialscontainer.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Credential Manager: get() basics.</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script>
6 function create_iframe_test(origin) {
7 return function (t) {
8 window.addEventListener("load", _ => {
9 var frame_tests = 0;
10 var iframe = document.createElement("iframe");
11 iframe.src = origin + "/credentialmanager/resources/iframed-credenti alscontainer.html";
12 window.addEventListener("message", t.step_func(e => {
13 if (e.source == iframe.contentWindow) {
14 assert_equals(e.data.credential, null);
15 assert_equals(e.data.exception, "SecurityError");
16 frame_tests++;
17 if (frame_tests == 3)
18 t.done();
19 }
20 }));
21 document.body.appendChild(iframe);
22 });
23 };
24 }
25
26 async_test(create_iframe_test("http://127.0.0.1:8000"), "Same-origin IFrame thro ws.");
27 async_test(create_iframe_test("http://example.test:8000"), "Cross-origin IFrame throws.");
28 </script>
29
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/credentialmanager/resources/iframed-credentialscontainer.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698