From 52dfda893d18e51fdf92fc53465e9b2a31669c5f Mon Sep 17 00:00:00 2001 From: Ms2ger <Ms2ger@igalia.com> Date: Wed, 24 Oct 2018 10:57:26 +0200 Subject: [PATCH] Intl.Segmenter: Test the order of properties in the result of resolvedOptions(). --- .../prototype/resolvedOptions/order.js | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/intl402/Segmenter/prototype/resolvedOptions/order.js diff --git a/test/intl402/Segmenter/prototype/resolvedOptions/order.js b/test/intl402/Segmenter/prototype/resolvedOptions/order.js new file mode 100644 index 0000000000..82fc705f2f --- /dev/null +++ b/test/intl402/Segmenter/prototype/resolvedOptions/order.js @@ -0,0 +1,21 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-Intl.Segmenter.prototype.resolvedOptions +description: Verifies the property order for the object returned by resolvedOptions(). +includes: [compareArray.js] +features: [Intl.Segmenter] +---*/ + +const options = new Intl.Segmenter([], { + "granularity": "line", +}).resolvedOptions(); + +const expected = [ + "locale", + "granularity", + "lineBreakStyle", +]; + +assert.compareArray(Object.getOwnPropertyNames(options), expected); -- GitLab