Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Unified Diff: chrome/test/data/android/barcode_detection.html

Issue 2711893003: Shape detection: moar content_browsertests (face, qr/barcode) (Closed)
Patch Set: Make initialization of std::vector<std::vector<float>> explicit to avoid 'error: chosen constructor… Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/android/barcode_detection.html
diff --git a/chrome/test/data/android/barcode_detection.html b/chrome/test/data/android/barcode_detection.html
new file mode 100644
index 0000000000000000000000000000000000000000..6a3e2a2f2d236437604c4dc21df624ae32c78b7d
--- /dev/null
+++ b/chrome/test/data/android/barcode_detection.html
@@ -0,0 +1,26 @@
+<html>
+<title>test</title>
+<body>
+</body>
+<script>
+ var img = new Image();
+
+ img.onload = function() {
+ var detector = new BarcodeDetector();
+
+ detector.detect(img)
+ .then(detectedObjects => {
+ if (detectedObjects.length)
+ document.title = detectedObjects[0].rawValue;
+ else
+ document.title = 'found no shapes';
+ })
+ .catch(error => {
+ document.title = 'Error during detection: ' + error.message;
+ });
+ }
+
+ // "https://chromium.org" encoded as QR code in base64
+ img.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUoAAAFKAQMAAABB54RGAAAABlBMVEX///8AAABVwtN+AAABUUlEQVRoge2ZwY3FIAxELf0CUlJap6QUEMkbbA+wi5Q92l+aOYQQHqcRZiAiFEVRFPVt0tAtcl7iD20HPjeipVDvHPcz6fr4uHXXUaJl0G5i62MnKOua2USrombsw9/wmWhhdHpKtC5qzaDOXjnbf/WVaBIaQqmMBz4TLYX+0TP2eQWIZqLh3wF3I/b3za4/iJZC4yzW7dQL03v3aYmWQ5d0j6MZZm4LkmgyakNx46F2NNPXQEI0EzUAfCw+jXyiSrQWupZKX4uCI/W+GxLNRj0v4vjsPns+2Yom0XwUq23ucyJI/EQLoksqcd7dveWXiKaj6yRv4emopkTLoIgjCPtGzZuqRrQU6h3sbrEgJYwlWg0dv8LGZQeK5mYs0Tqo53y7UtSxzxEtirYDlAHzjWgd1JqZHC/cJr7UV6JZaGgN+/6veV+GRLNRiqIoivoO/QAJkSlOdmbU0AAAAABJRU5ErkJggg==';
+</script>
+</html>

Powered by Google App Engine
This is Rietveld 408576698