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

Unified Diff: LayoutTests/fast/encoding/api/textdecoder-ignorebom.html

Issue 292243003: Encoding API: Expose 'fatal' and 'ignoreBOM' readonly attributes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Regen test results Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/encoding/api/textdecoder-ignorebom.html
diff --git a/LayoutTests/fast/encoding/api/textdecoder-ignorebom.html b/LayoutTests/fast/encoding/api/textdecoder-ignorebom.html
index 80be41e88d9ed890796c188846b5b5dee627ec46..6770b532cea51d6fad6e91031e260939e41162b1 100644
--- a/LayoutTests/fast/encoding/api/textdecoder-ignorebom.html
+++ b/LayoutTests/fast/encoding/api/textdecoder-ignorebom.html
@@ -34,4 +34,12 @@ cases.forEach(function(testCase) {
}, 'BOM is ignored if ignoreBOM option is specified: ' + testCase.encoding);
});
+test(function() {
+ assert_true('ignoreBOM' in new TextDecoder(), 'The ignoreBOM attribute should exist on TextDecoder.');
+ assert_equals(typeof new TextDecoder().ignoreBOM, 'boolean', 'The type of the ignoreBOM attribute should be boolean.');
+ assert_false(new TextDecoder().ignoreBOM, 'The ignoreBOM attribute should default to false.');
+ assert_true(new TextDecoder('utf-8', {ignoreBOM: true}).ignoreBOM, 'The ignoreBOM attribute can be set using an option.');
+
+}, 'The ignoreBOM attribute of TextDecoder');
+
</script>

Powered by Google App Engine
This is Rietveld 408576698