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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/cross-frame-mouse-source-capabilities.html

Issue 2675793005: Track constant InputDeviceCapabilities objects per-window. (Closed)
Patch Set: also test roundtripping within a Window context Created 3 years, 10 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
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <script src="/js-test-resources/js-test.js"></script>
5 <script>
6 description('Test that event sourceCapabilities object is not shared cross-origi n');
7
8 window.jsTestIsAsync = true;
dcheng 2017/02/07 06:53:04 Nit: can we write this using testharness.js?
sof 2017/02/07 08:58:05 Done.
9
10 var finalStep = false;
11
12 if (window.testRunner) {
13 testRunner.waitUntilDone();
14 testRunner.dumpAsText();
15 }
16
17 window.addEventListener('message', function(evt) {
18 if (evt.data === "start") {
19 setTimeout(runTest);
20 return;
21 }
22
23 shouldBeUndefined(evt.data);
24 finalStep = true;
25 runTest();
26 });
27
28 function handler(event) {
29 shouldBeNonNull("event.sourceCapabilities");
30 if (finalStep) {
31 shouldBeEqualToNumber("event.sourceCapabilities.customProperty", 42);
32 finishJSTest();
33 return;
34 }
35 event.sourceCapabilities.customProperty = 42;
36 }
37
38 function runTest() {
39 document.querySelector("button").click();
40 }
41 </script>
42 </head>
43 <body>
44 <button onclick="handler(event)"></button>
45 <iframe src="http://localhost:8000/security/resources/cross-frame-mouse-source-c apabilities.html"></iframe>
46 </body>
47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698