Files
sdk/tests/chrome/sample_test.dart
T
blois@google.com e78e8b1cc1 Stubbing out the initial library for Chrome application support.
This adds the core skeleton of Chrome application support with a sample function that allows creating a new window (in dart2js).

BUG=

Review URL: https://codereview.chromium.org//11958026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17299 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 18:05:19 +00:00

24 lines
689 B
Dart

// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library sample_test;
import '../../pkg/unittest/lib/unittest.dart';
import '../../pkg/unittest/lib/html_config.dart';
import 'dart:chrome' as chrome;
main() {
useHtmlConfiguration();
test('access', () {
var window = chrome.app.window;
expect(window is chrome.WindowModule, true);
});
test('fails from browser', () {
// APIs should not work in standard browser apps.
expect(() {
chrome.app.window.create('foo.html');
}, throws);
});
}