OLD | NEW |
| (Empty) |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
2 // for details. All rights reserved. Use of this source code is governed by a | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 library sample_test; | |
6 | |
7 import 'package:unittest/unittest.dart'; | |
8 import 'package:unittest/html_config.dart'; | |
9 import 'dart:_chrome' as _chrome; | |
10 | |
11 main() { | |
12 useHtmlConfiguration(); | |
13 test('access', () { | |
14 var window = _chrome.app.window; | |
15 expect(window is _chrome.WindowModule, true); | |
16 }); | |
17 | |
18 test('fails from browser', () { | |
19 // APIs should not work in standard browser apps. | |
20 expect(() { | |
21 _chrome.app.window.create('IntentionallyMissingFile.html'); | |
22 }, throws); | |
23 }); | |
24 } | |
OLD | NEW |