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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/html/browsers/the-window-object/window-indexed-properties.html

Issue 2012333004: Fix testharness paths in imported/wpt/{dom,html}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
1 <!doctype html> 1 <!doctype html>
2 <meta charset=utf-8> 2 <meta charset=utf-8>
3 <title>Indexed properties of the window object (non-strict mode)</title> 3 <title>Indexed properties of the window object (non-strict mode)</title>
4 <link rel="author" title="Ms2ger" href="ms2ger@gmail.com"> 4 <link rel="author" title="Ms2ger" href="ms2ger@gmail.com">
5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#window"> 5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#window">
6 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-window-item"> 6 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-window-item">
7 <link rel="help" href="https://heycam.github.io/webidl/#getownproperty"> 7 <link rel="help" href="https://heycam.github.io/webidl/#getownproperty">
8 <link rel="help" href="https://heycam.github.io/webidl/#defineownproperty"> 8 <link rel="help" href="https://heycam.github.io/webidl/#defineownproperty">
9 <script src="../../../../../resources/testharness.js"></script> 9 <script src="/resources/testharness.js"></script>
10 <script src="../../../../../resources/testharnessreport.js"></script> 10 <script src="/resources/testharnessreport.js"></script>
11 <div id=log></div> 11 <div id=log></div>
12 <iframe></iframe> 12 <iframe></iframe>
13 <script> 13 <script>
14 test(function() { 14 test(function() {
15 assert_false("-1" in window, "-1 not in window"); 15 assert_false("-1" in window, "-1 not in window");
16 assert_equals(window[-1], undefined); 16 assert_equals(window[-1], undefined);
17 window[-1] = "foo"; 17 window[-1] = "foo";
18 assert_equals(window[-1], "foo"); 18 assert_equals(window[-1], "foo");
19 }); 19 });
20 test(function() { 20 test(function() {
21 window[0] = "foo"; 21 window[0] = "foo";
22 assert_equals(window[0], 22 assert_equals(window[0],
23 document.getElementsByTagName("iframe")[0].contentWindow); 23 document.getElementsByTagName("iframe")[0].contentWindow);
24 }); 24 });
25 test(function() { 25 test(function() {
26 window[1] = "foo"; 26 window[1] = "foo";
27 assert_equals(window[1], undefined); 27 assert_equals(window[1], undefined);
28 }); 28 });
29 test(function() { 29 test(function() {
30 var proto = Window.prototype; 30 var proto = Window.prototype;
31 [-1, 0, 1].forEach(function(idx) { 31 [-1, 0, 1].forEach(function(idx) {
32 assert_false(idx in proto, idx + " in proto"); 32 assert_false(idx in proto, idx + " in proto");
33 }); 33 });
34 }); 34 });
35 </script> 35 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698