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

Side by Side Diff: LayoutTests/dart/WindowAttrs.html

Issue 1532413002: Added Dartium changes onto 45.0.2454.104 (Closed) Base URL: http://src.chromium.org/blink/branches/chromium/2454
Patch Set: Created 5 years 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 <html>
2 <body>
3
4 <div id='foo'></div>
5
6 <script type="application/dart">
7 import 'dart:html';
8
9 void main() {
10 log("window.document is Document: ${document is Document}");
11 // FIXME: move into separate HTMLDocument test.
12 Element foo = document.query('#foo');
13 log("window.document.query('#foo') is DivElement: ${foo is DivElement}");
14 Element missing = document.query('#missing_id');
15 log("window.document.query('#missing_id'): $missing");
16 bool closed = window.closed;
17 log("window.closed: $closed");
18 window.name = "WindowAttr";
19 String name = window.name;
20 log("window.name: '$name'");
21 mustThrow("window.name = 239", () { window.name = 239; });
22 // Note: later we may rethink it and treat null as allowed value.
23 mustThrow("window.name = null", () { window.name = null; });
24 mustThrow("window.onload = 239", () { window.onload = 239; });
25 log("PASS");
26 }
27
28 void mustThrow(String snippet, void code()) {
29 // FIXME: re-enable when we don't immediately output exceptions into stdout.
30 return;
31 try {
32 code();
33 log("FAILED: $snippet should have thrown");
34 } catch(e) {
35 log("$snippet threw $e");
36 }
37 }
38
39 void log(String msg) {
40 Element element = new Element.tag('div');
41 element.innerHtml = msg;
42 document.body.nodes.add(element);
43 }
44 </script>
45
46 <script>
47 if (window.testRunner)
48 window.testRunner.dumpAsText();
49 </script>
50
51 </body>
52 </html>
OLDNEW
« no previous file with comments | « LayoutTests/dart/Window-postMessage-expected.txt ('k') | LayoutTests/dart/WindowAttrs-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698