Commit 0f98cc3e authored by Jeroen Dhollander's avatar Jeroen Dhollander Committed by Chromium LUCI CQ

Uprev Libassistant to 1.50

These are the public changes required to uprev to 1.50.

NOTE: This includes the hash for the rolldep of src-internal,
as Libassistant 1.50 made some non-backwards compatible API changes.

The internal changes included can be found in crrev.com/i/3414233

Bug: b/170170824
Change-Id: I88f5836e896efe4005d6e9681175da36c07514b0
Tests: Manually deployed and tested Assistant queries.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2548684
Commit-Queue: Jeroen Dhollander <jeroendh@chromium.org>
Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833190}
parent 3205c9e9
......@@ -1626,7 +1626,7 @@ deps = {
Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'),
'src-internal': {
'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@0516cae2a76956ee97f7213eb3596a356ec7e2d7',
'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@ff0c8040cec4b7f11798576c0b161552ee659a82',
'condition': 'checkout_src_internal',
},
......
......@@ -25,15 +25,6 @@ constexpr int kVersion = 1;
constexpr int kStartBrightnessPercent = 50;
// Ensures that |value_| is within the range {min_, max_}. If it isn't, this
// will print a nice error message.
#define EXPECT_WITHIN_RANGE(min_, value_, max_) \
({ \
EXPECT_TRUE(min_ <= value_ && value_ <= max_) \
<< "Expected " << value_ << " to be within the range " \
<< "{" << min_ << ", " << max_ << "}."; \
})
} // namespace
class AssistantBrowserTest : public MixinBasedInProcessBrowserTest {
......
......@@ -257,11 +257,9 @@ IN_PROC_BROWSER_TEST_F(AssistantTimersBrowserTest,
// Start a timer for five minutes.
tester()->SendTextQuery("Set a timer for 5 minutes");
tester()->ExpectAnyOfTheseTextResponses({
"Alright, 5 min. Starting… now.",
"OK, 5 min. And we're starting… now.",
"OK, 5 min. Starting… now.",
"Sure, 5 min. And that's starting… now.",
"Sure, 5 min. Starting now.",
"Alright, 5 min.",
"OK, 5 min.",
"Sure, 5 min.",
});
// Tap status area widget (to show notifications in the Message Center).
......
......@@ -2853,7 +2853,7 @@ if (!is_android) {
}
deps += [ "//printing:test_support" ]
}
if (enable_assistant_integration_tests) {
if (enable_cros_libassistant) {
sources += [
"../browser/ui/ash/assistant/assistant_browsertest.cc",
"../browser/ui/ash/assistant/assistant_test_mixin.cc",
......
......@@ -12,6 +12,8 @@ declare_args() {
}
declare_args() {
# TODO(b/170170824): This flag is dead and should be removed when it is no
# longer set in the ChromeOS build.
# Enable Assistant integration tests using LibAssistant and a fake S3 server.
# This requires libassistant.so to support grpc communication with the S3
# server, which increases the library size, which is why we introduced this
......
......@@ -6,6 +6,7 @@
#include <utility>
#include "base/notreached.h"
#include "base/single_thread_task_runner.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
......@@ -24,5 +25,9 @@ ChromiumApiDelegate::GetHttpConnectionFactory() {
return &http_connection_factory_;
}
void ChromiumApiDelegate::OverrideDoNotDisturb(bool do_not_disturb_enabled) {
NOTIMPLEMENTED();
}
} // namespace assistant
} // namespace chromeos
......@@ -29,6 +29,7 @@ class ChromiumApiDelegate : public assistant_client::FuchsiaApiDelegate {
~ChromiumApiDelegate() override;
// assistant_client::FuchsiaApiDelegate overrides:
assistant_client::HttpConnectionFactory* GetHttpConnectionFactory() override;
void OverrideDoNotDisturb(bool do_not_disturb_enabled) override;
private:
ChromiumHttpConnectionFactory http_connection_factory_;
......
......@@ -152,6 +152,15 @@ void ChromiumHttpConnection::Start() {
case Method::HEAD:
resource_request->method = "HEAD";
break;
case Method::PATCH:
resource_request->method = "PATCH";
break;
case Method::PUT:
resource_request->method = "PUT";
break;
case Method::DELETE:
resource_request->method = "DELETE";
break;
}
resource_request->credentials_mode = network::mojom::CredentialsMode::kOmit;
......
......@@ -40,6 +40,22 @@ void CreateUserAgent(std::string* user_agent) {
base::StringAppendF(user_agent, " ARC/%s", arc_version.c_str());
}
// Returns if we are running a test or release image.
bool IsTestImage() {
// If we're not running on real hardware, we're considered a test build.
// This check is needed because the release track is only set for real
// hardware.
if (!base::SysInfo::IsRunningOnChromeOS())
return true;
constexpr char kChromeOSReleaseTrack[] = "CHROMEOS_RELEASE_TRACK";
constexpr char kTestImageRelease[] = "testimage-channel";
std::string track;
bool found = base::SysInfo::GetLsbReleaseValue(kChromeOSReleaseTrack, &track);
return found && (track.find(kTestImageRelease) != std::string::npos);
}
} // namespace
// Get the root path for assistant files.
......@@ -148,10 +164,11 @@ std::string CreateLibAssistantConfig(
GetBaseAssistantDir().AsUTF8Unsafe());
}
if (features::IsLibAssistantBetaBackendEnabled() ||
features::IsAssistantDebuggingEnabled()) {
// Inform Libassistant if we're running a test image, because Libassistant has
// a consistency check to ensure |libassistant_debug.so| is not used in
// production.
if (IsTestImage())
config.SetStringPath("internal.backend_type", "BETA_DOGFOOD");
}
// Use http unless we're using the fake s3 server, which requires grpc.
if (s3_server_uri_override)
......
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