blob: 79e2455cf730a6ec06530583adfd85c176c0d8b9 [file] [log] [blame]
* Copyright (c) 2014, 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.
* @description Test that a content-language with missing content is
* effectively ignored
import "dart:html";
import "../../testcommon.dart";
getComputedStyle(x, [pseudoElement]) => x.getComputedStyle(pseudoElement);
main() {
var meta = new DocumentFragment.html('''
<meta http-equiv="content-language">
''', treeSanitizer: new NullTreeSanitizer());
<p>Test for <a href="">bug 76701</a>:
map HTTP-EQUIV content-language to -webkit-locale. This particular test tests that
a content-language with missing content is effectively ignored. This expectation
may change, see comments in bug.
<div id="console"></div>
<div id="x"></div>
<div id="y" lang="ar"></div>
''', treeSanitizer: new NullTreeSanitizer());
if(document.getElementById('x').style.supportsProperty('-webkit-locale')) {
languageOfNode(id) {
var element = document.getElementById(id);
return getComputedStyle(element).getPropertyValue('-webkit-locale');
shouldBeLikeString(languageOfNode('x'), "auto");
shouldBeLikeString(languageOfNode('y'), "ar");