Auto merge of #13836 - emilio:js-intl, r=Ms2ger

Update mozjs_sys to expose proper locale callbacks.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #13788 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Fixes #13788

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13836)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-10-25 05:51:03 -05:00 committed by GitHub
commit c8321edc27
6 changed files with 21 additions and 4 deletions

View file

@ -29,13 +29,13 @@ Please select your operating system:
#### On OS X (homebrew) #### On OS X (homebrew)
``` sh ``` sh
brew install automake pkg-config python cmake brew install automake pkg-config python cmake yasm
pip install virtualenv pip install virtualenv
``` ```
#### On OS X (MacPorts) #### On OS X (MacPorts)
``` sh ``` sh
sudo port install python27 py27-virtualenv cmake sudo port install python27 py27-virtualenv cmake yasm
``` ```
#### On OS X >= 10.11 (El Capitan), you also have to install OpenSSL #### On OS X >= 10.11 (El Capitan), you also have to install OpenSSL

View file

@ -1358,7 +1358,7 @@ dependencies = [
[[package]] [[package]]
name = "mozjs_sys" name = "mozjs_sys"
version = "0.0.0" version = "0.0.0"
source = "git+https://github.com/servo/mozjs#34c3e075138bb7eff2ed8b5924ccb9067dcd017e" source = "git+https://github.com/servo/mozjs#f7917c480e3378441ee54c0554f6a3af9fb57464"
dependencies = [ dependencies = [
"libc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",

2
ports/cef/Cargo.lock generated
View file

@ -1258,7 +1258,7 @@ dependencies = [
[[package]] [[package]]
name = "mozjs_sys" name = "mozjs_sys"
version = "0.0.0" version = "0.0.0"
source = "git+https://github.com/servo/mozjs#34c3e075138bb7eff2ed8b5924ccb9067dcd017e" source = "git+https://github.com/servo/mozjs#f7917c480e3378441ee54c0554f6a3af9fb57464"
dependencies = [ dependencies = [
"libc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",

View file

@ -7094,6 +7094,12 @@
"url": "/_mozilla/mozilla/load_event.html" "url": "/_mozilla/mozilla/load_event.html"
} }
], ],
"mozilla/localeCompare.html": [
{
"path": "mozilla/localeCompare.html",
"url": "/_mozilla/mozilla/localeCompare.html"
}
],
"mozilla/mime_sniffing_font_context.html": [ "mozilla/mime_sniffing_font_context.html": [
{ {
"path": "mozilla/mime_sniffing_font_context.html", "path": "mozilla/mime_sniffing_font_context.html",

View file

@ -20,6 +20,7 @@ function test_interfaces(interfaceNamesInGlobalScope) {
"Int32Array", "Int32Array",
"Int8Array", "Int8Array",
"InternalError", "InternalError",
"Intl",
"Iterator", "Iterator",
"JSON", "JSON",
"Map", "Map",

View file

@ -0,0 +1,10 @@
<!doctype html>
<meta charset="utf-8">
<title>localeCompare should return the same as other browsers, even though it's implementation-dependent</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(function() {
assert_equals("ab".localeCompare("aZ"), -1);
})
</script>