summaryrefslogtreecommitdiff
path: root/chromium/components/page_image_annotation
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-16 09:59:13 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-20 10:28:53 +0000
commit6c11fb357ec39bf087b8b632e2b1e375aef1b38b (patch)
treec8315530db18a8ee566521c39ab8a6af4f72bc03 /chromium/components/page_image_annotation
parent3ffaed019d0772e59d6cdb2d0d32fe4834c31f72 (diff)
downloadqtwebengine-chromium-6c11fb357ec39bf087b8b632e2b1e375aef1b38b.tar.gz
BASELINE: Update Chromium to 74.0.3729.159
Change-Id: I8d2497da544c275415aedd94dd25328d555de811 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/components/page_image_annotation')
-rw-r--r--chromium/components/page_image_annotation/content/renderer/BUILD.gn4
-rw-r--r--chromium/components/page_image_annotation/core/page_annotator.cc1
-rw-r--r--chromium/components/page_image_annotation/core/page_annotator_unittest.cc8
3 files changed, 12 insertions, 1 deletions
diff --git a/chromium/components/page_image_annotation/content/renderer/BUILD.gn b/chromium/components/page_image_annotation/content/renderer/BUILD.gn
index a96c4d039ce..2c4b39bbedb 100644
--- a/chromium/components/page_image_annotation/content/renderer/BUILD.gn
+++ b/chromium/components/page_image_annotation/content/renderer/BUILD.gn
@@ -21,6 +21,10 @@ static_library("renderer") {
"//third_party/blink/public/common",
"//url",
]
+
+ public_deps = [
+ "//third_party/blink/public:blink_headers",
+ ]
}
source_set("unit_tests") {
diff --git a/chromium/components/page_image_annotation/core/page_annotator.cc b/chromium/components/page_image_annotation/core/page_annotator.cc
index 46611fcc7f2..5a63ecac420 100644
--- a/chromium/components/page_image_annotation/core/page_annotator.cc
+++ b/chromium/components/page_image_annotation/core/page_annotator.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "components/page_image_annotation/core/page_annotator.h"
+#include "base/bind.h"
namespace page_image_annotation {
diff --git a/chromium/components/page_image_annotation/core/page_annotator_unittest.cc b/chromium/components/page_image_annotation/core/page_annotator_unittest.cc
index a2c84cb2fee..571b1f4c208 100644
--- a/chromium/components/page_image_annotation/core/page_annotator_unittest.cc
+++ b/chromium/components/page_image_annotation/core/page_annotator_unittest.cc
@@ -6,6 +6,7 @@
#include <vector>
+#include "base/bind.h"
#include "base/test/scoped_task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -180,8 +181,13 @@ TEST(PageAnnotatorTest, Annotation) {
// Expect success and failure to be reported.
const auto error = ia_mojom::AnnotateImageResult::NewErrorCode(
ia_mojom::AnnotateImageError::kCanceled);
+
+ // Can't use an initializer list since it performs copies.
+ std::vector<ia_mojom::AnnotationPtr> annotations;
+ annotations.push_back(ia_mojom::Annotation::New(
+ ia_mojom::AnnotationType::kOcr, 1.0, "text from image"));
const auto success =
- ia_mojom::AnnotateImageResult::NewOcrText("text from image");
+ ia_mojom::AnnotateImageResult::NewAnnotations(std::move(annotations));
ASSERT_THAT(test_annotator.callbacks_, SizeIs(3));
std::move(test_annotator.callbacks_[0]).Run(error.Clone());