Commit a507ce8b authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

Add hyphenation dictionaries for web_tests to data_deps

This patch adds hyphenation dictionaries necessary for
|web_tests| to |data_deps| of |blink_web_tests_support_data|.

The dictionaries were added to |blink_platform_unittests| in
r818929 crrev.com/c/2483725 but |web_tests| needs to add it
to |//BUILD.gn|.

Also updates |WebTestContentBrowserClient| to use the
directory, and update |TestExpectations|.

Bug: 1139950
Change-Id: Ibf20385ad133e523d420fd39ea2f9ed54bd6cd04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2487020Reviewed-by: default avatardanakj <danakj@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@google.com>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819111}
parent 73fa844f
......@@ -1067,6 +1067,7 @@ if (!is_ios) {
"//third_party/blink/public/mojom:mojom_platform_js_data_deps",
"//third_party/blink/renderer/core:js_files_for_form_controls_web_tests",
"//third_party/catapult/third_party/typ",
"//third_party/hyphenation-patterns:test_data",
"//third_party/mesa_headers",
"//tools/imagediff",
]
......
......@@ -11,6 +11,7 @@
#include <vector>
#include "base/bind.h"
#include "base/path_service.h"
#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/strings/pattern.h"
......@@ -517,4 +518,17 @@ std::string WebTestContentBrowserClient::GetAcceptLangs(
return content::GetShellLanguage();
}
void WebTestContentBrowserClient::GetHyphenationDictionary(
base::OnceCallback<void(const base::FilePath&)> callback) {
// Use the dictionaries in the runtime deps instead of the repository. The
// build infrastructure takes only the list of files that GN determines to be
// the runtime deps, not the whole repository.
base::FilePath dir;
if (base::PathService::Get(base::DIR_EXE, &dir)) {
dir = dir.AppendASCII("gen/hyphen-data");
std::move(callback).Run(dir);
}
// No need to callback if there were no dictionaries.
}
} // namespace content
......@@ -107,6 +107,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
RendererSpawnFlags flags) override;
#endif
std::string GetAcceptLangs(BrowserContext* context) override;
void GetHyphenationDictionary(
base::OnceCallback<void(const base::FilePath&)>) override;
private:
// ShellContentBrowserClient overrides.
......
......@@ -1636,7 +1636,7 @@ crbug.com/1022182 virtual/module-top-level-await/external/wpt/html/webappapis/dy
crbug.com/1022182 virtual/module-top-level-await/external/wpt/html/webappapis/dynamic-markup-insertion/document-write/module-tla-import.html [ Pass ]
crbug.com/1022182 virtual/module-top-level-await/external/wpt/html/webappapis/dynamic-markup-insertion/document-write/module-tla-promise.html [ Pass ]
crbug.com/676270 [ Mac ] external/wpt/css/css-text/hyphens/hyphens-auto-001.html [ Failure ]
crbug.com/676270 external/wpt/css/css-text/hyphens/hyphens-auto-001.html [ Failure ]
crbug.com/1022415 external/wpt/css/css-text/hyphens/hyphens-auto-010.html [ Failure ]
crbug.com/1022415 [ Linux ] external/wpt/css/css-text/hyphens/hyphens-auto-inline-010.html [ Failure ]
crbug.com/1022415 [ Win ] external/wpt/css/css-text/hyphens/hyphens-auto-inline-010.html [ Failure ]
......@@ -1644,10 +1644,9 @@ crbug.com/963369 external/wpt/css/css-text/hyphens/hyphens-out-of-flow-001.html
crbug.com/963369 external/wpt/css/css-text/hyphens/hyphens-out-of-flow-002.html [ Failure ]
crbug.com/639223 external/wpt/css/css-text/hyphens/hyphens-shaping-002.html [ Failure ]
crbug.com/639223 external/wpt/css/css-text/hyphens/hyphens-span-001.html [ Failure ]
crbug.com/639223 [ Mac ] external/wpt/css/css-text/hyphens/hyphens-span-002.html [ Failure ]
crbug.com/639223 external/wpt/css/css-text/hyphens/hyphens-span-002.html [ Failure ]
crbug.com/639223 external/wpt/css/css-text/hyphens/shy-styling-001.html [ Failure ]
crbug.com/870219 virtual/text-antialias/hyphens/hyphen-min-preferred-width-mock.html [ Failure ]
crbug.com/870219 [ Win ] virtual/text-antialias/hyphens/hyphens-auto.html [ Failure ]
crbug.com/870219 virtual/text-antialias/hyphens/hyphens-auto-mock.html [ Failure ]
crbug.com/1139693 virtual/text-antialias/hyphens/midword-break-priority.html [ Failure ]
......@@ -6421,9 +6420,6 @@ crbug.com/1138591 [ Mac10.15 ] http/tests/dom/raf-throttling-out-of-view-cross-o
# WebRTC: Payload demuxing times out in Plan B. This is expected.
crbug.com/1139052 virtual/webrtc-wpt-plan-b/external/wpt/webrtc/protocol/unbundled-pt-demuxing.https.html [ Timeout ]
# Sheriff 2020-10-19
crbug.com/1139950 [ Linux ] virtual/text-antialias/hyphens/hyphens-auto.html [ Failure ]
# Rename document.featurePolicy to document.permissionsPolicy
crbug.com/1123116 external/wpt/permissions-policy/payment-supported-by-permissions-policy.tentative.html [ Failure ]
crbug.com/1123116 external/wpt/permissions-policy/permissions-policy-frame-policy-allowed-for-all.https.sub.html [ Failure ]
......
This is a testharness.js-based test.
PASS This test requires "internals.canHyphenate"
FAIL "en-us" can hyphenate assert_true: expected true got false
FAIL "en-gu" can hyphenate assert_true: expected true got false
PASS "ja-jp" cannot hyphenate
Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment