diff --git a/BUILD.gn b/BUILD.gn index d93cc2d..7357321 100644 --- a/BUILD.gn +++ b/BUILD.gn
@@ -729,7 +729,6 @@ "//media/mojo:media_mojo_unittests", "//mojo/common:mojo_common_perftests", "//services:service_unittests", - "//services/video_capture:video_capture_unittests", ] }
diff --git a/DEPS b/DEPS index 4f4a9dc..00fe1e4f 100644 --- a/DEPS +++ b/DEPS
@@ -40,11 +40,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': '85dc96b8cef031cc38d80f63056581c41c57ff7d', + 'skia_revision': '2d0f45262299ccf08c51ccb2d5303284f002b191', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': 'f71c54e1a6d48be75faeadd49c479e8bf77427cd', + 'v8_revision': '1391b942d80abbd43fdbe52fcc5ca4741c5effb9', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling swarming_client # and whatever else without interference from each other. @@ -64,7 +64,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. - 'pdfium_revision': '6db6df7735febef44a8b82ed2bd3ff038d4b8698', + 'pdfium_revision': '576e8151efab01166142ec697b66ce38b7bf6780', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling openmax_dl # and whatever else without interference from each other. @@ -96,7 +96,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': '2d88298fa830dad08c57694172db93d08ddc4421', + 'catapult_revision': '986b4e8b58804b7aa7bec4479b10087607ba9548', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. @@ -205,7 +205,7 @@ Var('chromium_git') + '/webm/libvpx.git' + '@' + '164db8278f68a5ab376500ed6aad99ef7da3e9b0', 'src/third_party/ffmpeg': - Var('chromium_git') + '/chromium/third_party/ffmpeg.git' + '@' + 'a628732d02feec0e7d4d4bba1c0507aa8eed7879', + Var('chromium_git') + '/chromium/third_party/ffmpeg.git' + '@' + 'bc2eb1987e956f5d2747e8c9c61ac346a2c91c92', 'src/third_party/usrsctp/usrsctplib': Var('chromium_git') + '/external/github.com/sctplab/usrsctp' + '@' + '8679f2b0bf063ac894dc473debefd61dbbebf622',
diff --git a/android_webview/native/aw_contents_client_bridge.cc b/android_webview/native/aw_contents_client_bridge.cc index c83a8cba..28d089b 100644 --- a/android_webview/native/aw_contents_client_bridge.cc +++ b/android_webview/native/aw_contents_client_bridge.cc
@@ -16,6 +16,7 @@ #include "base/macros.h" #include "base/memory/ptr_util.h" #include "base/memory/ref_counted.h" +#include "base/message_loop/message_loop.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/client_certificate_delegate.h" #include "content/public/browser/render_process_host.h"
diff --git a/ash/common/cast_config_controller.h b/ash/common/cast_config_controller.h index 38806e1a..57a2c5c 100644 --- a/ash/common/cast_config_controller.h +++ b/ash/common/cast_config_controller.h
@@ -9,6 +9,7 @@ #include "ash/public/interfaces/cast_config.mojom.h" #include "base/macros.h" +#include "base/observer_list.h" #include "mojo/public/cpp/bindings/associated_binding.h" #include "mojo/public/cpp/bindings/binding_set.h"
diff --git a/ash/common/media_controller.h b/ash/common/media_controller.h index 22165915..4a8eb1c 100644 --- a/ash/common/media_controller.h +++ b/ash/common/media_controller.h
@@ -7,6 +7,7 @@ #include "ash/public/interfaces/media.mojom.h" #include "base/macros.h" +#include "base/observer_list.h" #include "mojo/public/cpp/bindings/associated_binding.h" #include "mojo/public/cpp/bindings/binding_set.h"
diff --git a/ash/common/strings/ash_strings_am.xtb b/ash/common/strings/ash_strings_am.xtb index e588b385..4804e908 100644 --- a/ash/common/strings/ash_strings_am.xtb +++ b/ash/common/strings/ash_strings_am.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="am"> <translation id="1012876632442809908">USB-C መሣሪያ (የፊት ወደብ)</translation> <translation id="1013923882670373915">የብሉቱዝ መሣሪያ «<ph name="DEVICE_NAME" />» ለመጣመር ፍቃድ ይፈልጋል። እባክዎ ይህን የፒን ኮድ በዚህ መሣሪያ ላይ ያስገቡ፦ <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">የግቤት ስልቱ የሚቀየርበት አቋራጭ ተቀይሯል። እባክዎ ከ<ph name="OLD_SHORTCUT" /> ይልቅ <ph name="NEW_SHORTCUT" />ን ይጠቀሙ።</translation> <translation id="112308213915226829">መደርደሪያን በራስ ሰር ደብቅ</translation> <translation id="1127238861555034875">የማጉያ መነጽር ሁነታ</translation> <translation id="1195412055398077112">ትርፍ ቅኝት</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">ወደ <ph name="DISPLAY_NAME" /> በማንጸባረቅ ላይ</translation> <translation id="1919743966458266018">የተግባር መሪው የሚከፈትበት አቋራጭ ተቀይሯል። እባክዎ ከ<ph name="OLD_SHORTCUT" /> ይልቅ <ph name="NEW_SHORTCUT" />ን ይጠቀሙ።</translation> <translation id="1923539912171292317">ራስ-ሰር ጠቅታዎች</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">አነስተኛ ኃይል ያለው ባትሪ መሙያ</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">ተጨማሪ ለመረዳት...</translation> <translation id="4961318399572185831">የCast ማያ ገጽ</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">የGoogle Drive ቅንብሮች...</translation> <translation id="510924152490034944">ግንኙነት ክትትል የሚደረግበት ሊሆን ይችላል</translation> <translation id="5168181903108465623">የCast መሣሪያዎች ይገኛሉ</translation>
diff --git a/ash/common/strings/ash_strings_ar.xtb b/ash/common/strings/ash_strings_ar.xtb index 81e5c3d..3d240ea5 100644 --- a/ash/common/strings/ash_strings_ar.xtb +++ b/ash/common/strings/ash_strings_ar.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="ar"> <translation id="1012876632442809908">جهاز USB-C (المنفذ الأمامي)</translation> <translation id="1013923882670373915">يريد جهاز بلوتوث "<ph name="DEVICE_NAME" />" الحصول على إذن للإقران. الرجاء إدخال رقم التعريف الشخصي هذا في هذا الجهاز: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">لقد تغيّر اختصار التبديل إلى أسلوب الإدخال التالي. يُرجى استخدام <ph name="NEW_SHORTCUT" /> بدلاً من <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">الإخفاء التلقائي للرف</translation> <translation id="1127238861555034875">وضع العدسة المكبرة</translation> <translation id="1195412055398077112">الخروج عن إطار الشاشة</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">نسخ إلى <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">لقد تغيّر اختصار فتح إدارة المهام. يُرجى استخدام <ph name="NEW_SHORTCUT" /> بدلاً من <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">النقرات التلقائية</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0 درجة</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">شاحن منخفض الطاقة</translation> @@ -140,7 +138,6 @@ <translation id="4957722034734105353">مزيد من المعلومات...</translation> <translation id="4961318399572185831">إرسال الشاشة</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">إعدادات Google Drive...</translation> <translation id="510924152490034944">قد تتم مراقبة الاتصال</translation> <translation id="5168181903108465623">أجهزة البث متاحة</translation>
diff --git a/ash/common/strings/ash_strings_bg.xtb b/ash/common/strings/ash_strings_bg.xtb index 0a64f17a..3cb9eac 100644 --- a/ash/common/strings/ash_strings_bg.xtb +++ b/ash/common/strings/ash_strings_bg.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="bg"> <translation id="1012876632442809908">USB-C устройство (предният порт)</translation> <translation id="1013923882670373915">Устройството с Bluetooth „<ph name="DEVICE_NAME" />“ иска разрешение за сдвояване. Моля, въведете на него следния ПИН код: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Комбинацията за превключване към следващия метод на въвеждане е променена. Моля, използвайте „<ph name="NEW_SHORTCUT" />“ вместо „<ph name="OLD_SHORTCUT" />“.</translation> <translation id="112308213915226829">Автоматично скриване на лавицата</translation> <translation id="1127238861555034875">Режим на лупа</translation> <translation id="1195412055398077112">допълнителна област</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Дублира се на „<ph name="DISPLAY_NAME" />“</translation> <translation id="1919743966458266018">Комбинацията за отваряне на диспечера на задачите е променена. Моля, използвайте „<ph name="NEW_SHORTCUT" />“ вместо „<ph name="OLD_SHORTCUT" />“.</translation> <translation id="1923539912171292317">Автоматични кликвания</translation> -<translation id="1938872420421548906">Shift + Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Зарядно устройство с малка мощност</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Научете повече...</translation> <translation id="4961318399572185831">Предаване на екрана</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl + Shift + Space</translation> <translation id="5045002648206642691">Настройки за Google Диск...</translation> <translation id="510924152490034944">Възможно е връзката да се наблюдава</translation> <translation id="5168181903108465623">Налице са устройства Cast</translation>
diff --git a/ash/common/strings/ash_strings_bn.xtb b/ash/common/strings/ash_strings_bn.xtb index 59b8738..24ef9ab 100644 --- a/ash/common/strings/ash_strings_bn.xtb +++ b/ash/common/strings/ash_strings_bn.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="bn"> <translation id="1012876632442809908">USB-C ডিভাইস (সামনের পোর্ট)</translation> <translation id="1013923882670373915">ব্লুটুথ ডিভাইস "<ph name="DEVICE_NAME" />" যুক্ত করার অনুমতি চাইছে। দয়া করে ডিভাইসটিতে এই পিন কোড প্রবেশ করুন: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">পরবর্তী ইনপুট পদ্ধতিতে পরিবর্তন করার শর্টকাটটি পরিবর্তিত হয়েছে। <ph name="OLD_SHORTCUT" /> এর পরিবর্তে দয়া করে <ph name="NEW_SHORTCUT" /> ব্যবহার করুন।</translation> <translation id="112308213915226829">তাককে স্বয়ংক্রিয়ভাবে লুকান</translation> <translation id="1127238861555034875">বিবর্ধক কাচ মোড</translation> <translation id="1195412055398077112">ওভারস্ক্যান</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046"><ph name="DISPLAY_NAME" /> তে প্রতিবিম্বিত হচ্ছে</translation> <translation id="1919743966458266018">কার্য পরিচালক খোলার শর্টকাটটি পরিবর্তিত হয়েছে। <ph name="OLD_SHORTCUT" /> এর পরিবর্তে দয়া করে <ph name="NEW_SHORTCUT" /> ব্যবহার করুন।</translation> <translation id="1923539912171292317">স্বয়ংক্রিয় ক্লিকগুলি</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">০°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">নিম্ন শক্তির চার্জার</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">আরো জানুন...</translation> <translation id="4961318399572185831">স্ক্রীন কাস্ট করুন</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Google ড্রাইভ সেটিংস ...</translation> <translation id="510924152490034944">সংযোগ নিরীক্ষণ করা হতে পারে</translation> <translation id="5168181903108465623">কাস্ট ডিভাইসগুলি উপলব্ধ</translation>
diff --git a/ash/common/strings/ash_strings_ca.xtb b/ash/common/strings/ash_strings_ca.xtb index 9174d2071..8093668c 100644 --- a/ash/common/strings/ash_strings_ca.xtb +++ b/ash/common/strings/ash_strings_ca.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="ca"> <translation id="1012876632442809908">Dispositiu USB-C (port frontal)</translation> <translation id="1013923882670373915">El dispositiu Bluetooth "<ph name="DEVICE_NAME" />" sol·licita permís per emparellar-se. Introduïu aquest codi PIN al dispositiu: <ph name="PINCODE" />.</translation> -<translation id="1021311941847921177">La drecera per canviar al mètode d'introducció següent ha canviat. Utilitzeu <ph name="NEW_SHORTCUT" /> en lloc de la drecera <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Amaga el prestatge automàticament</translation> <translation id="1127238861555034875">Mode de lupa</translation> <translation id="1195412055398077112">ajusta la mida</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">S'està replicant <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">La drecera per obrir el gestor de tasques ha canviat. Utilitzeu <ph name="NEW_SHORTCUT" /> en lloc de la drecera <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Clics automàtics</translation> -<translation id="1938872420421548906">Maj + Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Carregador de baix consum</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Més informació...</translation> <translation id="4961318399572185831">Emet la pantalla</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl + Maj + Espai</translation> <translation id="5045002648206642691">Configuració de Google Drive...</translation> <translation id="510924152490034944">És possible que la connexió estigui supervisada</translation> <translation id="5168181903108465623">Dispositius d'emissió disponibles</translation>
diff --git a/ash/common/strings/ash_strings_cs.xtb b/ash/common/strings/ash_strings_cs.xtb index 0351a230..cbd3b03 100644 --- a/ash/common/strings/ash_strings_cs.xtb +++ b/ash/common/strings/ash_strings_cs.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="cs"> <translation id="1012876632442809908">Zařízení USB Type-C (přední port)</translation> <translation id="1013923882670373915">Zařízení Bluetooth „<ph name="DEVICE_NAME" />“ žádá o povolení ke spárování. Zadejte prosím v zařízení tento kód PIN: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Zkratka přepnutí na další metodu zadávání se změnila. Namísto zkratky <ph name="OLD_SHORTCUT" /> používejte zkratku <ph name="NEW_SHORTCUT" />.</translation> <translation id="112308213915226829">Automaticky skrývat poličku</translation> <translation id="1127238861555034875">Režim lupy</translation> <translation id="1195412055398077112">přesah obrazu</translation> @@ -37,7 +36,6 @@ <translation id="1882897271359938046">Zrcadlení na displej <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Zkratka k otevření správce úloh se změnila. Namísto zkratky <ph name="OLD_SHORTCUT" /> používejte zkratku <ph name="NEW_SHORTCUT" />.</translation> <translation id="1923539912171292317">Automatická kliknutí</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Nabíječka má příliš nízký výkon</translation> @@ -139,7 +137,6 @@ <translation id="4957722034734105353">Další informace...</translation> <translation id="4961318399572185831">Odesílání obrazovky</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Mezerník</translation> <translation id="5045002648206642691">Nastavení Disku Google...</translation> <translation id="510924152490034944">Připojení může být sledováno</translation> <translation id="5168181903108465623">Dostupná zařízení Cast</translation>
diff --git a/ash/common/strings/ash_strings_da.xtb b/ash/common/strings/ash_strings_da.xtb index d3ec74f..07c895d 100644 --- a/ash/common/strings/ash_strings_da.xtb +++ b/ash/common/strings/ash_strings_da.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="da"> <translation id="1012876632442809908">USB-C-enhed (port foran)</translation> <translation id="1013923882670373915">Bluetooth-enheden "<ph name="DEVICE_NAME" />" vil gerne have parringstilladelse. Indtast denne pinkode på den pågældende enhed: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Genvejen til at skifte til den næste indtastningsmetode er ændret. Brug <ph name="NEW_SHORTCUT" /> i stedet for <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Skjul hylde automatisk</translation> <translation id="1127238861555034875">Forstørrelsesglastilstand</translation> <translation id="1195412055398077112">overscan</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Spejler mod <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Genvejen til at åbne Jobliste er ændret. Brug <ph name="NEW_SHORTCUT" /> i stedet for <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Automatiske klik</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Oplader ved lav kraft</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Flere oplysninger...</translation> <translation id="4961318399572185831">Cast skærm</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+mellemrum</translation> <translation id="5045002648206642691">Google Drev-indstillinger...</translation> <translation id="510924152490034944">Forbindelsen kan være overvåget</translation> <translation id="5168181903108465623">Tilgængelige Cast-enheder</translation>
diff --git a/ash/common/strings/ash_strings_de.xtb b/ash/common/strings/ash_strings_de.xtb index d5bc173..a13fd07 100644 --- a/ash/common/strings/ash_strings_de.xtb +++ b/ash/common/strings/ash_strings_de.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="de"> <translation id="1012876632442809908">USB-C-Gerät (Port vorne)</translation> <translation id="1013923882670373915">Das Bluetooth-Gerät "<ph name="DEVICE_NAME" />" bittet um Erlaubnis für Kopplung. Geben Sie folgenden PIN-Code auf dem Gerät ein: <ph name="PINCODE" />.</translation> -<translation id="1021311941847921177">Die Tastenkombination für den Wechsel zur nächsten Eingabemethode hat sich geändert. Bitte drücken Sie <ph name="NEW_SHORTCUT" /> statt <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Ablage automatisch ausblenden</translation> <translation id="1127238861555034875">Lupenmodus</translation> <translation id="1195412055398077112">Overscan</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Wird auf <ph name="DISPLAY_NAME" /> gespiegelt...</translation> <translation id="1919743966458266018">Die Tastenkombination zum Öffnen des Task-Managers hat sich geändert. Bitte drücken Sie <ph name="NEW_SHORTCUT" /> statt <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Automatische Klicks</translation> -<translation id="1938872420421548906">Shift + Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Schwachstrom-Ladegerät</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Weitere Informationen...</translation> <translation id="4961318399572185831">Bildschirmübertragung</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Strg + Shift + Leer</translation> <translation id="5045002648206642691">Google Drive-Einstellungen...</translation> <translation id="510924152490034944">Die Verbindung wird möglicherweise kontrolliert</translation> <translation id="5168181903108465623">Übertragungsgeräte verfügbar</translation>
diff --git a/ash/common/strings/ash_strings_el.xtb b/ash/common/strings/ash_strings_el.xtb index decb7e2..1a1dc24 100644 --- a/ash/common/strings/ash_strings_el.xtb +++ b/ash/common/strings/ash_strings_el.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="el"> <translation id="1012876632442809908">Συσκευή USB-C (μπροστινή θύρα)</translation> <translation id="1013923882670373915">Η συσκευή Bluetooth "<ph name="DEVICE_NAME" />" ζητά δικαιώματα σύζευξης. Καταχωρίστε αυτόν τον κωδικό PIN στη συγκεκριμένη συσκευή: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Η συντόμευση για εναλλαγή στην επόμενη μέθοδο εισαγωγής άλλαξε. Χρησιμοποιήστε το <ph name="NEW_SHORTCUT" /> αντί για το <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Αυτόματη απόκρυψη ραφιού</translation> <translation id="1127238861555034875">Λειτουργία μεγεθυντικού φακού</translation> <translation id="1195412055398077112">υπερσάρωση</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Κατοπτρισμός σε <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Η συντόμευση για το άνοιγμα της Διαχείρισης Εργασιών άλλαξε. Χρησιμοποιήστε το <ph name="NEW_SHORTCUT" /> αντί για το <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Αυτόματα κλικ</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Χαμηλή ισχύς φορτιστή</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Μάθετε περισσότερα…</translation> <translation id="4961318399572185831">Μετάδοση οθόνης</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Ρυθμίσεις Google Drive...</translation> <translation id="510924152490034944">Η σύνδεση μπορεί να παρακολουθείται</translation> <translation id="5168181903108465623">Διαθέσιμες συσκευές μετάδοσης</translation>
diff --git a/ash/common/strings/ash_strings_en-GB.xtb b/ash/common/strings/ash_strings_en-GB.xtb index 9de25d1..28aca38a 100644 --- a/ash/common/strings/ash_strings_en-GB.xtb +++ b/ash/common/strings/ash_strings_en-GB.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="en-GB"> <translation id="1012876632442809908">USB-C device (front port)</translation> <translation id="1013923882670373915">Bluetooth device "<ph name="DEVICE_NAME" />" would like permission to pair. Please enter this PIN code on that device: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">The shortcut to switch to the next input method has changed. Please use <ph name="NEW_SHORTCUT" /> instead of <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Autohide shelf</translation> <translation id="1127238861555034875">Magnifying glass mode</translation> <translation id="1195412055398077112">overscan</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Mirroring to <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">The shortcut to open the task manager has changed. Please use <ph name="NEW_SHORTCUT" /> instead of <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Automatic clicks</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Low-power charger</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Learn more...</translation> <translation id="4961318399572185831">Cast screen</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Google Drive settings</translation> <translation id="510924152490034944">Connection may be monitored</translation> <translation id="5168181903108465623">Cast devices available</translation>
diff --git a/ash/common/strings/ash_strings_es-419.xtb b/ash/common/strings/ash_strings_es-419.xtb index a0e2c664..bae7853268 100644 --- a/ash/common/strings/ash_strings_es-419.xtb +++ b/ash/common/strings/ash_strings_es-419.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="es-419"> <translation id="1012876632442809908">Dispositivo USB-C (puerto delantero)</translation> <translation id="1013923882670373915">El dispositivo Bluetooth "<ph name="DEVICE_NAME" />" solicita permiso para sincronizarse. Ingresa el siguiente código de PIN en el dispositivo: <ph name="PINCODE" />.</translation> -<translation id="1021311941847921177">Se modificó el acceso directo para cambiar al siguiente método de entrada. Utiliza <ph name="NEW_SHORTCUT" /> en vez de <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Ocultar la biblioteca automáticamente</translation> <translation id="1127238861555034875">Modo de lupa</translation> <translation id="1195412055398077112">desajuste de dimensiones</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Copiando en <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Se modificó el acceso directo para abrir el administrador de tareas. Utiliza <ph name="NEW_SHORTCUT" /> en vez de <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Clics automáticos</translation> -<translation id="1938872420421548906">Mayúscula + Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Cargador de baja potencia</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Más información...</translation> <translation id="4961318399572185831">Transmitir pantalla</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl + mayúscula + espacio</translation> <translation id="5045002648206642691">Configuración de Google Drive...</translation> <translation id="510924152490034944">Es posible que la conexión sea supervisada</translation> <translation id="5168181903108465623">Dispositivos de transmisión disponibles</translation>
diff --git a/ash/common/strings/ash_strings_es.xtb b/ash/common/strings/ash_strings_es.xtb index 4f5159c..9a5a4952 100644 --- a/ash/common/strings/ash_strings_es.xtb +++ b/ash/common/strings/ash_strings_es.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="es"> <translation id="1012876632442809908">Dispositivo USB-C (puerto frontal)</translation> <translation id="1013923882670373915">El dispositivo Bluetooth "<ph name="DEVICE_NAME" />" solicita permiso para vincularse. Introduce el código PIN <ph name="PINCODE" /> en el dispositivo</translation> -<translation id="1021311941847921177">La combinación de teclas para cambiar al siguiente método de introducción ha cambiado. Utiliza <ph name="NEW_SHORTCUT" /> en lugar de <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Ocultar automáticamente estantería</translation> <translation id="1127238861555034875">Modo de lupa</translation> <translation id="1195412055398077112">reajustar</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Copiando en <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">La combinación de teclas para abrir el Administrador de tareas ha cambiado. Utiliza <ph name="NEW_SHORTCUT" /> en lugar de <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Clics automáticos</translation> -<translation id="1938872420421548906">Mayús+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Cargador de baja potencia</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Más información...</translation> <translation id="4961318399572185831">Enviar pantalla</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Mayús+Espacio</translation> <translation id="5045002648206642691">Configuración de Google Drive...</translation> <translation id="510924152490034944">Puede que la conexión esté supervisada</translation> <translation id="5168181903108465623">Dispositivos de transmisión disponibles</translation>
diff --git a/ash/common/strings/ash_strings_et.xtb b/ash/common/strings/ash_strings_et.xtb index 67a3868..5e39889 100644 --- a/ash/common/strings/ash_strings_et.xtb +++ b/ash/common/strings/ash_strings_et.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="et"> <translation id="1012876632442809908">C-tüüpi USB-seade (eesmine port)</translation> <translation id="1013923882670373915">Bluetoothi seade „<ph name="DEVICE_NAME" />” küsib luba sidumiseks. Sisestage seadmes järgmine PIN-kood: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Järgmise sisestusmeetodi aktiveerimise otseteed on muudetud. Kasutage vana otsetee <ph name="OLD_SHORTCUT" /> asemel uut otseteed <ph name="NEW_SHORTCUT" />.</translation> <translation id="112308213915226829">Riiuli automaatne peitmine</translation> <translation id="1127238861555034875">Suurendusklaasirežiim</translation> <translation id="1195412055398077112">liighälvitus</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Peegeldamine asukohta <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Tegumihalduri avamise otseteed on muudetud. Kasutage vana otsetee <ph name="OLD_SHORTCUT" /> asemel uut otseteed <ph name="NEW_SHORTCUT" />.</translation> <translation id="1923539912171292317">Automaatsed klikid</translation> -<translation id="1938872420421548906">Tõstuklahv + Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Väikese energiakuluga laadija</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Lisateave ...</translation> <translation id="4961318399572185831">Ekraani ülekandmine</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl + Tõstuklahv + Tühik</translation> <translation id="5045002648206642691">Google Drive'i seaded ...</translation> <translation id="510924152490034944">Ühendust võidakse jälgida</translation> <translation id="5168181903108465623">Ülekandeseadmed on saadaval</translation>
diff --git a/ash/common/strings/ash_strings_fa.xtb b/ash/common/strings/ash_strings_fa.xtb index 3edd30ab..3affae1a 100644 --- a/ash/common/strings/ash_strings_fa.xtb +++ b/ash/common/strings/ash_strings_fa.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="fa"> <translation id="1012876632442809908">دستگاه USB-C (درگاه جلو)</translation> <translation id="1013923882670373915">دستگاه بلوتوث «<ph name="DEVICE_NAME" />» برای مرتبطسازی به مجوز نیاز دارد. لطفاً این کد پین را در آن دستگاه وارد کنید: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">کلیدهای میانبر جابهجایی به روش ورودی بعدی تغییر کرده است. لطفاً از <ph name="NEW_SHORTCUT" /> به جای <ph name="OLD_SHORTCUT" /> استفاده کنید.</translation> <translation id="112308213915226829">پنهان کردن خودکار قفسه</translation> <translation id="1127238861555034875">حالت ذرهبین</translation> <translation id="1195412055398077112">بزرگتر از صفحه</translation> @@ -37,7 +36,6 @@ <translation id="1882897271359938046">بازتاب به <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">کلیدهای میانبر باز کردن مدیر فعالیتها تغییر کرده است. لطفاً از <ph name="NEW_SHORTCUT" /> به جای <ph name="OLD_SHORTCUT" /> استفاده کنید.</translation> <translation id="1923539912171292317">کلیکهای خودکار</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">۰ درجه</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">شارژر برق ضعیف</translation> @@ -140,7 +138,6 @@ <translation id="4957722034734105353">اطلاعات بیشتر...</translation> <translation id="4961318399572185831">فرستادن صفحه</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">تنظیمات Google Drive...</translation> <translation id="510924152490034944">اتصال ممکن است پایش شود</translation> <translation id="5168181903108465623">دستگاههای فرستادن موجود هستند</translation>
diff --git a/ash/common/strings/ash_strings_fi.xtb b/ash/common/strings/ash_strings_fi.xtb index aad3c04..fdc89f04 100644 --- a/ash/common/strings/ash_strings_fi.xtb +++ b/ash/common/strings/ash_strings_fi.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="fi"> <translation id="1012876632442809908">C-tyypin USB-laite (etuportti)</translation> <translation id="1013923882670373915">Bluetooth-laite <ph name="DEVICE_NAME" /> pyytää lupaa laiteparin muodostamiseen. Anna tämä PIN-koodi kyseisellä laitteella: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Seuraavaan syöttötapaan vaihtamisen pikanäppäin on muuttunut. Käytä uutta pikanäppäintä <ph name="NEW_SHORTCUT" /> vanhan (<ph name="OLD_SHORTCUT" />) sijaan.</translation> <translation id="112308213915226829">Piilota hylly automaattisesti</translation> <translation id="1127238861555034875">Suurennuslasitila</translation> <translation id="1195412055398077112">kuvasta rajataan pois osa</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Peilataan: <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Tehtävänhallinnan avaamisen pikanäppäin on muuttunut. Käytä uutta pikanäppäintä <ph name="NEW_SHORTCUT" /> vanhan (<ph name="OLD_SHORTCUT" />) sijaan.</translation> <translation id="1923539912171292317">Automaattiset klikkaukset</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Pienitehoinen laturi</translation> @@ -140,7 +138,6 @@ <translation id="4957722034734105353">Lisätietoja...</translation> <translation id="4961318399572185831">Suoratoista näyttö</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+välilyönti</translation> <translation id="5045002648206642691">Google Driven asetukset...</translation> <translation id="510924152490034944">Yhteyttä saatetaan valvoa</translation> <translation id="5168181903108465623">Cast-laitteita käytettävissä</translation>
diff --git a/ash/common/strings/ash_strings_fil.xtb b/ash/common/strings/ash_strings_fil.xtb index 7b4b3043..9110223 100644 --- a/ash/common/strings/ash_strings_fil.xtb +++ b/ash/common/strings/ash_strings_fil.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="fil"> <translation id="1012876632442809908">USB-C device (port sa harap)</translation> <translation id="1013923882670373915">Gusto ng bluetooth device na "<ph name="DEVICE_NAME" />" ng pahintulot na magpares. Pakilagay ang PIN na ito sa device na iyon: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Napalitan na ang shortcut para sa paglipat sa susunod na pamamaraan ng pag-input. Mangyaring gamitin ang <ph name="NEW_SHORTCUT" /> sa halip na gamitin ang <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Awtomatikong itago ang shelf</translation> <translation id="1127238861555034875">Magnifying glass mode</translation> <translation id="1195412055398077112">overscan</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Nagmi-mirror sa <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Napalitan na ang shortcut para sa pagbubukas sa task manager. Mangyaring gamitin ang <ph name="NEW_SHORTCUT" /> sa halip na gamitin ang <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Mga awtomatikong pag-click</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Low-power charger</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Matuto nang higit pa...</translation> <translation id="4961318399572185831">I-cast ang screen</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Mga setting ng Google Drive ...</translation> <translation id="510924152490034944">Maaaring sinusubaybayan ang koneksyon</translation> <translation id="5168181903108465623">I-cast ang mga available na device</translation>
diff --git a/ash/common/strings/ash_strings_fr.xtb b/ash/common/strings/ash_strings_fr.xtb index 8f4d1150..4be9013 100644 --- a/ash/common/strings/ash_strings_fr.xtb +++ b/ash/common/strings/ash_strings_fr.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="fr"> <translation id="1012876632442809908">Appareil USB de type C (port situé sur l'avant de l'appareil)</translation> <translation id="1013923882670373915">L'appareil Bluetooth "<ph name="DEVICE_NAME" />" demande l'autorisation de s'associer. Veuillez saisir le code suivant sur l'appareil : <ph name="PINCODE" />.</translation> -<translation id="1021311941847921177">Le raccourci permettant de passer au mode de saisie suivant a été modifié. Utilisez "<ph name="NEW_SHORTCUT" />" au lieu de "<ph name="OLD_SHORTCUT" />".</translation> <translation id="112308213915226829">Masquer automatiquement l'étagère</translation> <translation id="1127238861555034875">Mode loupe</translation> <translation id="1195412055398077112">Surbalayage</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Mise en miroir pour <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Le raccourci permettant d'ouvrir le gestionnaire de tâches a été modifié. Utilisez "<ph name="NEW_SHORTCUT" />" au lieu de "<ph name="OLD_SHORTCUT" />".</translation> <translation id="1923539912171292317">Clics automatiques</translation> -<translation id="1938872420421548906">Maj+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Chargeur de faible puissance</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">En savoir plus…</translation> <translation id="4961318399572185831">Diffuser l'écran</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Maj+Espace</translation> <translation id="5045002648206642691">Paramètres Google Drive…</translation> <translation id="510924152490034944">La connexion peut faire l'objet d'une surveillance</translation> <translation id="5168181903108465623">Appareils Cast disponibles</translation>
diff --git a/ash/common/strings/ash_strings_gu.xtb b/ash/common/strings/ash_strings_gu.xtb index 4096feb..4fd47da 100644 --- a/ash/common/strings/ash_strings_gu.xtb +++ b/ash/common/strings/ash_strings_gu.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="gu"> <translation id="1012876632442809908">USB-C ઉપકરણ (આગળનું પોર્ટ)</translation> <translation id="1013923882670373915">Bluetooth ઉપકરણ "<ph name="DEVICE_NAME" />" ને જોડી બનાવવા માટે પરવાનગી જોઈએ છે. કૃપા કરીને તે ઉપકરણ પર આ PIN કોડ દાખલ કરો: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">આગલી ઇનપુટ પદ્ધતિ પર સ્વિચ કરવા માટેની પદ્ધતિ બદલી છે. કૃપા કરીને <ph name="NEW_SHORTCUT" /> ની બદલે <ph name="OLD_SHORTCUT" /> નો ઉપયોગ કરો.</translation> <translation id="112308213915226829">સ્વતઃછુપાવો શેલ્ફ</translation> <translation id="1127238861555034875">બૃહદદર્શક કાચ મોડ</translation> <translation id="1195412055398077112">ઓવરસ્કૅન</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046"><ph name="DISPLAY_NAME" /> પર પ્રતિબિંબિત થઈ રહ્યું છે</translation> <translation id="1919743966458266018">ટાસ્ક સંચાલક ખોલવાનો શોર્ટકટ બદલાયો છે. કૃપા કરીને <ph name="NEW_SHORTCUT" /> ની બદલે <ph name="OLD_SHORTCUT" /> નો ઉપયોગ કરો.</translation> <translation id="1923539912171292317">આપમેળે ક્લિક્સ</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">નિમ્ન-પાવર ચાર્જર</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">વધુ જાણો...</translation> <translation id="4961318399572185831">સ્ક્રીનને કાસ્ટ કરો</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Google ડ્રાઇવ સેટિંગ્સ...</translation> <translation id="510924152490034944">કનેક્શનનું નિરીક્ષણ કરવામાં આવી શકે છે</translation> <translation id="5168181903108465623">Cast ઉપકરણો ઉપલબ્ધ</translation>
diff --git a/ash/common/strings/ash_strings_hi.xtb b/ash/common/strings/ash_strings_hi.xtb index b3088cf..02ddd247 100644 --- a/ash/common/strings/ash_strings_hi.xtb +++ b/ash/common/strings/ash_strings_hi.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="hi"> <translation id="1012876632442809908">USB-C डिवाइस (सामने वाला पोर्ट)</translation> <translation id="1013923882670373915">ब्लूटूथ डिवाइस "<ph name="DEVICE_NAME" />" युग्मित करने की अनुमति चाहता है. कृपया उस डिवाइस पर यह पिन कोड डालें: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">अगली इनपुट विधि में स्विच करने का शॉर्टकट बदल गया है. कृपया <ph name="OLD_SHORTCUT" /> के बजाय <ph name="NEW_SHORTCUT" /> का उपयोग करें.</translation> <translation id="112308213915226829">अलमारी को स्वत: छिपाएं</translation> <translation id="1127238861555034875">आवर्धक ग्लास मोड</translation> <translation id="1195412055398077112">ओवरस्कैन</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046"><ph name="DISPLAY_NAME" /> पर मिरर कर रहा है</translation> <translation id="1919743966458266018">काम के प्रबंधक को खोलने का शॉर्टकट बदल गया है. कृपया <ph name="OLD_SHORTCUT" /> के बजाय <ph name="NEW_SHORTCUT" /> का उपयोग करें.</translation> <translation id="1923539912171292317">स्वत: क्लिक</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">कम-शक्ति वाला चार्जर</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">अधिक जानें...</translation> <translation id="4961318399572185831">स्क्रीन कास्ट करें</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Google डिस्क सेटिंग...</translation> <translation id="510924152490034944">कनेक्शन पर नज़र रखी जा सकती है</translation> <translation id="5168181903108465623">कास्ट डिवाइस उपलब्ध हैं</translation>
diff --git a/ash/common/strings/ash_strings_hr.xtb b/ash/common/strings/ash_strings_hr.xtb index 451615a4..ceca0dc 100644 --- a/ash/common/strings/ash_strings_hr.xtb +++ b/ash/common/strings/ash_strings_hr.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="hr"> <translation id="1012876632442809908">USB-C uređaj (prednji priključak)</translation> <translation id="1013923882670373915">Bluetooth uređaj "<ph name="DEVICE_NAME" />" traži dopuštenje za uparivanje. Unesite ovaj PIN na tom uređaju: <ph name="PINCODE" />.</translation> -<translation id="1021311941847921177">Promijenio se prečac za prelazak na sljedeći način unosa. Upotrijebite <ph name="NEW_SHORTCUT" /> umjesto <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Automatski sakrij policu</translation> <translation id="1127238861555034875">Način povećala</translation> <translation id="1195412055398077112">rubno područje zaslona</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Zrcaljenje na zaslon <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Promijenio se prečac za otvaranje upravitelja zadataka. Upotrijebite <ph name="NEW_SHORTCUT" /> umjesto <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Automatski klikovi</translation> -<translation id="1938872420421548906">Shift + Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Punjač male snage</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Saznajte više...</translation> <translation id="4961318399572185831">Emitiranje zaslona</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl + Shift + razmak</translation> <translation id="5045002648206642691">Postavke Google diska...</translation> <translation id="510924152490034944">Veza se možda nadzire</translation> <translation id="5168181903108465623">Dostupni su uređaji za emitiranje</translation>
diff --git a/ash/common/strings/ash_strings_hu.xtb b/ash/common/strings/ash_strings_hu.xtb index 7638677..ea1700e 100644 --- a/ash/common/strings/ash_strings_hu.xtb +++ b/ash/common/strings/ash_strings_hu.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="hu"> <translation id="1012876632442809908">C típusú USB-vel kompatibilis eszköz (elülső port)</translation> <translation id="1013923882670373915">A(z) „<ph name="DEVICE_NAME" />” Bluetooth-eszköz engedélyt kér a párosításra. Kérjük, adja meg ezt a PIN kódot azon az eszközön: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Megváltozott a következő beviteli módszerre váltás billentyűkódja. A <ph name="OLD_SHORTCUT" /> helyett használja a következőt: <ph name="NEW_SHORTCUT" />.</translation> <translation id="112308213915226829">Polc automatikus elrejtése</translation> <translation id="1127238861555034875">Nagyító mód</translation> <translation id="1195412055398077112">túlpásztázás</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Tükrözés: <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Megváltozott a feladatkezelő megnyitásának billentyűkódja. A <ph name="OLD_SHORTCUT" /> helyett használja a következőt: <ph name="NEW_SHORTCUT" />.</translation> <translation id="1923539912171292317">Automatikus kattintások</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Kis teljesítményű töltő</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">További információ...</translation> <translation id="4961318399572185831">Képernyő átküldése</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">A Google Drive beállításai...</translation> <translation id="510924152490034944">Előfordulhat, hogy a kapcsolatot megfigyelik.</translation> <translation id="5168181903108465623">Cast-eszközök állnak rendelkezésre</translation>
diff --git a/ash/common/strings/ash_strings_id.xtb b/ash/common/strings/ash_strings_id.xtb index 62ca310e..44421021 100644 --- a/ash/common/strings/ash_strings_id.xtb +++ b/ash/common/strings/ash_strings_id.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="id"> <translation id="1012876632442809908">Perangkat USB-C (port depan)</translation> <translation id="1013923882670373915">Perangkat Bluetooth "<ph name="DEVICE_NAME" />" meminta izin untuk bersanding. Masukan kode PIN ini pada perangkat tersebut: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Pintasan untuk beralih ke metode masukan berikutnya telah berubah. Gunakan <ph name="NEW_SHORTCUT" /> sebagai ganti <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Sembunyikan otomatis rak</translation> <translation id="1127238861555034875">Mode kaca pembesar</translation> <translation id="1195412055398077112">pemindaian berlebih</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Mencerminkan ke <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Pintasan untuk membuka pengelola tugas telah berubah. Gunakan <ph name="NEW_SHORTCUT" /> sebagai ganti <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Klik otomatis</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Pengisi daya rendah</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Pelajari selengkapnya...</translation> <translation id="4961318399572185831">Transmisikan layar</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Spasi</translation> <translation id="5045002648206642691">Setelan Google Drive...</translation> <translation id="510924152490034944">Sambungan mungkin dipantau</translation> <translation id="5168181903108465623">Perangkat transmisi tersedia</translation>
diff --git a/ash/common/strings/ash_strings_it.xtb b/ash/common/strings/ash_strings_it.xtb index 6334a9e..9491adfa 100644 --- a/ash/common/strings/ash_strings_it.xtb +++ b/ash/common/strings/ash_strings_it.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="it"> <translation id="1012876632442809908">Dispositivo USB-C (porta anteriore)</translation> <translation id="1013923882670373915">Il dispositivo Bluetooth "<ph name="DEVICE_NAME" />" chiede l'autorizzazione per essere accoppiato. Inserisci questo codice PIN sul dispositivo: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">La scorciatoia per passare al metodo di immissione successivo è cambiata. Utilizza <ph name="NEW_SHORTCUT" /> invece di <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Nascondi automaticamente shelf</translation> <translation id="1127238861555034875">Modalità lente d'ingrandimento</translation> <translation id="1195412055398077112">overscan</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Mirroring su <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">La scorciatoia per aprire Task Manager è cambiata. Utilizza <ph name="NEW_SHORTCUT" /> invece di <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Clic automatici</translation> -<translation id="1938872420421548906">MAIUSC+ALT</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Caricabatterie a basso consumo</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Ulteriori informazioni...</translation> <translation id="4961318399572185831">Trasmetti schermo</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">CTRL+MAIUSC+Barra spaziatrice</translation> <translation id="5045002648206642691">Impostazioni Google Drive...</translation> <translation id="510924152490034944">La connessione potrebbe essere monitorata</translation> <translation id="5168181903108465623">Dispositivi di trasmissione disponibili</translation>
diff --git a/ash/common/strings/ash_strings_iw.xtb b/ash/common/strings/ash_strings_iw.xtb index 486df4b8..fc463a81 100644 --- a/ash/common/strings/ash_strings_iw.xtb +++ b/ash/common/strings/ash_strings_iw.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="iw"> <translation id="1012876632442809908">מכשיר עם יציאת USB-C (יציאה קדמית)</translation> <translation id="1013923882670373915">מכשיר ה-Bluetooth "<ph name="DEVICE_NAME" />" מבקש הרשאה לבצע התאמה. הזן את קוד ה-PIN הבא במכשיר הזה: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">מקש הקיצור המשמש למעבר לשיטת הקלט הבאה השתנה. השתמש ב-<ph name="NEW_SHORTCUT" /> במקום ב-<ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">הסתרה אוטומטית של המדף</translation> <translation id="1127238861555034875">מצב זכוכית מגדלת</translation> <translation id="1195412055398077112">סריקת יתר</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">משקף אל <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">מקש הקיצור לפתיחת מנהל המשימות השתנה. השתמש ב-<ph name="NEW_SHORTCUT" /> במקום ב-<ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">לחיצות אוטומטיות</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">מטען בעל מתח נמוך</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">למידע נוסף...</translation> <translation id="4961318399572185831">העברת מסך</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+רווח</translation> <translation id="5045002648206642691">הגדרות Google Drive...</translation> <translation id="510924152490034944">ייתכן שהחיבור מנוטר</translation> <translation id="5168181903108465623">מכשירי העברה זמינים</translation>
diff --git a/ash/common/strings/ash_strings_ja.xtb b/ash/common/strings/ash_strings_ja.xtb index 41cbc235..5acd9a0 100644 --- a/ash/common/strings/ash_strings_ja.xtb +++ b/ash/common/strings/ash_strings_ja.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="ja"> <translation id="1012876632442809908">USB-C デバイス(前面のポート)</translation> <translation id="1013923882670373915">Bluetooth デバイス「<ph name="DEVICE_NAME" />」がペア設定の権限をリクエストしています。このデバイスに次の PIN コードを入力してください: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">次の入力方法に切り替えるショートカットが変わりました。<ph name="OLD_SHORTCUT" /> ではなく <ph name="NEW_SHORTCUT" /> をご使用ください。</translation> <translation id="112308213915226829">シェルフを自動的に隠す</translation> <translation id="1127238861555034875">虫メガネモード</translation> <translation id="1195412055398077112">オーバースキャン</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046"><ph name="DISPLAY_NAME" /> へミラーリング</translation> <translation id="1919743966458266018">タスク マネージャを起動するショートカットが変わりました。<ph name="OLD_SHORTCUT" /> ではなく <ph name="NEW_SHORTCUT" /> をご使用ください。</translation> <translation id="1923539912171292317">自動クリック</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" />(USB)</translation> <translation id="2127372758936585790">低電力の充電器</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">詳細...</translation> <translation id="4961318399572185831">画面をキャスト</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Google ドライブの設定...</translation> <translation id="510924152490034944">接続は監視される可能性があります</translation> <translation id="5168181903108465623">キャスト デバイスを利用できます</translation>
diff --git a/ash/common/strings/ash_strings_kn.xtb b/ash/common/strings/ash_strings_kn.xtb index 8d139f3..c2f892c 100644 --- a/ash/common/strings/ash_strings_kn.xtb +++ b/ash/common/strings/ash_strings_kn.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="kn"> <translation id="1012876632442809908">USB-C ಸಾಧನ (ಮುಂದಿನ ಪೋರ್ಟ್)</translation> <translation id="1013923882670373915">ಬ್ಲೂಟೂತ್ ಸಾಧನವು "<ph name="DEVICE_NAME" />" ಜೋಡಣೆಗಾಗಿ ಅನುಮತಿಯನ್ನು ಬಯಸುತ್ತದೆ. ದಯವಿಟ್ಟು ಆ ಸಾಧನದಲ್ಲಿ ಈ PIN ಕೋಡ್ ನಮೂದಿಸಿ: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">ಮುಂದಿನ ಇನ್ಪುಟ್ ವಿಧಾನಕ್ಕೆ ಬದಲಾಗುವ ಶಾರ್ಟ್ಕಟ್ ಬದಲಾಗಿದೆ. <ph name="OLD_SHORTCUT" /> ಬದಲಿಗೆ <ph name="NEW_SHORTCUT" /> ಬಳಸಿ.</translation> <translation id="112308213915226829">ಶೆಲ್ಫ್ ಅನ್ನು ಸ್ವಯಂಮರೆಮಾಡು</translation> <translation id="1127238861555034875">ವರ್ಧಕ ಮಸೂರ ಮೋಡ್</translation> <translation id="1195412055398077112">ಓವರ್ಸ್ಕ್ಯಾನ್</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046"><ph name="DISPLAY_NAME" /> ಗೆ ಪ್ರತಿಬಿಂಬಿಸುತ್ತಿದೆ</translation> <translation id="1919743966458266018">ಕಾರ್ಯ ನಿರ್ವಾಹಕರನ್ನು ತೆರೆಯಲು ಶಾರ್ಟ್ಕಟ್ ಬದಲಾಗಿದೆ. ದಯವಿಟ್ಟು <ph name="OLD_SHORTCUT" /> ಬದಲಿಗೆ <ph name="NEW_SHORTCUT" /> ಬಳಸಿ.</translation> <translation id="1923539912171292317">ಸ್ವಯಂಚಾಲಿತ ಕ್ಲಿಕ್ಗಳು</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">ಕಡಿಮೆ ವಿದ್ಯುತ್ ಚಾರ್ಜರ್</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">ಇನ್ನಷ್ಟು ತಿಳಿದುಕೊಳ್ಳಿ...</translation> <translation id="4961318399572185831">ಪರದೆಯನ್ನು ಬಿತ್ತರಿಸಿ</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Google ಡ್ರೈವ್ ಸೆಟ್ಟಿಂಗ್ಗಳು...</translation> <translation id="510924152490034944">ಸಂಪರ್ಕದ ಮೇಲೆ ನಿಗಾ ಇರಿಸಬಹುದು</translation> <translation id="5168181903108465623">ಬಿತ್ತರಿಸುವಿಕೆಯ ಸಾಧನಗಳು ಲಭ್ಯವಿದೆ</translation>
diff --git a/ash/common/strings/ash_strings_ko.xtb b/ash/common/strings/ash_strings_ko.xtb index 375818b..d29a63a 100644 --- a/ash/common/strings/ash_strings_ko.xtb +++ b/ash/common/strings/ash_strings_ko.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="ko"> <translation id="1012876632442809908">USB-C 기기(전면 포트)</translation> <translation id="1013923882670373915">블루투스 기기 '<ph name="DEVICE_NAME" />'에서 페어링 허가를 요청합니다. 기기에서 다음 PIN 코드를 입력하세요. <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">다음 입력 방법으로 전환하는 단축키가 변경되었습니다. <ph name="OLD_SHORTCUT" /> 대신 <ph name="NEW_SHORTCUT" />을(를) 사용하세요.</translation> <translation id="112308213915226829">실행기 자동 숨김</translation> <translation id="1127238861555034875">돋보기 모드</translation> <translation id="1195412055398077112">오버스캔</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046"><ph name="DISPLAY_NAME" />에 미러링</translation> <translation id="1919743966458266018">작업 관리자를 여는 단축키가 변경되었습니다. <ph name="OLD_SHORTCUT" /> 대신 <ph name="NEW_SHORTCUT" />을(를) 사용하세요.</translation> <translation id="1923539912171292317">자동 클릭</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" />(USB)</translation> <translation id="2127372758936585790">저출력 충전기</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">자세히 알아보기...</translation> <translation id="4961318399572185831">화면 전송</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+스페이스바</translation> <translation id="5045002648206642691">Google 문서함 설정...</translation> <translation id="510924152490034944">연결이 모니터링될 수 있음</translation> <translation id="5168181903108465623">전송 기기를 사용할 수 있음</translation>
diff --git a/ash/common/strings/ash_strings_lt.xtb b/ash/common/strings/ash_strings_lt.xtb index 5d2ee55..2ab36d0 100644 --- a/ash/common/strings/ash_strings_lt.xtb +++ b/ash/common/strings/ash_strings_lt.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="lt"> <translation id="1012876632442809908">USB-C įrenginys (prievadas priekyje)</translation> <translation id="1013923882670373915">„Bluetooth“ įrenginys „<ph name="DEVICE_NAME" />“ prašo leidimo susieti. Šiame įrenginyje įveskite šį PIN kodą: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Pakeistas perjungimo į kitą įvesties metodą spartusis klavišas. Naudokite <ph name="NEW_SHORTCUT" /> vietoje <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Automatiškai slėpti lentyną</translation> <translation id="1127238861555034875">Didinamojo stiklo režimas</translation> <translation id="1195412055398077112">sritis aplink vaizdo kraštus</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Dubliuojama <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Pakeistas užduočių tvarkytuvės atidarymo spartusis klavišas. Naudokite <ph name="NEW_SHORTCUT" /> vietoje <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Automatiniai paspaudimai</translation> -<translation id="1938872420421548906">„Shift“ + „Alt“</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Mažos galios įkroviklis</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Sužinokite daugiau...</translation> <translation id="4961318399572185831">Perduoti ekraną</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">„Ctrl“ + „Shift“ + tarpo klavišas</translation> <translation id="5045002648206642691">„Google“ disko nustatymai...</translation> <translation id="510924152490034944">Ryšys gali būti stebimas</translation> <translation id="5168181903108465623">Pasiekiami perdavimo įrenginiai</translation>
diff --git a/ash/common/strings/ash_strings_lv.xtb b/ash/common/strings/ash_strings_lv.xtb index 5fa1b5d..058d457 100644 --- a/ash/common/strings/ash_strings_lv.xtb +++ b/ash/common/strings/ash_strings_lv.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="lv"> <translation id="1012876632442809908">USB-C ierīce (priekšējā pieslēgvieta)</translation> <translation id="1013923882670373915">Bluetooth ierīce “<ph name="DEVICE_NAME" />” vēlas saņemt atļauju, lai izveidotu savienojumu pārī. Lūdzu, ierīcē ievadiet šo PIN: <ph name="PINCODE" />.</translation> -<translation id="1021311941847921177">Tika mainīti īsinājumtaustiņi, ar kuriem var pāriet pie nākamās ievades metodes. Lūdzu, turpmāk izmantojiet <ph name="NEW_SHORTCUT" />, nevis <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Automātiski slēpt plauktu</translation> <translation id="1127238861555034875">Lupas režīms</translation> <translation id="1195412055398077112">attēla izvērse</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Spoguļo šeit: <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Tika mainīti īsinājumtaustiņi, ar kuriem var atvērt uzdevumu pārvaldnieku. Lūdzu, turpmāk izmantojiet <ph name="NEW_SHORTCUT" />, nevis <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Automātiskie klikšķi</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Lādētājs ar mazu strāvas padevi</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Uzzināt vairāk...</translation> <translation id="4961318399572185831">Ekrāna apraide</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Google diska iestatījumi...</translation> <translation id="510924152490034944">Savienojums var tikt uzraudzīts.</translation> <translation id="5168181903108465623">Pieejamas apraides ierīces</translation>
diff --git a/ash/common/strings/ash_strings_ml.xtb b/ash/common/strings/ash_strings_ml.xtb index 51ca9d66..6af55f13 100644 --- a/ash/common/strings/ash_strings_ml.xtb +++ b/ash/common/strings/ash_strings_ml.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="ml"> <translation id="1012876632442809908">USB-C ഉപകരണം (മുൻവശത്തെ പോർട്ട്)</translation> <translation id="1013923882670373915">"<ph name="DEVICE_NAME" />" എന്ന Bluetooth ഉപകരണം ജോടിയാക്കുന്നതിനുള്ള അനുമതി ആവശ്യപ്പെടുന്നു. ആ ഉപകരണത്തിൽ ഈ പിൻ കോഡ് നൽകുക: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">അടുത്ത ഇൻപുട്ട് രീതിയിലേക്ക് മാറാനുള്ള കുറുക്കുവഴി മാറ്റി. <ph name="OLD_SHORTCUT" /> എന്നതിന് പകരം <ph name="NEW_SHORTCUT" /> ഉപയോഗിക്കുക.</translation> <translation id="112308213915226829">ഷെൽഫ് സ്വയമേവ മറയ്ക്കുക</translation> <translation id="1127238861555034875">മാഗ്നിഫൈയിംഗ് ഗ്ലാസ് മോഡ്</translation> <translation id="1195412055398077112">ഓവർസ്കാൻ</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046"><ph name="DISPLAY_NAME" /> എന്നതിലേക്ക് മിറർചെയ്യുന്നു</translation> <translation id="1919743966458266018">ടാസ്ക് മാനേജർ തുറക്കാനുള്ള കുറുക്കുവഴി മാറ്റി. <ph name="OLD_SHORTCUT" /> എന്നതിന് പകരം <ph name="NEW_SHORTCUT" /> ഉപയോഗിക്കുക.</translation> <translation id="1923539912171292317">യാന്ത്രിക ക്ലിക്കുകൾ</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">കുറഞ്ഞ തോതിൽ വൈദ്യുതി പ്രവഹിക്കുന്ന ചാർജർ</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">കൂടുതലറിയുക...</translation> <translation id="4961318399572185831">സ്ക്രീൻ കാസ്റ്റുചെയ്യുക</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Google ഡ്രൈവ് ക്രമീകരണങ്ങൾ...</translation> <translation id="510924152490034944">കണക്ഷൻ നിരീക്ഷിക്കപ്പെടാം</translation> <translation id="5168181903108465623">Cast ഉപകരണങ്ങൾ ലഭ്യമാണ്.</translation> @@ -211,7 +208,7 @@ <translation id="6911468394164995108">മറ്റുള്ളവ ചേർക്കുക...</translation> <translation id="6915678159055240887">Chromebox</translation> <translation id="6979158407327259162">Google ഡ്രൈവ്</translation> -<translation id="6981982820502123353">പ്രവേശനക്ഷമത</translation> +<translation id="6981982820502123353">ഉപയോഗസഹായി</translation> <translation id="7029814467594812963">സെഷനിൽ നിന്ന് പുറത്തുകടക്കുക</translation> <translation id="703171847531699602">കാസ്റ്റ് ഉപകരണങ്ങളൊന്നും ഇല്ല</translation> <translation id="7034339000180558234"><ph name="RECEIVER_NAME" /> എന്നതിലേക്ക് <ph name="TAB_NAME" /> കാസ്റ്റുചെയ്യുന്നു</translation>
diff --git a/ash/common/strings/ash_strings_mr.xtb b/ash/common/strings/ash_strings_mr.xtb index 18bceab..10a40f4 100644 --- a/ash/common/strings/ash_strings_mr.xtb +++ b/ash/common/strings/ash_strings_mr.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="mr"> <translation id="1012876632442809908">USB-C डिव्हाइस (पुढील बाजूचे पोर्ट)</translation> <translation id="1013923882670373915">"<ph name="DEVICE_NAME" />" Bluetooth डिव्हाइस जोडण्यासाठी परवानगी घेऊ इच्छिते. कृपया त्या डिव्हाइसवर हा पिन प्रविष्ट करा: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">पुढील इनपुट पद्धतीवर स्विच करण्याचा शॉर्टकट बदलला आहे. कृपया <ph name="OLD_SHORTCUT" /> ऐवजी <ph name="NEW_SHORTCUT" /> वापरा.</translation> <translation id="112308213915226829">शेल्फ स्वयं लपवा</translation> <translation id="1127238861555034875">भिंगकाच मोड</translation> <translation id="1195412055398077112">ओव्हरस्कॅन</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046"><ph name="DISPLAY_NAME" /> वर मिरर करत आहे</translation> <translation id="1919743966458266018">कार्य व्यवस्थापक उघडण्याचा शॉर्टकट बदलला आहे. कृपया <ph name="OLD_SHORTCUT" /> ऐवजी <ph name="NEW_SHORTCUT" /> वापरा.</translation> <translation id="1923539912171292317">स्वयंचलित क्लिक</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">निम्न-उर्जेचे चार्जर</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">अधिक जाणून घ्या...</translation> <translation id="4961318399572185831">स्क्रीन कास्ट करा</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Google ड्राइव्ह सेटिंग्ज...</translation> <translation id="510924152490034944">कनेक्शन नियंत्रित केले जाऊ शकते</translation> <translation id="5168181903108465623">कास्ट डिव्हाइसेस उपलब्ध</translation>
diff --git a/ash/common/strings/ash_strings_ms.xtb b/ash/common/strings/ash_strings_ms.xtb index a39e10ce..54ac2cb4 100644 --- a/ash/common/strings/ash_strings_ms.xtb +++ b/ash/common/strings/ash_strings_ms.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="ms"> <translation id="1012876632442809908">Peranti USB-C (port depan)</translation> <translation id="1013923882670373915">Peranti Bluetooth "<ph name="DEVICE_NAME" />" ingin kebenaran untuk berpasangan. Sila masukkan kod PIN ini pada peranti tersebut: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Pintasan untuk bertukar kepada kaedah masukan seterusnya telah berubah. Sila gunakan <ph name="NEW_SHORTCUT" /> dan bukannya <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Autosembunyi rak</translation> <translation id="1127238861555034875">Mod kanta pembesar</translation> <translation id="1195412055398077112">imbas lampau</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Mencerminkan <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Pintasan untuk membuka pengurus tugas telah berubah. Sila gunakan <ph name="NEW_SHORTCUT" /> dan bukannya <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Klik automatik</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Pengecas berkuasa rendah</translation> @@ -140,7 +138,6 @@ <translation id="4957722034734105353">Ketahui lebih lanjut...</translation> <translation id="4961318399572185831">Hantar skrin</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Tetapan Google Drive</translation> <translation id="510924152490034944">Sambungan mungkin dipantau</translation> <translation id="5168181903108465623">Peranti Cast tersedia</translation>
diff --git a/ash/common/strings/ash_strings_nl.xtb b/ash/common/strings/ash_strings_nl.xtb index 2b0cecf..eb6919a6 100644 --- a/ash/common/strings/ash_strings_nl.xtb +++ b/ash/common/strings/ash_strings_nl.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="nl"> <translation id="1012876632442809908">USB-C-apparaat (poort aan voorkant)</translation> <translation id="1013923882670373915">Bluetooth-apparaat '<ph name="DEVICE_NAME" />' wil toestemming om te koppelen. Voer de volgende pincode in op dat apparaat: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">De sneltoets om naar de volgende invoermethode te schakelen is gewijzigd. Gebruik <ph name="NEW_SHORTCUT" /> in plaats van <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Plank automatisch verbergen</translation> <translation id="1127238861555034875">Vergrootglasmodus</translation> <translation id="1195412055398077112">overscan</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Spiegelen naar <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">De sneltoets om Taakbeheer te openen is gewijzigd. Gebruik <ph name="NEW_SHORTCUT" /> in plaats van <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Automatische klikken</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Laag-vermogen-lader</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Meer informatie...</translation> <translation id="4961318399572185831">Scherm casten</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+spatie</translation> <translation id="5045002648206642691">Instellingen voor Google Drive...</translation> <translation id="510924152490034944">Verbinding wordt mogelijk gecontroleerd</translation> <translation id="5168181903108465623">Cast-apparaten beschikbaar</translation>
diff --git a/ash/common/strings/ash_strings_no.xtb b/ash/common/strings/ash_strings_no.xtb index 37186ff..749e181 100644 --- a/ash/common/strings/ash_strings_no.xtb +++ b/ash/common/strings/ash_strings_no.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="no"> <translation id="1012876632442809908">USB-C-enhet (porten foran)</translation> <translation id="1013923882670373915">Bluetooth-enheten «<ph name="DEVICE_NAME" />» ber om tillatelse til å koble til. Skriv inn denne PIN-koden på den aktuelle enheten: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Snarveien for å bytte til neste inndatametode er endret. Bruk <ph name="NEW_SHORTCUT" /> i stedet for <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Skjul hyllen automatisk</translation> <translation id="1127238861555034875">Forstørrelsesglassmodus</translation> <translation id="1195412055398077112">overscan</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Speiler <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Snarveien for å åpne oppgavebehandlingen er endret. Bruk <ph name="NEW_SHORTCUT" /> i stedet for <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Automatiske klikk</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Lading med lav effekt</translation> @@ -142,7 +140,6 @@ <translation id="4957722034734105353">Les mer</translation> <translation id="4961318399572185831">Cast skjermen</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Mellomrom</translation> <translation id="5045002648206642691">Innstillinger for Google Disk</translation> <translation id="510924152490034944">Tilkoblingen kan overvåkes</translation> <translation id="5168181903108465623">Cast-enheter er tilgjengelige</translation>
diff --git a/ash/common/strings/ash_strings_pl.xtb b/ash/common/strings/ash_strings_pl.xtb index f15d9ac..c77409c 100644 --- a/ash/common/strings/ash_strings_pl.xtb +++ b/ash/common/strings/ash_strings_pl.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="pl"> <translation id="1012876632442809908">Urządzenie USB-C (przedni port)</translation> <translation id="1013923882670373915">Urządzenie Bluetooth „<ph name="DEVICE_NAME" />” chce się sparować. Wpisz na nim ten kod PIN: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Zmieniliśmy skrót, który aktywuje następną metodę wprowadzania. Zamiast <ph name="OLD_SHORTCUT" /> używaj teraz <ph name="NEW_SHORTCUT" />.</translation> <translation id="112308213915226829">Autoukrywanie półki</translation> <translation id="1127238861555034875">Tryb lupy</translation> <translation id="1195412055398077112">nadmiarowość obrazu</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Kopia na <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Zmieniliśmy skrót, który otwiera menedżera zadań. Zamiast <ph name="OLD_SHORTCUT" /> używaj teraz <ph name="NEW_SHORTCUT" />.</translation> <translation id="1923539912171292317">Automatyczne kliknięcia</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Ładowarka o małej mocy</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Więcej informacji...</translation> <translation id="4961318399572185831">Przesyłanie ekranu</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Ustawienia Dysku Google...</translation> <translation id="510924152490034944">Połączenie może być monitorowane</translation> <translation id="5168181903108465623">Dostępne są urządzenia przesyłające</translation>
diff --git a/ash/common/strings/ash_strings_pt-BR.xtb b/ash/common/strings/ash_strings_pt-BR.xtb index 97380d7..274db9f 100644 --- a/ash/common/strings/ash_strings_pt-BR.xtb +++ b/ash/common/strings/ash_strings_pt-BR.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="pt-BR"> <translation id="1012876632442809908">Dispositivo USB-C (porta frontal)</translation> <translation id="1013923882670373915">O dispositivo Bluetooth "<ph name="DEVICE_NAME" />" deseja permissão para realizar o pareamento. Digite este código PIN no dispositivo: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">O atalho para alternar para o próximo método de entrada foi alterado. Use <ph name="NEW_SHORTCUT" /> em vez de <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Ocultar estante automaticamente</translation> <translation id="1127238861555034875">Modo de lupa</translation> <translation id="1195412055398077112">overscan</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Espelhamento de <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">O atalho para abrir o gerenciador de tarefas foi alterado. Use <ph name="NEW_SHORTCUT" /> em vez de <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Cliques automáticos</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Carregador de baixa potência</translation> @@ -140,7 +138,6 @@ <translation id="4957722034734105353">Saiba mais...</translation> <translation id="4961318399572185831">Transmitir tela</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Barra de espaço</translation> <translation id="5045002648206642691">Configurações do Google Drive...</translation> <translation id="510924152490034944">A conexão pode ser monitorada</translation> <translation id="5168181903108465623">Dispositivos de transmissão disponíveis</translation>
diff --git a/ash/common/strings/ash_strings_pt-PT.xtb b/ash/common/strings/ash_strings_pt-PT.xtb index 59a2126..b999036d 100644 --- a/ash/common/strings/ash_strings_pt-PT.xtb +++ b/ash/common/strings/ash_strings_pt-PT.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="pt-PT"> <translation id="1012876632442809908">Dispositivo USB-C (porta frontal)</translation> <translation id="1013923882670373915">O dispositivo Bluetooth "<ph name="DEVICE_NAME" />" necessita de autorização para sincronizar. Introduza este código PIN nesse dispositivo: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">O atalho para mudar para o método de introdução seguinte foi alterado. Utilize <ph name="NEW_SHORTCUT" /> em vez de <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Ocultar prateleira automaticamente</translation> <translation id="1127238861555034875">Modo de lupa</translation> <translation id="1195412055398077112">overscan</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">A espelhar para <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">O atalho para abrir o Gestor de tarefas foi alterado. Utilize <ph name="NEW_SHORTCUT" /> em vez de <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Cliques automáticos</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Carregador de baixo consumo</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Saiba mais...</translation> <translation id="4961318399572185831">Transmitir ecrã</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Espaço</translation> <translation id="5045002648206642691">Definições do Google Drive...</translation> <translation id="510924152490034944">A ligação pode ser monitorizada</translation> <translation id="5168181903108465623">Dispositivos de transmissão disponíveis</translation>
diff --git a/ash/common/strings/ash_strings_ro.xtb b/ash/common/strings/ash_strings_ro.xtb index ef5aa49f..62695d6 100644 --- a/ash/common/strings/ash_strings_ro.xtb +++ b/ash/common/strings/ash_strings_ro.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="ro"> <translation id="1012876632442809908">Dispozitiv USB-C (portul din față)</translation> <translation id="1013923882670373915">Dispozitivul Bluetooth „<ph name="DEVICE_NAME" />” solicită permisiunea de a se conecta. Introduceți acest cod PIN pe dispozitivul respectiv: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Comanda rapidă pentru a comuta la următoarea metodă de introducere a textului a fost modificată. Folosește <ph name="NEW_SHORTCUT" /> în loc de <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Ascundeți automat raftul</translation> <translation id="1127238861555034875">Modul lupă</translation> <translation id="1195412055398077112">suprascanare</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Se oglindește pe <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Comanda rapidă pentru a deschide managerul de activități a fost modificată. Folosește <ph name="NEW_SHORTCUT" /> în loc de <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Clicuri automate</translation> -<translation id="1938872420421548906">Shift + Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Încărcător de putere joasă</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Aflați mai multe...</translation> <translation id="4961318399572185831">Proiectează ecranul</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl + Shift + bara de spațiu</translation> <translation id="5045002648206642691">Setări Disc Google...</translation> <translation id="510924152490034944">Conexiunea poate fi monitorizată</translation> <translation id="5168181903108465623">Dispozitive de proiecție disponibile</translation>
diff --git a/ash/common/strings/ash_strings_ru.xtb b/ash/common/strings/ash_strings_ru.xtb index 50cd05c..9a3467f 100644 --- a/ash/common/strings/ash_strings_ru.xtb +++ b/ash/common/strings/ash_strings_ru.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="ru"> <translation id="1012876632442809908">Устройство USB-C (порт спереди)</translation> <translation id="1013923882670373915">Устройству <ph name="DEVICE_NAME" /> требуется разрешение на подключение через Bluetooth. Введите на нем PIN-код: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Изменились быстрые клавиши для перехода к другому способу ввода. Используйте <ph name="NEW_SHORTCUT" /> вместо <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Автоматически скрывать панель запуска</translation> <translation id="1127238861555034875">Режим лупы</translation> <translation id="1195412055398077112">Каемка экрана</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Дублирование экрана в <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Изменились быстрые клавиши для запуска диспетчера задач. Используйте <ph name="NEW_SHORTCUT" /> вместо <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Автоматическое нажатие</translation> -<translation id="1938872420421548906">Shift + Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Маломощное зарядное устройство</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Подробнее…</translation> <translation id="4961318399572185831">Трансляция экрана</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl + Shift + пробел</translation> <translation id="5045002648206642691">Настройки Диска Google…</translation> <translation id="510924152490034944">Соединение может отслеживаться</translation> <translation id="5168181903108465623">Доступны устройства для трансляции</translation>
diff --git a/ash/common/strings/ash_strings_sk.xtb b/ash/common/strings/ash_strings_sk.xtb index 7bf37d64..2276e1d 100644 --- a/ash/common/strings/ash_strings_sk.xtb +++ b/ash/common/strings/ash_strings_sk.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="sk"> <translation id="1012876632442809908">Zariadenie USB-C (port vpredu)</translation> <translation id="1013923882670373915">Zariadenie Bluetooth s názvom <ph name="DEVICE_NAME" /> žiada o povolenie párovania. Zadajte na danom zariadení toto číslo PIN: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Skratka prepnutia na ďalšiu metódu vstupu bola zmenená. Namiesto skratky <ph name="OLD_SHORTCUT" /> používajte kombináciu klávesov <ph name="NEW_SHORTCUT" />.</translation> <translation id="112308213915226829">Automatické skrývanie poličky</translation> <translation id="1127238861555034875">Režim lupy</translation> <translation id="1195412055398077112">presah obsahu</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Zrkadlenie na displej <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Skratka otvorenia správcu úloh bola zmenená. Namiesto skratky <ph name="OLD_SHORTCUT" /> používajte kombináciu klávesov <ph name="NEW_SHORTCUT" />.</translation> <translation id="1923539912171292317">Automatické kliknutia</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Nabíjačka s nízkym výkonom</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Viac informácií...</translation> <translation id="4961318399572185831">Prenášanie obrazovky</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Nastavenia služby Disk Google...</translation> <translation id="510924152490034944">Pripojenie môže byť monitorované</translation> <translation id="5168181903108465623">Dostupné zariadenia na prenos</translation>
diff --git a/ash/common/strings/ash_strings_sl.xtb b/ash/common/strings/ash_strings_sl.xtb index 04b2fbd..b35e84be 100644 --- a/ash/common/strings/ash_strings_sl.xtb +++ b/ash/common/strings/ash_strings_sl.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="sl"> <translation id="1012876632442809908">Naprava USB-C (sprednja vrata)</translation> <translation id="1013923882670373915">Naprava Bluetooth »<ph name="DEVICE_NAME" />« želi dovoljenje za seznanjanje. V napravi vnesite ta PIN: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Bližnjica za preklop na naslednji način vnosa je spremenjena. Uporabite <ph name="NEW_SHORTCUT" /> namesto <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Samodejno skrivanje police</translation> <translation id="1127238861555034875">Način povečevalnega stekla</translation> <translation id="1195412055398077112">upodabljanje čez rob zaslona</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Zrcaljenje na <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Bližnjica za odpiranje upravitelja opravil je spremenjena. Uporabite <ph name="NEW_SHORTCUT" /> namesto <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Samodejni kliki</translation> -<translation id="1938872420421548906">Shift + Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Nizkoenergijski polnilnik</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Več o tem ...</translation> <translation id="4961318399572185831">Predvajanje zaslona</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl + Shift + preslednica</translation> <translation id="5045002648206642691">Nastavitve za Google Drive ...</translation> <translation id="510924152490034944">Povezava je morda nadzorovana</translation> <translation id="5168181903108465623">Naprave za predvajanje so na voljo</translation>
diff --git a/ash/common/strings/ash_strings_sr.xtb b/ash/common/strings/ash_strings_sr.xtb index 9c337a9..bd8bce5 100644 --- a/ash/common/strings/ash_strings_sr.xtb +++ b/ash/common/strings/ash_strings_sr.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="sr"> <translation id="1012876632442809908">Уређај са USB прикључком типа C (предњи порт)</translation> <translation id="1013923882670373915">Bluetooth уређај „<ph name="DEVICE_NAME" />“ жели дозволу за упаривање. Унесите овај PIN кôд на том уређају: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Пречица за прелазак на следећи метод уноса је промењена. Користите <ph name="NEW_SHORTCUT" /> уместо <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Аутоматски сакриј полицу</translation> <translation id="1127238861555034875">Режим лупе</translation> <translation id="1195412055398077112">ивично подручје екрана</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Пресликавање у <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Пречица за отварање менаџера задатака је промењена. Користите <ph name="NEW_SHORTCUT" /> уместо <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Аутоматски кликови</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Пуњач мале снаге</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Сазнајте више...</translation> <translation id="4961318399572185831">Пребацивање екрана</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Подешавања Google диска...</translation> <translation id="510924152490034944">Веза се можда надгледа</translation> <translation id="5168181903108465623">Доступни су уређаји за пребацивање</translation>
diff --git a/ash/common/strings/ash_strings_sv.xtb b/ash/common/strings/ash_strings_sv.xtb index 950728a..0243a25f 100644 --- a/ash/common/strings/ash_strings_sv.xtb +++ b/ash/common/strings/ash_strings_sv.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="sv"> <translation id="1012876632442809908">USB-C-enhet (främre port)</translation> <translation id="1013923882670373915">Bluetooth-enheten <ph name="DEVICE_NAME" /> har begärt tillstånd för koppling. Ange den här pinkoden på den enheten: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Kortkommandot för att byta till nästa inmatningsmetod har ändrats. Använd <ph name="NEW_SHORTCUT" /> i stället för <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Dölj hyllan automatiskt</translation> <translation id="1127238861555034875">Läge för förstoringsglas</translation> <translation id="1195412055398077112">överskanning</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Spegling av <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Kortkommandot för att öppna aktivitetshanteraren har ändrats. Använd <ph name="NEW_SHORTCUT" /> i stället för <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Automatiska klick</translation> -<translation id="1938872420421548906">Skift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Laddning med låg effekt</translation> @@ -140,7 +138,6 @@ <translation id="4957722034734105353">Läs mer ...</translation> <translation id="4961318399572185831">Casta skärmen</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Skift+blanksteg</translation> <translation id="5045002648206642691">Inställningar för Google Drive ...</translation> <translation id="510924152490034944">Anslutningen kan vara övervakad</translation> <translation id="5168181903108465623">Överföringsenheter finns tillgängliga</translation>
diff --git a/ash/common/strings/ash_strings_sw.xtb b/ash/common/strings/ash_strings_sw.xtb index 8f5eac25..9aefcb4 100644 --- a/ash/common/strings/ash_strings_sw.xtb +++ b/ash/common/strings/ash_strings_sw.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="sw"> <translation id="1012876632442809908">Kifaa cha USB-C (mlango wa mbele)</translation> <translation id="1013923882670373915">Kifaa cha Bluetooth cha "<ph name="DEVICE_NAME" />" kinaomba idhini ya kuoanisha. Tafadhali weka msimbo huu wa PIN kwenye kifaa hicho: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Njia ya mkato ya kutumia mbinu ya kuingiza data inayofuata imebadilika. Tafadhali tumia <ph name="NEW_SHORTCUT" /> badala ya <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Ficha rafu kiotomatiki</translation> <translation id="1127238861555034875">Hali ya lenzi</translation> <translation id="1195412055398077112">angalia kwa ujumla:</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Inaakisi kwenye <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Njia ya mkato ya kufungua kidhibiti cha shughuli kwenye Chrome imebadilika. Tafadhali tumia <ph name="NEW_SHORTCUT" /> badala ya <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Mibofyo ya kiotomatiki</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Chaja ya nguvu ya chini</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Pata maelezo zaidi...</translation> <translation id="4961318399572185831">Tuma skrini</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Mipangilio ya Hifadhi ya Google...</translation> <translation id="510924152490034944">Huenda muunganisho utafuatiliwa</translation> <translation id="5168181903108465623">Vifaa vinavyorusha midia vinapatikana</translation>
diff --git a/ash/common/strings/ash_strings_ta.xtb b/ash/common/strings/ash_strings_ta.xtb index 65dd295c..cbb470e 100644 --- a/ash/common/strings/ash_strings_ta.xtb +++ b/ash/common/strings/ash_strings_ta.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="ta"> <translation id="1012876632442809908">USB-C சாதனம் (முன்பக்கப் போர்ட்)</translation> <translation id="1013923882670373915">புளூடூத் சாதனம் "<ph name="DEVICE_NAME" />", இணைப்பதற்கான அனுமதியை விரும்புகிறது. அந்தச் சாதனத்தில் இந்த PIN குறியீட்டை உள்ளிடவும்: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">அடுத்த உள்ளீட்டு முறைக்கு மாறுவதற்கான குறுக்குவழி மாற்றப்பட்டது. <ph name="OLD_SHORTCUT" /> க்குப் பதிலாக <ph name="NEW_SHORTCUT" /> ஐப் பயன்படுத்தவும்.</translation> <translation id="112308213915226829">அடுக்கைத் தானாக மறை</translation> <translation id="1127238861555034875">உருப்பெருக்கிப் பயன்முறை</translation> <translation id="1195412055398077112">ஓவர்ஸ்கேன்</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046"><ph name="DISPLAY_NAME" /> ஐப் பிரதிபலிக்கிறது</translation> <translation id="1919743966458266018">காரிய நிர்வாகியைத் திறப்பதற்கான குறுக்குவழி மாற்றப்பட்டது. <ph name="OLD_SHORTCUT" /> க்குப் பதிலாக <ph name="NEW_SHORTCUT" /> ஐப் பயன்படுத்தவும்.</translation> <translation id="1923539912171292317">தன்னியக்க கிளிக்குகள்</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">குறைந்த சக்திகொண்ட சார்ஜர்</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">மேலும் அறிக...</translation> <translation id="4961318399572185831">அனுப்புதல் திரை</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Google இயக்கக அமைப்புகள்...</translation> <translation id="510924152490034944">இணைப்பு கண்காணிக்கப்படலாம்</translation> <translation id="5168181903108465623">அனுப்பும் சாதனங்கள் உள்ளன</translation>
diff --git a/ash/common/strings/ash_strings_te.xtb b/ash/common/strings/ash_strings_te.xtb index bd24d2f..309700e4 100644 --- a/ash/common/strings/ash_strings_te.xtb +++ b/ash/common/strings/ash_strings_te.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="te"> <translation id="1012876632442809908">USB-C పరికరం (ముందువైపు పోర్ట్)</translation> <translation id="1013923882670373915">బ్లూటూత్ పరికరం "<ph name="DEVICE_NAME" />" జత కావడానికి అనుమతి కోరుతోంది. దయచేసి ఆ పరికరంలో ఈ PIN కోడ్ను నమోదు చేయండి: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">తదుపరి ఇన్పుట్ పద్ధతికి మార్చే సత్వరమార్గం మార్చబడింది. దయచేసి <ph name="OLD_SHORTCUT" />కి బదులుగా <ph name="NEW_SHORTCUT" />ని ఉపయోగించండి.</translation> <translation id="112308213915226829">అరను స్వయంచాలకంగా దాచు</translation> <translation id="1127238861555034875">భూతద్దం మోడ్</translation> <translation id="1195412055398077112">ఓవర్స్కాన్</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046"><ph name="DISPLAY_NAME" />కు దర్పణం చేస్తోంది</translation> <translation id="1919743966458266018">విధి నిర్వాహికిని తెరిచే సత్వరమార్గం మార్చబడింది. దయచేసి <ph name="OLD_SHORTCUT" />కి బదులుగా <ph name="NEW_SHORTCUT" />ని ఉపయోగించండి.</translation> <translation id="1923539912171292317">స్వయంచాలక క్లిక్లు</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">తక్కువ-పవర్ గల ఛార్జర్</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">మరింత తెలుసుకోండి...</translation> <translation id="4961318399572185831">స్క్రీన్ ప్రసారం చేయండి</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Google డిస్క్ సెట్టింగ్లు...</translation> <translation id="510924152490034944">కనెక్షన్ పర్యవేక్షించబడవచ్చు</translation> <translation id="5168181903108465623">Cast పరికరాలు అందుబాటులో ఉన్నాయి</translation>
diff --git a/ash/common/strings/ash_strings_th.xtb b/ash/common/strings/ash_strings_th.xtb index f7754aec..8a8a621 100644 --- a/ash/common/strings/ash_strings_th.xtb +++ b/ash/common/strings/ash_strings_th.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="th"> <translation id="1012876632442809908">อุปกรณ์ USB-C (พอร์ตด้านหน้า)</translation> <translation id="1013923882670373915">อุปกรณ์บลูทูธ "<ph name="DEVICE_NAME" />" ต้องการสิทธิ์ในการจับคู่ โปรดป้อนรหัส PIN นี้บนอุปกรณ์นั้น: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">มีการเปลี่ยนแปลงทางลัดที่ใช้สลับไปยังวิธีการป้อนข้อมูลถัดไป โปรดใช้ <ph name="NEW_SHORTCUT" /> แทน <ph name="OLD_SHORTCUT" /></translation> <translation id="112308213915226829">ซ่อนชั้นวางโดยอัตโนมัติ</translation> <translation id="1127238861555034875">โหมดแว่นขยาย</translation> <translation id="1195412055398077112">โอเวอร์สแกน</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">กำลังแสดงผลไปที่ <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">มีการเปลี่ยนแปลงทางลัดที่ใช้เปิดตัวจัดการงาน โปรดใช้ <ph name="NEW_SHORTCUT" /> แทน <ph name="OLD_SHORTCUT" /></translation> <translation id="1923539912171292317">การคลิกอัตโนมัติ</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">ที่ชาร์จพลังงานต่ำ</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">เรียนรู้เพิ่มเติม...</translation> <translation id="4961318399572185831">แคสต์หน้าจอ</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">การตั้งค่า Google ไดรฟ์...</translation> <translation id="510924152490034944">อาจมีการตรวจสอบการเชื่อมต่อ</translation> <translation id="5168181903108465623">เครื่องส่งพร้อมใช้งาน</translation>
diff --git a/ash/common/strings/ash_strings_tr.xtb b/ash/common/strings/ash_strings_tr.xtb index c588992..7c5e743 100644 --- a/ash/common/strings/ash_strings_tr.xtb +++ b/ash/common/strings/ash_strings_tr.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="tr"> <translation id="1012876632442809908">USB-C cihaz (ön bağlantı noktası)</translation> <translation id="1013923882670373915">"<ph name="DEVICE_NAME" />" adlı Bluetooth cihaz eşleme izni istiyor. Lütfen söz konusu cihazda şu PIN kodunu girin: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Sonraki giriş yöntemine geçme kısayolu değişti. Lütfen <ph name="OLD_SHORTCUT" /> yerine <ph name="NEW_SHORTCUT" /> kısayolunu kullanın.</translation> <translation id="112308213915226829">Rafı otomatik gizle</translation> <translation id="1127238861555034875">Büyüteç modu</translation> <translation id="1195412055398077112">fazla tarama</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Şuraya yansıtılıyor: <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Görev yöneticisini açma kısayolu değişti. Lütfen <ph name="OLD_SHORTCUT" /> yerine <ph name="NEW_SHORTCUT" /> kısayolunu kullanın.</translation> <translation id="1923539912171292317">Otomatik tıklamalar</translation> -<translation id="1938872420421548906">Üst Karakter+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Düşük güçlü şarj cihazı</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Daha fazla bilgi edinin...</translation> <translation id="4961318399572185831">Ekranı yayınla</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Üst Karakter+Boşluk</translation> <translation id="5045002648206642691">Google Drive ayarları...</translation> <translation id="510924152490034944">Bağlantı izlenebilir</translation> <translation id="5168181903108465623">Yayın cihazları kullanılabilir</translation>
diff --git a/ash/common/strings/ash_strings_uk.xtb b/ash/common/strings/ash_strings_uk.xtb index 29922a5..3db4ea7 100644 --- a/ash/common/strings/ash_strings_uk.xtb +++ b/ash/common/strings/ash_strings_uk.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="uk"> <translation id="1012876632442809908">Пристрій із портом USB типу C (на передній панелі)</translation> <translation id="1013923882670373915">Пристрою Bluetooth "<ph name="DEVICE_NAME" />" потрібен дозвіл на підключення. Введіть на пристрої цей PIN-код: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Комбінація клавіш для вибору наступного методу введення змінилася. Тепер це <ph name="NEW_SHORTCUT" />, а не <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Автоматично ховати полицю</translation> <translation id="1127238861555034875">Режим лупи</translation> <translation id="1195412055398077112">облямівка екрана</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Дзеркалювання на <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Комбінація клавіш для запуску Диспетчера завдань змінилася. Тепер це <ph name="NEW_SHORTCUT" />, а не <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Автоматичні кліки</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Зарядний пристрій низької потужності</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Докладніше...</translation> <translation id="4961318399572185831">Трансляція екрана</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+пробіл</translation> <translation id="5045002648206642691">Налаштування Google Диска...</translation> <translation id="510924152490034944">Зв’язок може відстежуватися</translation> <translation id="5168181903108465623">Доступні пристрої для трансляції</translation>
diff --git a/ash/common/strings/ash_strings_vi.xtb b/ash/common/strings/ash_strings_vi.xtb index f67b1ee7..e9f541b 100644 --- a/ash/common/strings/ash_strings_vi.xtb +++ b/ash/common/strings/ash_strings_vi.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="vi"> <translation id="1012876632442809908">Thiết bị USB-C (cổng phía trước)</translation> <translation id="1013923882670373915">Thiết bị Bluetooth "<ph name="DEVICE_NAME" />" muốn được phép ghép nối. Vui lòng nhập mã PIN này trên thiết bị đó: <ph name="PINCODE" /></translation> -<translation id="1021311941847921177">Phím tắt để chuyển sang phương thức nhập tiếp theo đã thay đổi. Vui lòng sử dụng <ph name="NEW_SHORTCUT" /> thay vì <ph name="OLD_SHORTCUT" />.</translation> <translation id="112308213915226829">Tự động ẩn giá</translation> <translation id="1127238861555034875">Chế độ kính lúp</translation> <translation id="1195412055398077112">quét quá mức</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">Đang phản chiếu tới <ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">Phím tắt để mở trình quản lý tác vụ đã thay đổi. Vui lòng sử dụng <ph name="NEW_SHORTCUT" /> thay vì <ph name="OLD_SHORTCUT" />.</translation> <translation id="1923539912171292317">Nhấp chuột tự động</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">Bộ sạc công suất thấp</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">Tìm hiểu thêm...</translation> <translation id="4961318399572185831">Truyền màn hình</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Cài đặt Google Drive...</translation> <translation id="510924152490034944">Kết nối có thể bị theo dõi</translation> <translation id="5168181903108465623">Có thiết bị truyền</translation>
diff --git a/ash/common/strings/ash_strings_zh-CN.xtb b/ash/common/strings/ash_strings_zh-CN.xtb index f580312..eae97fd 100644 --- a/ash/common/strings/ash_strings_zh-CN.xtb +++ b/ash/common/strings/ash_strings_zh-CN.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="zh-CN"> <translation id="1012876632442809908">USB-C 设备(前方端口)</translation> <translation id="1013923882670373915">蓝牙设备“<ph name="DEVICE_NAME" />”需要配对许可。请在该设备上输入以下PIN码:<ph name="PINCODE" /></translation> -<translation id="1021311941847921177">用于切换到下一种输入法的快捷键已更改。请使用 <ph name="NEW_SHORTCUT" />,而不是 <ph name="OLD_SHORTCUT" />。</translation> <translation id="112308213915226829">自动隐藏任务栏</translation> <translation id="1127238861555034875">放大镜模式</translation> <translation id="1195412055398077112">过扫描</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">正在镜像到<ph name="DISPLAY_NAME" /></translation> <translation id="1919743966458266018">用于打开任务管理器的快捷键已更改。请使用 <ph name="NEW_SHORTCUT" />,而不是 <ph name="OLD_SHORTCUT" />。</translation> <translation id="1923539912171292317">自动点击</translation> -<translation id="1938872420421548906">Shift+Alt</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">低功率充电器</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">了解详情...</translation> <translation id="4961318399572185831">投射屏幕</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl+Shift+Space</translation> <translation id="5045002648206642691">Google 云端硬盘设置...</translation> <translation id="510924152490034944">连接可能会受到监控</translation> <translation id="5168181903108465623">有可用的投射设备</translation>
diff --git a/ash/common/strings/ash_strings_zh-TW.xtb b/ash/common/strings/ash_strings_zh-TW.xtb index 1476728..eef32c9 100644 --- a/ash/common/strings/ash_strings_zh-TW.xtb +++ b/ash/common/strings/ash_strings_zh-TW.xtb
@@ -3,7 +3,6 @@ <translationbundle lang="zh-TW"> <translation id="1012876632442809908">USB-C 裝置 (前方連接埠)</translation> <translation id="1013923882670373915">藍牙裝置「<ph name="DEVICE_NAME" />」要求配對權限,請在裝置上輸入以下 PIN 碼:<ph name="PINCODE" /></translation> -<translation id="1021311941847921177">切換至下一個輸入法的快速鍵已變更,請改用 <ph name="NEW_SHORTCUT" /> (停用 <ph name="OLD_SHORTCUT" />)。</translation> <translation id="112308213915226829">自動隱藏檔案櫃</translation> <translation id="1127238861555034875">放大鏡模式</translation> <translation id="1195412055398077112">遮視區域</translation> @@ -38,7 +37,6 @@ <translation id="1882897271359938046">正在建立 <ph name="DISPLAY_NAME" /> 鏡像</translation> <translation id="1919743966458266018">開啟工作管理員的快速鍵已變更,請改用 <ph name="NEW_SHORTCUT" /> (停用 <ph name="OLD_SHORTCUT" />)。</translation> <translation id="1923539912171292317">自動點擊</translation> -<translation id="1938872420421548906">Shift + Alt 鍵</translation> <translation id="1957803754585243749">0°</translation> <translation id="1969011864782743497"><ph name="DEVICE_NAME" /> (USB)</translation> <translation id="2127372758936585790">低功率充電器</translation> @@ -141,7 +139,6 @@ <translation id="4957722034734105353">瞭解詳情...</translation> <translation id="4961318399572185831">投放螢幕</translation> <translation id="5011233892417813670">Chromebook</translation> -<translation id="5012744545445585468">Ctrl + Shift + 空格鍵</translation> <translation id="5045002648206642691">Google 雲端硬碟設定...</translation> <translation id="510924152490034944">連線可能受到監控</translation> <translation id="5168181903108465623">可用的投放裝置</translation>
diff --git a/ash/system/chromeos/power/tablet_power_button_controller.cc b/ash/system/chromeos/power/tablet_power_button_controller.cc index cb316de..672e54c 100644 --- a/ash/system/chromeos/power/tablet_power_button_controller.cc +++ b/ash/system/chromeos/power/tablet_power_button_controller.cc
@@ -35,6 +35,11 @@ // ignored. constexpr int kIgnorePowerButtonAfterResumeMs = 2000; +// Ignore button-up events occurring within this many milliseconds of the +// previous button-up event. This prevents us from falling behind if the power +// button is pressed repeatedly. +constexpr int kIgnoreRepeatedButtonUpMs = 500; + // Returns true if device is a convertible/tablet device, otherwise false. bool IsTabletModeSupported() { MaximizeModeController* maximize_mode_controller = @@ -72,7 +77,6 @@ TabletPowerButtonController::TabletPowerButtonController( LockStateController* controller) : tick_clock_(new base::DefaultTickClock()), - last_resume_time_(base::TimeTicks()), force_off_on_button_up_(true), controller_(controller), weak_ptr_factory_(this) { @@ -119,6 +123,20 @@ SetDisplayForcedOff(false); StartShutdownTimer(); } else { + // When power button is released, cancel shutdown animation whenever it is + // still cancellable. + if (controller_->CanCancelShutdownAnimation()) + controller_->CancelShutdownAnimation(); + + const base::TimeTicks previous_up_time = last_button_up_time_; + last_button_up_time_ = tick_clock_->NowTicks(); + // Ignore the event if it comes too soon after the last one. + if (timestamp - previous_up_time <= + base::TimeDelta::FromMilliseconds(kIgnoreRepeatedButtonUpMs)) { + shutdown_timer_.Stop(); + return; + } + if (shutdown_timer_.IsRunning()) { shutdown_timer_.Stop(); if (!screen_off_when_power_button_down_ && force_off_on_button_up_) { @@ -126,11 +144,6 @@ LockScreenIfRequired(); } } - - // When power button is released, cancel shutdown animation whenever it is - // still cancellable. - if (controller_->CanCancelShutdownAnimation()) - controller_->CancelShutdownAnimation(); } }
diff --git a/ash/system/chromeos/power/tablet_power_button_controller.h b/ash/system/chromeos/power/tablet_power_button_controller.h index b99148e..2a90377 100644 --- a/ash/system/chromeos/power/tablet_power_button_controller.h +++ b/ash/system/chromeos/power/tablet_power_button_controller.h
@@ -117,6 +117,9 @@ // updated in SuspendDone(). base::TimeTicks last_resume_time_; + // Saves the most recent timestamp that power button is released. + base::TimeTicks last_button_up_time_; + // True if power button released should force off display. bool force_off_on_button_up_;
diff --git a/ash/system/chromeos/power/tablet_power_button_controller_unittest.cc b/ash/system/chromeos/power/tablet_power_button_controller_unittest.cc index 2dcc5ec..546c861 100644 --- a/ash/system/chromeos/power/tablet_power_button_controller_unittest.cc +++ b/ash/system/chromeos/power/tablet_power_button_controller_unittest.cc
@@ -439,5 +439,40 @@ EXPECT_FALSE(GetBacklightsForcedOff()); } +// Tests that repeated power button releases are ignored (crbug.com/675291). +TEST_F(TabletPowerButtonControllerTest, IgnoreRepeatedPowerButtonReleases) { + // Advance a long duration from initialized last resume time in + // |tablet_controller_| to avoid cross interference. + tick_clock_->Advance(base::TimeDelta::FromMilliseconds(2000)); + + // Set backlights forced off for starting point. + PressPowerButton(); + ReleasePowerButton(); + power_manager_client_->SendBrightnessChanged(0, false); + EXPECT_TRUE(GetBacklightsForcedOff()); + + // Test that a pressing-releasing operation after a short duration, backlights + // forced off is stopped since we don't drop request for power button pressed. + tick_clock_->Advance(base::TimeDelta::FromMilliseconds(200)); + power_manager_client_->SendPowerButtonEvent(true, tick_clock_->NowTicks()); + power_manager_client_->SendBrightnessChanged(kNonZeroBrightness, false); + power_manager_client_->SendPowerButtonEvent(false, tick_clock_->NowTicks()); + EXPECT_FALSE(GetBacklightsForcedOff()); + + // Test that after another short duration, backlights will not be forced off + // since this immediately following forcing off request needs to be dropped. + tick_clock_->Advance(base::TimeDelta::FromMilliseconds(200)); + power_manager_client_->SendPowerButtonEvent(true, tick_clock_->NowTicks()); + power_manager_client_->SendPowerButtonEvent(false, tick_clock_->NowTicks()); + EXPECT_FALSE(GetBacklightsForcedOff()); + + // Test that after another long duration, backlights should be forced off. + tick_clock_->Advance(base::TimeDelta::FromMilliseconds(800)); + power_manager_client_->SendPowerButtonEvent(true, tick_clock_->NowTicks()); + power_manager_client_->SendPowerButtonEvent(false, tick_clock_->NowTicks()); + power_manager_client_->SendBrightnessChanged(0, false); + EXPECT_TRUE(GetBacklightsForcedOff()); +} + } // namespace test } // namespace ash
diff --git a/base/BUILD.gn b/base/BUILD.gn index 24caaa5..51895528 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn
@@ -561,6 +561,8 @@ "metrics/field_trial.h", "metrics/field_trial_param_associator.cc", "metrics/field_trial_param_associator.h", + "metrics/field_trial_params.cc", + "metrics/field_trial_params.h", "metrics/histogram.cc", "metrics/histogram.h", "metrics/histogram_base.cc", @@ -1981,6 +1983,7 @@ "message_loop/message_pump_glib_unittest.cc", "message_loop/message_pump_io_ios_unittest.cc", "metrics/bucket_ranges_unittest.cc", + "metrics/field_trial_params_unittest.cc", "metrics/field_trial_unittest.cc", "metrics/histogram_base_unittest.cc", "metrics/histogram_delta_serialization_unittest.cc",
diff --git a/base/OWNERS b/base/OWNERS index 06f165f..0e7d010 100644 --- a/base/OWNERS +++ b/base/OWNERS
@@ -43,3 +43,5 @@ # For TCMalloc tests: per-file security_unittest.cc=jln@chromium.org + +# COMPONENT: Internals>Core
diff --git a/base/logging.h b/base/logging.h index 6eb796f..5174e6d 100644 --- a/base/logging.h +++ b/base/logging.h
@@ -730,7 +730,27 @@ LAZY_STREAM(PLOG_STREAM(DCHECK), false) \ << "Check failed: " #condition ". " -#else // _PREFAST_ +#elif defined(__clang_analyzer__) + +// Keeps the static analyzer from proceeding along the current codepath, +// otherwise false positive errors may be generated by null pointer checks. +inline constexpr bool AnalyzerNoReturn() __attribute__((analyzer_noreturn)) { + return false; +} + +#define DCHECK(condition) \ + LAZY_STREAM( \ + LOG_STREAM(DCHECK), \ + DCHECK_IS_ON() ? (logging::AnalyzerNoReturn() || !(condition)) : false) \ + << "Check failed: " #condition ". " + +#define DPCHECK(condition) \ + LAZY_STREAM( \ + PLOG_STREAM(DCHECK), \ + DCHECK_IS_ON() ? (logging::AnalyzerNoReturn() || !(condition)) : false) \ + << "Check failed: " #condition ". " + +#else #if DCHECK_IS_ON() @@ -748,7 +768,7 @@ #endif // DCHECK_IS_ON() -#endif // _PREFAST_ +#endif // Helper macro for binary operators. // Don't use this macro directly in your code, use DCHECK_EQ et al below.
diff --git a/base/metrics/field_trial_params.cc b/base/metrics/field_trial_params.cc new file mode 100644 index 0000000..bcefa89 --- /dev/null +++ b/base/metrics/field_trial_params.cc
@@ -0,0 +1,121 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/metrics/field_trial_params.h" + +#include "base/feature_list.h" +#include "base/metrics/field_trial.h" +#include "base/metrics/field_trial_param_associator.h" +#include "base/strings/string_number_conversions.h" + +namespace base { + +bool AssociateFieldTrialParams( + const std::string& trial_name, + const std::string& group_name, + const std::map<std::string, std::string>& params) { + return base::FieldTrialParamAssociator::GetInstance() + ->AssociateFieldTrialParams(trial_name, group_name, params); +} + +bool GetFieldTrialParams(const std::string& trial_name, + std::map<std::string, std::string>* params) { + return base::FieldTrialParamAssociator::GetInstance()->GetFieldTrialParams( + trial_name, params); +} + +bool GetFieldTrialParamsByFeature(const base::Feature& feature, + std::map<std::string, std::string>* params) { + if (!base::FeatureList::IsEnabled(feature)) + return false; + + base::FieldTrial* trial = base::FeatureList::GetFieldTrial(feature); + if (!trial) + return false; + + return GetFieldTrialParams(trial->trial_name(), params); +} + +std::string GetFieldTrialParamValue(const std::string& trial_name, + const std::string& param_name) { + std::map<std::string, std::string> params; + if (GetFieldTrialParams(trial_name, ¶ms)) { + std::map<std::string, std::string>::iterator it = params.find(param_name); + if (it != params.end()) + return it->second; + } + return std::string(); +} + +std::string GetFieldTrialParamValueByFeature(const base::Feature& feature, + const std::string& param_name) { + if (!base::FeatureList::IsEnabled(feature)) + return std::string(); + + base::FieldTrial* trial = base::FeatureList::GetFieldTrial(feature); + if (!trial) + return std::string(); + + return GetFieldTrialParamValue(trial->trial_name(), param_name); +} + +int GetFieldTrialParamByFeatureAsInt(const base::Feature& feature, + const std::string& param_name, + int default_value) { + std::string value_as_string = + GetFieldTrialParamValueByFeature(feature, param_name); + int value_as_int = 0; + if (!base::StringToInt(value_as_string, &value_as_int)) { + if (!value_as_string.empty()) { + DLOG(WARNING) << "Failed to parse field trial param " << param_name + << " with string value " << value_as_string + << " under feature " << feature.name + << " into an int. Falling back to default value of " + << default_value; + } + value_as_int = default_value; + } + return value_as_int; +} + +double GetFieldTrialParamByFeatureAsDouble(const base::Feature& feature, + const std::string& param_name, + double default_value) { + std::string value_as_string = + GetFieldTrialParamValueByFeature(feature, param_name); + double value_as_double = 0; + if (!base::StringToDouble(value_as_string, &value_as_double)) { + if (!value_as_string.empty()) { + DLOG(WARNING) << "Failed to parse field trial param " << param_name + << " with string value " << value_as_string + << " under feature " << feature.name + << " into a double. Falling back to default value of " + << default_value; + } + value_as_double = default_value; + } + return value_as_double; +} + +bool GetFieldTrialParamByFeatureAsBool(const base::Feature& feature, + const std::string& param_name, + bool default_value) { + std::string value_as_string = + GetFieldTrialParamValueByFeature(feature, param_name); + if (value_as_string == "true") + return true; + if (value_as_string == "false") + return false; + + if (!value_as_string.empty()) { + DLOG(WARNING) << "Failed to parse field trial param " << param_name + << " with string value " << value_as_string + << " under feature " << feature.name + << " into a bool. Falling back to default value of " + << default_value; + } + return default_value; +} + +} // namespace base
diff --git a/base/metrics/field_trial_params.h b/base/metrics/field_trial_params.h new file mode 100644 index 0000000..2490149f --- /dev/null +++ b/base/metrics/field_trial_params.h
@@ -0,0 +1,96 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef BASE_METRICS_FIELD_TRIAL_PARAMS_H_ +#define BASE_METRICS_FIELD_TRIAL_PARAMS_H_ + +#include <map> +#include <string> + +#include "base/base_export.h" + +namespace base { + +struct Feature; + +// Associates the specified set of key-value |params| with the field trial +// specified by |trial_name| and |group_name|. Fails and returns false if the +// specified field trial already has params associated with it or the trial +// is already active (group() has been called on it). Thread safe. +BASE_EXPORT bool AssociateFieldTrialParams( + const std::string& trial_name, + const std::string& group_name, + const std::map<std::string, std::string>& params); + +// Retrieves the set of key-value |params| for the specified field trial, based +// on its selected group. If the field trial does not exist or its selected +// group does not have any parameters associated with it, returns false and +// does not modify |params|. Calling this function will result in the field +// trial being marked as active if found (i.e. group() will be called on it), +// if it wasn't already. Thread safe. +BASE_EXPORT bool GetFieldTrialParams( + const std::string& trial_name, + std::map<std::string, std::string>* params); + +// Retrieves the set of key-value |params| for the field trial associated with +// the specified |feature|. A feature is associated with at most one field +// trial and selected group. See base/feature_list.h for more information on +// features. If the feature is not enabled, or if there's no associated params, +// returns false and does not modify |params|. Calling this function will +// result in the associated field trial being marked as active if found (i.e. +// group() will be called on it), if it wasn't already. Thread safe. +BASE_EXPORT bool GetFieldTrialParamsByFeature( + const base::Feature& feature, + std::map<std::string, std::string>* params); + +// Retrieves a specific parameter value corresponding to |param_name| for the +// specified field trial, based on its selected group. If the field trial does +// not exist or the specified parameter does not exist, returns an empty +// string. Calling this function will result in the field trial being marked as +// active if found (i.e. group() will be called on it), if it wasn't already. +// Thread safe. +BASE_EXPORT std::string GetFieldTrialParamValue(const std::string& trial_name, + const std::string& param_name); + +// Retrieves a specific parameter value corresponding to |param_name| for the +// field trial associated with the specified |feature|. A feature is associated +// with at most one field trial and selected group. See base/feature_list.h for +// more information on features. If the feature is not enabled, or the +// specified parameter does not exist, returns an empty string. Calling this +// function will result in the associated field trial being marked as active if +// found (i.e. group() will be called on it), if it wasn't already. Thread safe. +BASE_EXPORT std::string GetFieldTrialParamValueByFeature( + const base::Feature& feature, + const std::string& param_name); + +// Same as GetFieldTrialParamValueByFeature(). On top of that, it converts the +// string value into an int using base::StringToInt() and returns it, if +// successful. Otherwise, it returns |default_value|. If the string value is not +// empty and the conversion does not succeed, it produces a warning to LOG. +BASE_EXPORT int GetFieldTrialParamByFeatureAsInt(const base::Feature& feature, + const std::string& param_name, + int default_value); + +// Same as GetFieldTrialParamValueByFeature(). On top of that, it converts the +// string value into a double using base::StringToDouble() and returns it, if +// successful. Otherwise, it returns |default_value|. If the string value is not +// empty and the conversion does not succeed, it produces a warning to LOG. +BASE_EXPORT double GetFieldTrialParamByFeatureAsDouble( + const base::Feature& feature, + const std::string& param_name, + double default_value); + +// Same as GetFieldTrialParamValueByFeature(). On top of that, it converts the +// string value into a boolean and returns it, if successful. Otherwise, it +// returns |default_value|. The only string representations accepted here are +// "true" and "false". If the string value is not empty and the conversion does +// not succeed, it produces a warning to LOG. +BASE_EXPORT bool GetFieldTrialParamByFeatureAsBool( + const base::Feature& feature, + const std::string& param_name, + bool default_value); + +} // namespace base + +#endif // BASE_METRICS_FIELD_TRIAL_PARAMS_H_
diff --git a/base/metrics/field_trial_params_unittest.cc b/base/metrics/field_trial_params_unittest.cc new file mode 100644 index 0000000..cd540e28 --- /dev/null +++ b/base/metrics/field_trial_params_unittest.cc
@@ -0,0 +1,323 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/metrics/field_trial_params.h" + +#include "base/feature_list.h" +#include "base/macros.h" +#include "base/metrics/field_trial.h" +#include "base/metrics/field_trial_param_associator.h" +#include "base/test/scoped_feature_list.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace base { + +namespace { + +// Call FieldTrialList::FactoryGetFieldTrial() with a future expiry date. +scoped_refptr<FieldTrial> CreateFieldTrial( + const std::string& trial_name, + int total_probability, + const std::string& default_group_name, + int* default_group_number) { + return FieldTrialList::FactoryGetFieldTrial( + trial_name, total_probability, default_group_name, + FieldTrialList::kNoExpirationYear, 1, 1, FieldTrial::SESSION_RANDOMIZED, + default_group_number); +} + +} // namespace + +class FieldTrialParamsTest : public ::testing::Test { + public: + FieldTrialParamsTest() : field_trial_list_(nullptr) {} + + ~FieldTrialParamsTest() override { + // Ensure that the maps are cleared between tests, since they are stored as + // process singletons. + FieldTrialParamAssociator::GetInstance()->ClearAllParamsForTesting(); + } + + void CreateFeatureWithTrial(const Feature& feature, + FeatureList::OverrideState override_state, + FieldTrial* trial) { + std::unique_ptr<FeatureList> feature_list(new FeatureList); + feature_list->RegisterFieldTrialOverride(feature.name, override_state, + trial); + scoped_feature_list_.InitWithFeatureList(std::move(feature_list)); + } + + private: + FieldTrialList field_trial_list_; + test::ScopedFeatureList scoped_feature_list_; + + DISALLOW_COPY_AND_ASSIGN(FieldTrialParamsTest); +}; + +TEST_F(FieldTrialParamsTest, AssociateFieldTrialParams) { + const std::string kTrialName = "AssociateFieldTrialParams"; + + { + std::map<std::string, std::string> params; + params["a"] = "10"; + params["b"] = "test"; + ASSERT_TRUE(AssociateFieldTrialParams(kTrialName, "A", params)); + } + { + std::map<std::string, std::string> params; + params["a"] = "5"; + ASSERT_TRUE(AssociateFieldTrialParams(kTrialName, "B", params)); + } + + FieldTrialList::CreateFieldTrial(kTrialName, "B"); + EXPECT_EQ("5", GetFieldTrialParamValue(kTrialName, "a")); + EXPECT_EQ(std::string(), GetFieldTrialParamValue(kTrialName, "b")); + EXPECT_EQ(std::string(), GetFieldTrialParamValue(kTrialName, "x")); + + std::map<std::string, std::string> params; + EXPECT_TRUE(GetFieldTrialParams(kTrialName, ¶ms)); + EXPECT_EQ(1U, params.size()); + EXPECT_EQ("5", params["a"]); +} + +TEST_F(FieldTrialParamsTest, AssociateFieldTrialParams_Fail) { + const std::string kTrialName = "AssociateFieldTrialParams_Fail"; + const std::string kGroupName = "A"; + + std::map<std::string, std::string> params; + params["a"] = "10"; + ASSERT_TRUE(AssociateFieldTrialParams(kTrialName, kGroupName, params)); + params["a"] = "1"; + params["b"] = "2"; + ASSERT_FALSE(AssociateFieldTrialParams(kTrialName, kGroupName, params)); + + FieldTrialList::CreateFieldTrial(kTrialName, kGroupName); + EXPECT_EQ("10", GetFieldTrialParamValue(kTrialName, "a")); + EXPECT_EQ(std::string(), GetFieldTrialParamValue(kTrialName, "b")); +} + +TEST_F(FieldTrialParamsTest, AssociateFieldTrialParams_TrialActiveFail) { + const std::string kTrialName = "AssociateFieldTrialParams_TrialActiveFail"; + FieldTrialList::CreateFieldTrial(kTrialName, "A"); + ASSERT_EQ("A", FieldTrialList::FindFullName(kTrialName)); + + std::map<std::string, std::string> params; + params["a"] = "10"; + EXPECT_FALSE(AssociateFieldTrialParams(kTrialName, "B", params)); + EXPECT_FALSE(AssociateFieldTrialParams(kTrialName, "A", params)); +} + +TEST_F(FieldTrialParamsTest, AssociateFieldTrialParams_DoesntActivateTrial) { + const std::string kTrialName = + "AssociateFieldTrialParams_DoesntActivateTrial"; + + ASSERT_FALSE(FieldTrialList::IsTrialActive(kTrialName)); + scoped_refptr<FieldTrial> trial( + CreateFieldTrial(kTrialName, 100, "A", nullptr)); + ASSERT_FALSE(FieldTrialList::IsTrialActive(kTrialName)); + + std::map<std::string, std::string> params; + params["a"] = "10"; + EXPECT_TRUE(AssociateFieldTrialParams(kTrialName, "A", params)); + ASSERT_FALSE(FieldTrialList::IsTrialActive(kTrialName)); +} + +TEST_F(FieldTrialParamsTest, GetFieldTrialParams_NoTrial) { + const std::string kTrialName = "GetFieldTrialParams_NoParams"; + + std::map<std::string, std::string> params; + EXPECT_FALSE(GetFieldTrialParams(kTrialName, ¶ms)); + EXPECT_EQ(std::string(), GetFieldTrialParamValue(kTrialName, "x")); + EXPECT_EQ(std::string(), GetFieldTrialParamValue(kTrialName, "y")); +} + +TEST_F(FieldTrialParamsTest, GetFieldTrialParams_NoParams) { + const std::string kTrialName = "GetFieldTrialParams_NoParams"; + + FieldTrialList::CreateFieldTrial(kTrialName, "A"); + + std::map<std::string, std::string> params; + EXPECT_FALSE(GetFieldTrialParams(kTrialName, ¶ms)); + EXPECT_EQ(std::string(), GetFieldTrialParamValue(kTrialName, "x")); + EXPECT_EQ(std::string(), GetFieldTrialParamValue(kTrialName, "y")); +} + +TEST_F(FieldTrialParamsTest, GetFieldTrialParams_ActivatesTrial) { + const std::string kTrialName = "GetFieldTrialParams_ActivatesTrial"; + + ASSERT_FALSE(FieldTrialList::IsTrialActive(kTrialName)); + scoped_refptr<FieldTrial> trial( + CreateFieldTrial(kTrialName, 100, "A", nullptr)); + ASSERT_FALSE(FieldTrialList::IsTrialActive(kTrialName)); + + std::map<std::string, std::string> params; + EXPECT_FALSE(GetFieldTrialParams(kTrialName, ¶ms)); + ASSERT_TRUE(FieldTrialList::IsTrialActive(kTrialName)); +} + +TEST_F(FieldTrialParamsTest, GetFieldTrialParamValue_ActivatesTrial) { + const std::string kTrialName = "GetFieldTrialParamValue_ActivatesTrial"; + + ASSERT_FALSE(FieldTrialList::IsTrialActive(kTrialName)); + scoped_refptr<FieldTrial> trial( + CreateFieldTrial(kTrialName, 100, "A", nullptr)); + ASSERT_FALSE(FieldTrialList::IsTrialActive(kTrialName)); + + std::map<std::string, std::string> params; + EXPECT_EQ(std::string(), GetFieldTrialParamValue(kTrialName, "x")); + ASSERT_TRUE(FieldTrialList::IsTrialActive(kTrialName)); +} + +TEST_F(FieldTrialParamsTest, GetFieldTrialParamsByFeature) { + const std::string kTrialName = "GetFieldTrialParamsByFeature"; + const Feature kFeature{"TestFeature", FEATURE_DISABLED_BY_DEFAULT}; + + std::map<std::string, std::string> params; + params["x"] = "1"; + AssociateFieldTrialParams(kTrialName, "A", params); + scoped_refptr<FieldTrial> trial( + CreateFieldTrial(kTrialName, 100, "A", nullptr)); + + CreateFeatureWithTrial(kFeature, FeatureList::OVERRIDE_ENABLE_FEATURE, + trial.get()); + + std::map<std::string, std::string> actualParams; + EXPECT_TRUE(GetFieldTrialParamsByFeature(kFeature, &actualParams)); + EXPECT_EQ(params, actualParams); +} + +TEST_F(FieldTrialParamsTest, GetFieldTrialParamValueByFeature) { + const std::string kTrialName = "GetFieldTrialParamsByFeature"; + const Feature kFeature{"TestFeature", FEATURE_DISABLED_BY_DEFAULT}; + + std::map<std::string, std::string> params; + params["x"] = "1"; + AssociateFieldTrialParams(kTrialName, "A", params); + scoped_refptr<FieldTrial> trial( + CreateFieldTrial(kTrialName, 100, "A", nullptr)); + + CreateFeatureWithTrial(kFeature, FeatureList::OVERRIDE_ENABLE_FEATURE, + trial.get()); + + std::map<std::string, std::string> actualParams; + EXPECT_EQ(params["x"], GetFieldTrialParamValueByFeature(kFeature, "x")); +} + +TEST_F(FieldTrialParamsTest, GetFieldTrialParamsByFeature_Disable) { + const std::string kTrialName = "GetFieldTrialParamsByFeature"; + const Feature kFeature{"TestFeature", FEATURE_DISABLED_BY_DEFAULT}; + + std::map<std::string, std::string> params; + params["x"] = "1"; + AssociateFieldTrialParams(kTrialName, "A", params); + scoped_refptr<FieldTrial> trial( + CreateFieldTrial(kTrialName, 100, "A", nullptr)); + + CreateFeatureWithTrial(kFeature, FeatureList::OVERRIDE_DISABLE_FEATURE, + trial.get()); + + std::map<std::string, std::string> actualParams; + EXPECT_FALSE(GetFieldTrialParamsByFeature(kFeature, &actualParams)); +} + +TEST_F(FieldTrialParamsTest, GetFieldTrialParamValueByFeature_Disable) { + const std::string kTrialName = "GetFieldTrialParamsByFeature"; + const Feature kFeature{"TestFeature", FEATURE_DISABLED_BY_DEFAULT}; + + std::map<std::string, std::string> params; + params["x"] = "1"; + AssociateFieldTrialParams(kTrialName, "A", params); + scoped_refptr<FieldTrial> trial( + CreateFieldTrial(kTrialName, 100, "A", nullptr)); + + CreateFeatureWithTrial(kFeature, FeatureList::OVERRIDE_DISABLE_FEATURE, + trial.get()); + + std::map<std::string, std::string> actualParams; + EXPECT_EQ(std::string(), GetFieldTrialParamValueByFeature(kFeature, "x")); +} + +TEST_F(FieldTrialParamsTest, GetFieldTrialParamByFeatureAsInt) { + const std::string kTrialName = "GetFieldTrialParamsByFeature"; + const Feature kFeature{"TestFeature", FEATURE_DISABLED_BY_DEFAULT}; + + std::map<std::string, std::string> params; + params["a"] = "1"; + params["b"] = "1.5"; + params["c"] = "foo"; + params["d"] = ""; + // "e" is not registered + AssociateFieldTrialParams(kTrialName, "A", params); + scoped_refptr<FieldTrial> trial( + CreateFieldTrial(kTrialName, 100, "A", nullptr)); + + CreateFeatureWithTrial(kFeature, FeatureList::OVERRIDE_ENABLE_FEATURE, + trial.get()); + + std::map<std::string, std::string> actualParams; + EXPECT_EQ(1, GetFieldTrialParamByFeatureAsInt(kFeature, "a", 0)); + EXPECT_EQ(0, GetFieldTrialParamByFeatureAsInt(kFeature, "b", 0)); // invalid + EXPECT_EQ(0, GetFieldTrialParamByFeatureAsInt(kFeature, "c", 0)); // invalid + EXPECT_EQ(0, GetFieldTrialParamByFeatureAsInt(kFeature, "d", 0)); // empty + EXPECT_EQ(0, GetFieldTrialParamByFeatureAsInt(kFeature, "e", 0)); // empty +} + +TEST_F(FieldTrialParamsTest, GetFieldTrialParamByFeatureAsDouble) { + const std::string kTrialName = "GetFieldTrialParamsByFeature"; + const Feature kFeature{"TestFeature", FEATURE_DISABLED_BY_DEFAULT}; + + std::map<std::string, std::string> params; + params["a"] = "1"; + params["b"] = "1.5"; + params["c"] = "1.0e-10"; + params["d"] = "foo"; + params["e"] = ""; + // "f" is not registered + AssociateFieldTrialParams(kTrialName, "A", params); + scoped_refptr<FieldTrial> trial( + CreateFieldTrial(kTrialName, 100, "A", nullptr)); + + CreateFeatureWithTrial(kFeature, FeatureList::OVERRIDE_ENABLE_FEATURE, + trial.get()); + + std::map<std::string, std::string> actualParams; + EXPECT_EQ(1, GetFieldTrialParamByFeatureAsDouble(kFeature, "a", 0)); + EXPECT_EQ(1.5, GetFieldTrialParamByFeatureAsDouble(kFeature, "b", 0)); + EXPECT_EQ(1.0e-10, GetFieldTrialParamByFeatureAsDouble(kFeature, "c", 0)); + EXPECT_EQ(0, + GetFieldTrialParamByFeatureAsDouble(kFeature, "d", 0)); // invalid + EXPECT_EQ(0, GetFieldTrialParamByFeatureAsDouble(kFeature, "e", 0)); // empty + EXPECT_EQ(0, GetFieldTrialParamByFeatureAsDouble(kFeature, "f", 0)); // empty +} + +TEST_F(FieldTrialParamsTest, GetFieldTrialParamByFeatureAsBool) { + const std::string kTrialName = "GetFieldTrialParamsByFeature"; + const Feature kFeature{"TestFeature", FEATURE_DISABLED_BY_DEFAULT}; + + std::map<std::string, std::string> params; + params["a"] = "true"; + params["b"] = "false"; + params["c"] = "1"; + params["d"] = "False"; + params["e"] = ""; + // "f" is not registered + AssociateFieldTrialParams(kTrialName, "A", params); + scoped_refptr<FieldTrial> trial( + CreateFieldTrial(kTrialName, 100, "A", nullptr)); + + CreateFeatureWithTrial(kFeature, FeatureList::OVERRIDE_ENABLE_FEATURE, + trial.get()); + + std::map<std::string, std::string> actualParams; + EXPECT_TRUE(GetFieldTrialParamByFeatureAsBool(kFeature, "a", false)); + EXPECT_FALSE(GetFieldTrialParamByFeatureAsBool(kFeature, "b", true)); + EXPECT_FALSE( + GetFieldTrialParamByFeatureAsBool(kFeature, "c", false)); // invalid + EXPECT_TRUE( + GetFieldTrialParamByFeatureAsBool(kFeature, "d", true)); // invalid + EXPECT_TRUE(GetFieldTrialParamByFeatureAsBool(kFeature, "e", true)); // empty + EXPECT_TRUE(GetFieldTrialParamByFeatureAsBool(kFeature, "f", true)); // empty +} + +} // namespace base
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 9d651ad..4487e63a 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn
@@ -181,10 +181,6 @@ # -------------------------------- cflags += [ "-fno-strict-aliasing" ] # See http://crbug.com/32204 cflags_cc += [ - # If this is removed then remove the corresponding /Zc:threadSafeInit- for - # Windows. - "-fno-threadsafe-statics", - # Not exporting C++ inline functions can generally be applied anywhere # so we do so here. Normal function visibility is controlled by # //build/config/gcc:symbol_visibility_hidden.
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn index b1cb7246..e00bfcb 100644 --- a/build/config/win/BUILD.gn +++ b/build/config/win/BUILD.gn
@@ -55,11 +55,6 @@ # Work around crbug.com/526851, bug in VS 2015 RTM compiler. "/Zc:sizedDealloc-", - - # Disable thread-safe statics to avoid overhead and because - # they are disabled on other platforms. See crbug.com/587210 - # and -fno-threadsafe-statics. - "/Zc:threadSafeInit-", ] # Building with Clang on Windows is a work in progress and very
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc index f8f5a19..3446f38 100644 --- a/cc/layers/layer.cc +++ b/cc/layers/layer.cc
@@ -352,11 +352,12 @@ void Layer::RequestCopyOfOutput(std::unique_ptr<CopyOutputRequest> request) { DCHECK(IsPropertyChangeAllowed()); - if (void* source = request->source()) { + if (request->has_source()) { + const base::UnguessableToken& source = request->source(); auto it = std::find_if(inputs_.copy_requests.begin(), inputs_.copy_requests.end(), - [source](const std::unique_ptr<CopyOutputRequest>& x) { - return x->source() == source; + [&source](const std::unique_ptr<CopyOutputRequest>& x) { + return x->has_source() && x->source() == source; }); if (it != inputs_.copy_requests.end()) inputs_.copy_requests.erase(it); @@ -498,10 +499,12 @@ if (inputs_.blend_mode == blend_mode) return; - // Allowing only blend modes that are defined in the CSS Compositing standard: + // Allowing only blend modes that are defined in the CSS Compositing standard, + // plus destination-in which is used to implement masks. // http://dev.w3.org/fxtf/compositing-1/#blending switch (blend_mode) { case SkBlendMode::kSrcOver: + case SkBlendMode::kDstIn: case SkBlendMode::kScreen: case SkBlendMode::kOverlay: case SkBlendMode::kDarken: @@ -524,7 +527,6 @@ case SkBlendMode::kDst: case SkBlendMode::kDstOver: case SkBlendMode::kSrcIn: - case SkBlendMode::kDstIn: case SkBlendMode::kSrcOut: case SkBlendMode::kDstOut: case SkBlendMode::kSrcATop:
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc index 55057aed..04afe16 100644 --- a/cc/layers/layer_unittest.cc +++ b/cc/layers/layer_unittest.cc
@@ -85,6 +85,11 @@ namespace { +static auto kArbitrarySourceId1 = + base::UnguessableToken::Deserialize(0xdead, 0xbeef); +static auto kArbitrarySourceId2 = + base::UnguessableToken::Deserialize(0xdead, 0xbee0); + class MockLayerTreeHost : public LayerTreeHost { public: MockLayerTreeHost(LayerTreeHostSingleThreadClient* single_thread_client, @@ -1335,19 +1340,19 @@ result_count = 0; // Create identical requests, but this time the source is being set. Expect - // the first request from |this| source aborts immediately when the second - // request from |this| source is made. + // the first request using |kArbitrarySourceId1| aborts immediately when + // the second request using |kArbitrarySourceId1| is made. int did_receive_first_result_from_this_source = 0; request = CopyOutputRequest::CreateRequest(base::Bind( &ReceiveCopyOutputResult, &did_receive_first_result_from_this_source)); - request->set_source(this); + request->set_source(kArbitrarySourceId1); layer->RequestCopyOfOutput(std::move(request)); EXPECT_EQ(0, did_receive_first_result_from_this_source); // Make a request from a different source. int did_receive_result_from_different_source = 0; request = CopyOutputRequest::CreateRequest(base::Bind( &ReceiveCopyOutputResult, &did_receive_result_from_different_source)); - request->set_source(reinterpret_cast<void*>(0xdeadbee0)); + request->set_source(kArbitrarySourceId2); layer->RequestCopyOfOutput(std::move(request)); EXPECT_EQ(0, did_receive_result_from_different_source); // Make a request without specifying the source. @@ -1356,11 +1361,11 @@ &ReceiveCopyOutputResult, &did_receive_result_from_anonymous_source)); layer->RequestCopyOfOutput(std::move(request)); EXPECT_EQ(0, did_receive_result_from_anonymous_source); - // Make the second request from |this| source. + // Make the second request from |kArbitrarySourceId1|. int did_receive_second_result_from_this_source = 0; request = CopyOutputRequest::CreateRequest(base::Bind( &ReceiveCopyOutputResult, &did_receive_second_result_from_this_source)); - request->set_source(this); + request->set_source(kArbitrarySourceId1); layer->RequestCopyOfOutput( std::move(request)); // First request to be aborted. EXPECT_EQ(1, did_receive_first_result_from_this_source);
diff --git a/cc/layers/render_surface_impl.cc b/cc/layers/render_surface_impl.cc index 1265e4f..d43f723 100644 --- a/cc/layers/render_surface_impl.cc +++ b/cc/layers/render_surface_impl.cc
@@ -403,6 +403,12 @@ LayerImpl* mask_layer = MaskLayer(); if (mask_layer && mask_layer->DrawsContent() && !mask_layer->bounds().IsEmpty()) { + // The software renderer applies mask layer and blending in the wrong + // order but kDstIn doesn't commute with masking. It is okay to not + // support this configuration because kDstIn was introduced to replace + // mask layers. + DCHECK(BlendMode() != SkBlendMode::kDstIn) + << "kDstIn blend mode with mask layer is unsupported."; mask_layer->GetContentsResourceId(&mask_resource_id, &mask_texture_size); gfx::SizeF unclipped_mask_target_size = gfx::ScaleSize( gfx::SizeF(OwningEffectNode()->unscaled_mask_target_size),
diff --git a/cc/output/copy_output_request.cc b/cc/output/copy_output_request.cc index 05f15ae..64ada7f6 100644 --- a/cc/output/copy_output_request.cc +++ b/cc/output/copy_output_request.cc
@@ -28,16 +28,14 @@ } CopyOutputRequest::CopyOutputRequest() - : source_(nullptr), - force_bitmap_result_(false), + : force_bitmap_result_(false), has_area_(false), has_texture_mailbox_(false) {} CopyOutputRequest::CopyOutputRequest( bool force_bitmap_result, const CopyOutputRequestCallback& result_callback) - : source_(nullptr), - force_bitmap_result_(force_bitmap_result), + : force_bitmap_result_(force_bitmap_result), has_area_(false), has_texture_mailbox_(false), result_callback_(result_callback) {
diff --git a/cc/output/copy_output_request.h b/cc/output/copy_output_request.h index 4ce583a..6df8ba8 100644 --- a/cc/output/copy_output_request.h +++ b/cc/output/copy_output_request.h
@@ -9,6 +9,8 @@ #include "base/callback.h" #include "base/memory/ptr_util.h" +#include "base/optional.h" +#include "base/unguessable_token.h" #include "cc/base/cc_export.h" #include "cc/resources/single_release_callback.h" #include "cc/resources/texture_mailbox.h" @@ -43,11 +45,12 @@ bool IsEmpty() const { return result_callback_.is_null(); } - // Optionally specify the source of this copy request. If set when this copy + // Optionally specify the source of this copy request. If set when this copy // request is submitted to a layer, a prior uncommitted copy request from the - // same |source| will be aborted. - void set_source(void* source) { source_ = source; } - void* source() const { return source_; } + // same source will be aborted. + void set_source(const base::UnguessableToken& source) { source_ = source; } + bool has_source() const { return source_.has_value(); } + const base::UnguessableToken& source() const { return *source_; } bool force_bitmap_result() const { return force_bitmap_result_; } @@ -82,7 +85,7 @@ CopyOutputRequest(bool force_bitmap_result, const CopyOutputRequestCallback& result_callback); - void* source_; + base::Optional<base::UnguessableToken> source_; bool force_bitmap_result_; bool has_area_; bool has_texture_mailbox_;
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc index 134653c2..59bb170 100644 --- a/cc/output/gl_renderer.cc +++ b/cc/output/gl_renderer.cc
@@ -110,6 +110,8 @@ switch (mode) { case SkBlendMode::kSrcOver: return BLEND_MODE_NORMAL; + case SkBlendMode::kDstIn: + return BLEND_MODE_DESTINATION_IN; case SkBlendMode::kScreen: return BLEND_MODE_SCREEN; case SkBlendMode::kOverlay: @@ -714,17 +716,22 @@ } bool GLRenderer::CanApplyBlendModeUsingBlendFunc(SkBlendMode blend_mode) { - return use_blend_equation_advanced_ || blend_mode == SkBlendMode::kScreen || - blend_mode == SkBlendMode::kSrcOver; + return use_blend_equation_advanced_ || blend_mode == SkBlendMode::kSrcOver || + blend_mode == SkBlendMode::kDstIn || + blend_mode == SkBlendMode::kScreen; } void GLRenderer::ApplyBlendModeUsingBlendFunc(SkBlendMode blend_mode) { - DCHECK(CanApplyBlendModeUsingBlendFunc(blend_mode)); - // Any modes set here must be reset in RestoreBlendFuncToDefault - if (use_blend_equation_advanced_) { + if (blend_mode == SkBlendMode::kSrcOver) { + // Left no-op intentionally. + } else if (blend_mode == SkBlendMode::kDstIn) { + gl_->BlendFunc(GL_ZERO, GL_SRC_ALPHA); + } else if (blend_mode == SkBlendMode::kScreen) { + gl_->BlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ONE); + } else { + DCHECK(use_blend_equation_advanced_); GLenum equation = GL_FUNC_ADD; - switch (blend_mode) { case SkBlendMode::kScreen: equation = GL_SCREEN_KHR; @@ -772,25 +779,25 @@ equation = GL_HSL_LUMINOSITY_KHR; break; default: + NOTREACHED() << "Unexpected blend mode: SkBlendMode::k" + << SkBlendMode_Name(blend_mode); return; } - gl_->BlendEquation(equation); - } else { - if (blend_mode == SkBlendMode::kScreen) { - gl_->BlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ONE); - } } } void GLRenderer::RestoreBlendFuncToDefault(SkBlendMode blend_mode) { - if (blend_mode == SkBlendMode::kSrcOver) - return; - - if (use_blend_equation_advanced_) { - gl_->BlendEquation(GL_FUNC_ADD); - } else { - gl_->BlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + switch (blend_mode) { + case SkBlendMode::kSrcOver: + break; + case SkBlendMode::kDstIn: + case SkBlendMode::kScreen: + gl_->BlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + break; + default: + DCHECK(use_blend_equation_advanced_); + gl_->BlendEquation(GL_FUNC_ADD); } }
diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc index 6a4cf6a8..67b311b7 100644 --- a/cc/output/gl_renderer_unittest.cc +++ b/cc/output/gl_renderer_unittest.cc
@@ -84,6 +84,8 @@ case BLEND_MODE_NONE: case BLEND_MODE_NORMAL: return SkBlendMode::kSrcOver; + case BLEND_MODE_DESTINATION_IN: + return SkBlendMode::kDstIn; case BLEND_MODE_SCREEN: return SkBlendMode::kScreen; case BLEND_MODE_OVERLAY: @@ -236,6 +238,7 @@ static const BlendMode kBlendModeList[LAST_BLEND_MODE + 1] = { BLEND_MODE_NONE, BLEND_MODE_NORMAL, + BLEND_MODE_DESTINATION_IN, BLEND_MODE_SCREEN, BLEND_MODE_OVERLAY, BLEND_MODE_DARKEN,
diff --git a/cc/output/shader.cc b/cc/output/shader.cc index 3bd260f4..055beda 100644 --- a/cc/output/shader.cc +++ b/cc/output/shader.cc
@@ -724,17 +724,25 @@ std::string FragmentShader::GetBlendFunction() const { return "vec4 Blend(vec4 src, vec4 dst) {" - " vec4 result;" - " result.a = src.a + (1.0 - src.a) * dst.a;" + - GetBlendFunctionBodyForRGB() + + " vec4 result;" + + GetBlendFunctionBodyForAlpha() + GetBlendFunctionBodyForRGB() + " return result;" "}"; } +std::string FragmentShader::GetBlendFunctionBodyForAlpha() const { + if (blend_mode_ == BLEND_MODE_DESTINATION_IN) + return "result.a = src.a * dst.a;"; + else + return "result.a = src.a + (1.0 - src.a) * dst.a;"; +} + std::string FragmentShader::GetBlendFunctionBodyForRGB() const { switch (blend_mode_) { case BLEND_MODE_NORMAL: return "result.rgb = src.rgb + dst.rgb * (1.0 - src.a);"; + case BLEND_MODE_DESTINATION_IN: + return "result.rgb = dst.rgb * src.a;"; case BLEND_MODE_SCREEN: return "result.rgb = src.rgb + (1.0 - src.rgb) * dst.rgb;"; case BLEND_MODE_LIGHTEN:
diff --git a/cc/output/shader.h b/cc/output/shader.h index 6be4c5d8..c1e4d24 100644 --- a/cc/output/shader.h +++ b/cc/output/shader.h
@@ -87,6 +87,7 @@ enum BlendMode { BLEND_MODE_NONE, BLEND_MODE_NORMAL, + BLEND_MODE_DESTINATION_IN, BLEND_MODE_SCREEN, BLEND_MODE_OVERLAY, BLEND_MODE_DARKEN, @@ -308,6 +309,7 @@ std::string GetHelperFunctions() const; std::string GetBlendFunction() const; + std::string GetBlendFunctionBodyForAlpha() const; std::string GetBlendFunctionBodyForRGB() const; DISALLOW_COPY_AND_ASSIGN(FragmentShader);
diff --git a/cc/surfaces/surface.cc b/cc/surfaces/surface.cc index 20d3401..dd41c3d 100644 --- a/cc/surfaces/surface.cc +++ b/cc/surfaces/surface.cc
@@ -86,14 +86,15 @@ std::vector<std::unique_ptr<CopyOutputRequest>>& copy_requests = current_frame_->render_pass_list.back()->copy_requests; - if (void* source = copy_request->source()) { + if (copy_request->has_source()) { + const base::UnguessableToken& source = copy_request->source(); // Remove existing CopyOutputRequests made on the Surface by the same // source. - auto to_remove = - std::remove_if(copy_requests.begin(), copy_requests.end(), - [source](const std::unique_ptr<CopyOutputRequest>& x) { - return x->source() == source; - }); + auto to_remove = std::remove_if( + copy_requests.begin(), copy_requests.end(), + [&source](const std::unique_ptr<CopyOutputRequest>& x) { + return x->has_source() && x->source() == source; + }); copy_requests.erase(to_remove, copy_requests.end()); } copy_requests.push_back(std::move(copy_request));
diff --git a/cc/surfaces/surface_factory_unittest.cc b/cc/surfaces/surface_factory_unittest.cc index 6aa7ba4..d7385ab 100644 --- a/cc/surfaces/surface_factory_unittest.cc +++ b/cc/surfaces/surface_factory_unittest.cc
@@ -31,6 +31,10 @@ static constexpr FrameSinkId kAnotherArbitraryFrameSinkId(2, 2); static const base::UnguessableToken kArbitraryToken = base::UnguessableToken::Create(); +static auto kArbitrarySourceId1 = + base::UnguessableToken::Deserialize(0xdead, 0xbeef); +static auto kArbitrarySourceId2 = + base::UnguessableToken::Deserialize(0xdead, 0xbee0); class TestSurfaceFactoryClient : public SurfaceFactoryClient { public: @@ -636,14 +640,12 @@ SurfaceFactory::DrawCallback()); EXPECT_EQ(last_created_surface_id().local_surface_id(), local_surface_id_); } - void* source1 = &source1; - void* source2 = &source2; bool called1 = false; std::unique_ptr<CopyOutputRequest> request; request = CopyOutputRequest::CreateRequest( base::Bind(&CopyRequestTestCallback, &called1)); - request->set_source(source1); + request->set_source(kArbitrarySourceId1); factory_->RequestCopyOfSurface(std::move(request)); EXPECT_FALSE(called1); @@ -651,7 +653,7 @@ bool called2 = false; request = CopyOutputRequest::CreateRequest( base::Bind(&CopyRequestTestCallback, &called2)); - request->set_source(source2); + request->set_source(kArbitrarySourceId2); factory_->RequestCopyOfSurface(std::move(request)); // Callbacks have different sources so neither should be called. @@ -661,7 +663,7 @@ bool called3 = false; request = CopyOutputRequest::CreateRequest( base::Bind(&CopyRequestTestCallback, &called3)); - request->set_source(source1); + request->set_source(kArbitrarySourceId1); factory_->RequestCopyOfSurface(std::move(request)); // Two callbacks are from source1, so the first should be called.
diff --git a/cc/test/data/blending_and_filter.png b/cc/test/data/blending_and_filter.png index f231475f3..b816a2b 100644 --- a/cc/test/data/blending_and_filter.png +++ b/cc/test/data/blending_and_filter.png Binary files differ
diff --git a/cc/test/data/blending_render_pass.png b/cc/test/data/blending_render_pass.png index 9186864..c70e81d 100644 --- a/cc/test/data/blending_render_pass.png +++ b/cc/test/data/blending_render_pass.png Binary files differ
diff --git a/cc/test/data/blending_render_pass_mask.png b/cc/test/data/blending_render_pass_mask.png index 21d792a..332d152a9 100644 --- a/cc/test/data/blending_render_pass_mask.png +++ b/cc/test/data/blending_render_pass_mask.png Binary files differ
diff --git a/cc/test/data/blending_transparent.png b/cc/test/data/blending_transparent.png index f98607e4..7f962f3b 100644 --- a/cc/test/data/blending_transparent.png +++ b/cc/test/data/blending_transparent.png Binary files differ
diff --git a/cc/test/data/blending_with_root.png b/cc/test/data/blending_with_root.png index 276df1d7..62373bb 100644 --- a/cc/test/data/blending_with_root.png +++ b/cc/test/data/blending_with_root.png Binary files differ
diff --git a/cc/trees/layer_tree_host_pixeltest_blending.cc b/cc/trees/layer_tree_host_pixeltest_blending.cc index d2eb0a7..d1b179c 100644 --- a/cc/trees/layer_tree_host_pixeltest_blending.cc +++ b/cc/trees/layer_tree_host_pixeltest_blending.cc
@@ -24,7 +24,8 @@ SkBlendMode::kSoftLight, SkBlendMode::kDifference, SkBlendMode::kExclusion, SkBlendMode::kMultiply, SkBlendMode::kHue, SkBlendMode::kSaturation, - SkBlendMode::kColor, SkBlendMode::kLuminosity}; + SkBlendMode::kColor, SkBlendMode::kLuminosity, + SkBlendMode::kDstIn}; SkColor kCSSTestColors[] = { 0xffff0000, // red @@ -180,7 +181,7 @@ int lane_height, scoped_refptr<Layer> background, RenderPassOptions flags) { - const int kLanesCount = kBlendModesCount + 4; + const int kLanesCount = kBlendModesCount + 6; const SkColor kMiscOpaqueColor = 0xffc86464; const SkColor kMiscTransparentColor = 0x80c86464; const SkBlendMode kCoeffBlendMode = SkBlendMode::kScreen; @@ -206,6 +207,12 @@ } else if (i == kBlendModesCount + 3) { blend_mode = kShaderBlendMode; color = kMiscTransparentColor; + } else if (i == kBlendModesCount + 4) { + blend_mode = SkBlendMode::kDstIn; + opacity = 0.5f; + } else if (i == kBlendModesCount + 5) { + blend_mode = SkBlendMode::kDstIn; + color = kMiscTransparentColor; } scoped_refptr<SolidColorLayer> lane = @@ -213,7 +220,8 @@ lane->SetBlendMode(blend_mode); lane->SetOpacity(opacity); lane->SetForceRenderSurfaceForTesting(true); - if (flags & kUseMasks) + // Layers with kDstIn blend mode with a mask is not supported. + if (flags & kUseMasks && blend_mode != SkBlendMode::kDstIn) SetupMaskLayer(lane); if (flags & kUseColorMatrix) { SetupColorMatrix(lane); @@ -226,19 +234,19 @@ const base::FilePath::CharType* expected_path, RenderPassOptions flags) { const int kLaneWidth = 8; - const int kLaneHeight = kLaneWidth * kCSSTestColorsCount; - const int kRootSize = kLaneHeight; + const int kRootWidth = kLaneWidth * (kBlendModesCount + 6); + const int kRootHeight = kLaneWidth * kCSSTestColorsCount; InitializeFromTestCase(type); - scoped_refptr<SolidColorLayer> root = - CreateSolidColorLayer(gfx::Rect(kRootSize, kRootSize), SK_ColorWHITE); + scoped_refptr<SolidColorLayer> root = CreateSolidColorLayer( + gfx::Rect(kRootWidth, kRootHeight), SK_ColorWHITE); scoped_refptr<Layer> background = - CreateColorfulBackdropLayer(kRootSize, kRootSize); + CreateColorfulBackdropLayer(kRootWidth, kRootHeight); background->SetIsRootForIsolatedGroup(true); root->AddChild(background); - CreateBlendingColorLayers(kLaneWidth, kLaneHeight, background.get(), flags); + CreateBlendingColorLayers(kLaneWidth, kRootHeight, background.get(), flags); this->force_antialiasing_ = (flags & kUseAntialiasing); this->force_blending_with_shaders_ = (flags & kForceShaders);
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc index 481a370..ca0f858 100644 --- a/cc/trees/layer_tree_impl.cc +++ b/cc/trees/layer_tree_impl.cc
@@ -1868,32 +1868,37 @@ const Functor& func, FindClosestMatchingLayerState* state) { // We want to iterate from front to back when hit testing. - for (auto* layer : base::Reversed(*root_layer->layer_tree_impl())) { - if (!func(layer)) - continue; + { + base::ElapsedTimer timer; + for (auto* layer : base::Reversed(*root_layer->layer_tree_impl())) { + if (!func(layer)) + continue; - float distance_to_intersection = 0.f; - bool hit = false; - if (layer->Is3dSorted()) - hit = - PointHitsLayer(layer, screen_space_point, &distance_to_intersection); - else - hit = PointHitsLayer(layer, screen_space_point, nullptr); + float distance_to_intersection = 0.f; + bool hit = false; + if (layer->Is3dSorted()) + hit = PointHitsLayer(layer, screen_space_point, + &distance_to_intersection); + else + hit = PointHitsLayer(layer, screen_space_point, nullptr); - if (!hit) - continue; + if (!hit) + continue; - bool in_front_of_previous_candidate = - state->closest_match && - layer->GetSortingContextId() == - state->closest_match->GetSortingContextId() && - distance_to_intersection > - state->closest_distance + std::numeric_limits<float>::epsilon(); + bool in_front_of_previous_candidate = + state->closest_match && + layer->GetSortingContextId() == + state->closest_match->GetSortingContextId() && + distance_to_intersection > + state->closest_distance + std::numeric_limits<float>::epsilon(); - if (!state->closest_match || in_front_of_previous_candidate) { - state->closest_distance = distance_to_intersection; - state->closest_match = layer; + if (!state->closest_match || in_front_of_previous_candidate) { + state->closest_distance = distance_to_intersection; + state->closest_match = layer; + } } + UMA_HISTOGRAM_COUNTS("Compositing.LayerTreeImpl.FindClosestMatchingLayerUs", + timer.Elapsed().InMicroseconds()); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java index 359271c..0cb16ccc 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java
@@ -877,12 +877,16 @@ } } - // LayoutTabs may be running their own animations; make sure they are done. + // LayoutTabs may be running their own animations; make sure they are done. This should + // not block the completion state of the layout animations in general. Particularly, a tab + // could be driving theme changes (and therefore fade animations) that are not critical to + // the browser's UI. https://crbug.com/627066 + boolean layoutTabsFinished = true; for (int i = 0; mLayoutTabs != null && i < mLayoutTabs.length; i++) { - finished &= mLayoutTabs[i].onUpdateAnimation(time); + layoutTabsFinished &= mLayoutTabs[i].onUpdateAnimation(time); } - if (!finished) requestUpdate(); + if (!finished || !layoutTabsFinished) requestUpdate(); return finished; }
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_bg.xtb b/chrome/android/java/strings/translations/android_chrome_strings_bg.xtb index 0648bc4..d9ea2b47 100644 --- a/chrome/android/java/strings/translations/android_chrome_strings_bg.xtb +++ b/chrome/android/java/strings/translations/android_chrome_strings_bg.xtb
@@ -10,7 +10,7 @@ <translation id="1121094540300013208">Отчети за употребата и сигнали за сривове</translation> <translation id="1137305377394488060">последния час</translation> <translation id="1145536944570833626">Изтриване на съществуващите данни.</translation> -<translation id="1146678959555564648">Вход във Виртуална реалност</translation> +<translation id="1146678959555564648">Вход във VR</translation> <translation id="1178581264944972037">Пауза</translation> <translation id="1181037720776840403">Премахване</translation> <translation id="1197267115302279827">Преместване на отметки</translation>
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_ca.xtb b/chrome/android/java/strings/translations/android_chrome_strings_ca.xtb index 93bf5d1..3951dd4 100644 --- a/chrome/android/java/strings/translations/android_chrome_strings_ca.xtb +++ b/chrome/android/java/strings/translations/android_chrome_strings_ca.xtb
@@ -10,7 +10,7 @@ <translation id="1121094540300013208">Informes d'ús i d'error</translation> <translation id="1137305377394488060">de l'última hora</translation> <translation id="1145536944570833626">Suprimeix les dades existents.</translation> -<translation id="1146678959555564648">Activa el mode d'RV</translation> +<translation id="1146678959555564648">Activa el mode RV</translation> <translation id="1178581264944972037">Pausa</translation> <translation id="1181037720776840403">Suprimeix</translation> <translation id="1197267115302279827">Mou les adreces d'interès</translation>
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_cs.xtb b/chrome/android/java/strings/translations/android_chrome_strings_cs.xtb index a576ffb..3010e25 100644 --- a/chrome/android/java/strings/translations/android_chrome_strings_cs.xtb +++ b/chrome/android/java/strings/translations/android_chrome_strings_cs.xtb
@@ -10,7 +10,7 @@ <translation id="1121094540300013208">Zprávy o využití a selhání</translation> <translation id="1137305377394488060">z uplynulé hodiny</translation> <translation id="1145536944570833626">Smazat existující data.</translation> -<translation id="1146678959555564648">Zapnout virt. realitu</translation> +<translation id="1146678959555564648">Zapnout VR</translation> <translation id="1178581264944972037">Pozastavit</translation> <translation id="1181037720776840403">Odebrat</translation> <translation id="1197267115302279827">Přesunutí záložek</translation>
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_es.xtb b/chrome/android/java/strings/translations/android_chrome_strings_es.xtb index 9a72916..d4154afa 100644 --- a/chrome/android/java/strings/translations/android_chrome_strings_es.xtb +++ b/chrome/android/java/strings/translations/android_chrome_strings_es.xtb
@@ -765,7 +765,7 @@ <translation id="8951232171465285730">Chrome te ha permitido ahorrar <ph name="MEGABYTES" /> MB</translation> <translation id="8959122750345127698">No se puede realizar la navegación: <ph name="URL" /></translation> <translation id="8979340629087822094">último día</translation> -<translation id="8981454092730389528">Controles de actividad de Google</translation> +<translation id="8981454092730389528">Controles de la actividad de tu cuenta de Google</translation> <translation id="8986494364107987395">Enviar automáticamente estadísticas de uso e informes sobre fallos a Google</translation> <translation id="8993760627012879038">Abre una nueva pestaña en modo incógnito</translation> <translation id="8998729206196772491">Estás iniciando sesión con una cuenta administrada por <ph name="MANAGED_DOMAIN" />, lo que significa que vas a proporcionar a su administrador el control sobre tus datos de Chrome. Los datos se vincularán de forma permanente a esta cuenta. Si cierras sesión en Chrome, se eliminarán los datos de este dispositivo, pero permanecerán almacenados en tu cuenta de Google.</translation>
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_it.xtb b/chrome/android/java/strings/translations/android_chrome_strings_it.xtb index 2c253c9c..cdc2e83 100644 --- a/chrome/android/java/strings/translations/android_chrome_strings_it.xtb +++ b/chrome/android/java/strings/translations/android_chrome_strings_it.xtb
@@ -10,7 +10,7 @@ <translation id="1121094540300013208">Rapporti sull'utilizzo e sugli arresti anomali</translation> <translation id="1137305377394488060">ultima ora</translation> <translation id="1145536944570833626">Elimina dati esistenti.</translation> -<translation id="1146678959555564648">Inserisci realtà virtuale</translation> +<translation id="1146678959555564648">Entra nella VR</translation> <translation id="1178581264944972037">Pausa</translation> <translation id="1181037720776840403">Rimuovi</translation> <translation id="1197267115302279827">Sposta i Preferiti</translation>
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_iw.xtb b/chrome/android/java/strings/translations/android_chrome_strings_iw.xtb index 9dc51be..dea84027 100644 --- a/chrome/android/java/strings/translations/android_chrome_strings_iw.xtb +++ b/chrome/android/java/strings/translations/android_chrome_strings_iw.xtb
@@ -10,7 +10,7 @@ <translation id="1121094540300013208">דוחות קריסה ושימוש</translation> <translation id="1137305377394488060">מהשעה האחרונה</translation> <translation id="1145536944570833626">מחק נתונים קיימים.</translation> -<translation id="1146678959555564648">כניסה למציאות מדומה</translation> +<translation id="1146678959555564648">כניסה למצב VR</translation> <translation id="1178581264944972037">השהה</translation> <translation id="1181037720776840403">הסר</translation> <translation id="1197267115302279827">העבר סימניות</translation>
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_ko.xtb b/chrome/android/java/strings/translations/android_chrome_strings_ko.xtb index 575036b..d0a04472 100644 --- a/chrome/android/java/strings/translations/android_chrome_strings_ko.xtb +++ b/chrome/android/java/strings/translations/android_chrome_strings_ko.xtb
@@ -10,7 +10,7 @@ <translation id="1121094540300013208">사용 및 비정상 종료 보고서</translation> <translation id="1137305377394488060">지난 1시간</translation> <translation id="1145536944570833626">기존 데이터 삭제</translation> -<translation id="1146678959555564648">가상 현실 시작</translation> +<translation id="1146678959555564648">VR 시작</translation> <translation id="1178581264944972037">일시중지</translation> <translation id="1181037720776840403">삭제</translation> <translation id="1197267115302279827">북마크 이동</translation>
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_ru.xtb b/chrome/android/java/strings/translations/android_chrome_strings_ru.xtb index e2781c9..599719b2 100644 --- a/chrome/android/java/strings/translations/android_chrome_strings_ru.xtb +++ b/chrome/android/java/strings/translations/android_chrome_strings_ru.xtb
@@ -10,7 +10,7 @@ <translation id="1121094540300013208">Отчеты об использовании и сбоях</translation> <translation id="1137305377394488060">последний час</translation> <translation id="1145536944570833626">Удалить сохраненные данные.</translation> -<translation id="1146678959555564648">Войти в вирт. реальность</translation> +<translation id="1146678959555564648">Войти в режим VR</translation> <translation id="1178581264944972037">Пауза</translation> <translation id="1181037720776840403">Удалить</translation> <translation id="1197267115302279827">Переместить закладки</translation>
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_tr.xtb b/chrome/android/java/strings/translations/android_chrome_strings_tr.xtb index ec86c631..f1ed74b 100644 --- a/chrome/android/java/strings/translations/android_chrome_strings_tr.xtb +++ b/chrome/android/java/strings/translations/android_chrome_strings_tr.xtb
@@ -10,7 +10,7 @@ <translation id="1121094540300013208">Kullanım ve kilitlenme raporları</translation> <translation id="1137305377394488060">son 1 saat</translation> <translation id="1145536944570833626">Mevcut verileri silin.</translation> -<translation id="1146678959555564648">Sanal Gerçekliğe Gir</translation> +<translation id="1146678959555564648">VR'ye Gir</translation> <translation id="1178581264944972037">Duraklat</translation> <translation id="1181037720776840403">Kaldır</translation> <translation id="1197267115302279827">Yer işaretlerini taşı</translation>
diff --git a/chrome/app/resources/generated_resources_bg.xtb b/chrome/app/resources/generated_resources_bg.xtb index 255488e..5ff0c27 100644 --- a/chrome/app/resources/generated_resources_bg.xtb +++ b/chrome/app/resources/generated_resources_bg.xtb
@@ -1867,7 +1867,7 @@ <translation id="3341703758641437857">Да се разреши достъп до URL адресите на файловете</translation> <translation id="3344786168130157628">Име на точката за достъп:</translation> <translation id="3345886924813989455">Не е открит поддържан браузър</translation> -<translation id="3346734205185115290">Разрешаване на сърфирането с очила за виртуална реалност, ако се поддържа от това устройство.</translation> +<translation id="3346734205185115290">Разрешаване на сърфирането с очила за VR, ако се поддържа от това устройство.</translation> <translation id="3347086966102161372">К&опиране на адреса на изображението</translation> <translation id="3348038390189153836">Установено бе изваждащо се устройство</translation> <translation id="3348459612390503954">Поздравления</translation> @@ -6219,7 +6219,7 @@ <translation id="9183836083779743117"><ph name="DOWNLOAD_RECEIVED" /> от <ph name="DOWNLOAD_DOMAIN" />, <ph name="TIME_LEFT" /></translation> <translation id="9184146175870444618">Налага приемателите на събитията „touchstart“ и първото „touchmove“ при превъртане да се третират като пасивни при бързо прекарване с пръст.</translation> <translation id="9186729806195986201">Също така връщане към предишната инсталирана версия на <ph name="IDS_SHORT_PRODUCT_NAME" />.</translation> -<translation id="9187651461283037651">Активиране на режима за виртуална реалност в Chrome.</translation> +<translation id="9187651461283037651">Активиране на режима за VR в Chrome.</translation> <translation id="9188441292293901223">Моля, актуализирайте телефона си до по-нова версия на Android, за да отключите този <ph name="DEVICE_TYPE" />.</translation> <translation id="9189690067274055051">Отключете телефона си и го приближете до своя <ph name="DEVICE_TYPE" />, за да влезете.</translation> <translation id="9190063653747922532">L2TP/IPSec с предварително споделен ключ</translation>
diff --git a/chrome/app/resources/generated_resources_bn.xtb b/chrome/app/resources/generated_resources_bn.xtb index 509bff7..538b08a 100644 --- a/chrome/app/resources/generated_resources_bn.xtb +++ b/chrome/app/resources/generated_resources_bn.xtb
@@ -6156,7 +6156,7 @@ <translation id="9109122242323516435">জায়গা খালি করার জন্য, ডিভাইসের সঞ্চয়স্থান থেকে ফাইল মুছুন।</translation> <translation id="9110990317705400362">আমরা ক্রমাগত আপনার ব্রাউজ করা নিরাপদ করতে উপায় খুঁজছি৷ পূর্বে, যে কোনো ওয়েবসাইট আপনার ব্রাউজারে একটি এক্সটেনশান যোগ করার অনুরোধ জানাতে পারত৷ Google Chrome এর সাম্প্রতিক সংস্করণে, আপনাকে অবশ্যই Chrome কে স্পষ্টভাবে বলতে হবে যে আপনি এক্সটেনশানগুলির পৃষ্ঠার মাধ্যমে তাদের যোগ করে এই এক্সটেনশানগুলি ইনস্টল করতে চান৷ <ph name="BEGIN_LINK" />আরো জানুন<ph name="END_LINK" /></translation> <translation id="9111102763498581341">আনলক</translation> -<translation id="9111296877637560526">এই বিকল্পটি সক্ষম করলে ওয়েব অ্যাপ্লিকেশানগুলি পরীক্ষামূলক ভার্চুয়াল রিয়েলিটি API গুলি অ্যাক্সেস করার অনুমোদন পায়।</translation> +<translation id="9111296877637560526">এই বিকল্পটি সক্ষম করলে ওয়েব অ্যাপ্লিকেশানগুলি পরীক্ষামূলক ভার্চুয়াল রিয়ালিটি API গুলি অ্যাক্সেস করার অনুমোদন পায়।</translation> <translation id="9111395131601239814"><ph name="NETWORKDEVICE" />: <ph name="STATUS" /></translation> <translation id="9112614144067920641">দয়া করে একটি নতুন পিন চয়ন করুন৷</translation> <translation id="9112748030372401671">আপনার ওয়ালপেপার পরিবর্তন করুন</translation>
diff --git a/chrome/app/resources/generated_resources_cs.xtb b/chrome/app/resources/generated_resources_cs.xtb index 38885cc..01e9ddc 100644 --- a/chrome/app/resources/generated_resources_cs.xtb +++ b/chrome/app/resources/generated_resources_cs.xtb
@@ -1869,7 +1869,7 @@ <translation id="3341703758641437857">Umožnit přístup k adresám URL souborů</translation> <translation id="3344786168130157628">Název přístupového bodu:</translation> <translation id="3345886924813989455">Nebyl nalezen žádný podporovaný prohlížeč</translation> -<translation id="3346734205185115290">Povolit procházení s náhlavní soupravou pro virtuální realitu (pokud je pro toto zařízení k dispozici).</translation> +<translation id="3346734205185115290">Povolit procházení s VR brýlemi, pokud jsou pro toto zařízení k dispozici.</translation> <translation id="3347086966102161372">K&opírovat adresu obrázku</translation> <translation id="3348038390189153836">Bylo zjištěno vyměnitelné zařízení</translation> <translation id="3348459612390503954">Gratulujeme</translation> @@ -3313,7 +3313,7 @@ <translation id="529175790091471945">Naformátovat toto zařízení</translation> <translation id="5292890015345653304">Vložte kartu SD nebo paměťovou jednotku USB</translation> <translation id="5294529402252479912">Aktualizovat program Adobe Reader</translation> -<translation id="5297526204711817721">Připojení k tomuto webu není soukromé. Režim virtuální reality můžete kdykoliv ukončit tím, že sejmete náhlavní soupravu a stisknete tlačítko Zpět.</translation> +<translation id="5297526204711817721">Připojení k tomuto webu není soukromé. Režim VR můžete kdykoliv ukončit tím, že sejmete náhlavní soupravu a stisknete tlačítko Zpět.</translation> <translation id="5298219193514155779">Autor motivu</translation> <translation id="5298363578196989456">Rozšíření <ph name="IMPORT_NAME" /> nelze importovat, protože se nejedná o sdílený modul.</translation> <translation id="5299109548848736476">Do Not Track</translation> @@ -6212,7 +6212,7 @@ <translation id="9183836083779743117"><ph name="DOWNLOAD_RECEIVED" /> z <ph name="DOWNLOAD_DOMAIN" />, <ph name="TIME_LEFT" /></translation> <translation id="9184146175870444618">Vynutí, aby posluchač události touchstart a první posluchač události touchmove při rychlém posouvání byly považovány za pasivní.</translation> <translation id="9186729806195986201">Také obnovit předchozí nainstalovanou verzi aplikace <ph name="IDS_SHORT_PRODUCT_NAME" /></translation> -<translation id="9187651461283037651">Povolit v Chromu virtuální realitu</translation> +<translation id="9187651461283037651">Povolit režim Chrome VR</translation> <translation id="9188441292293901223">Chcete-li odemknout toto zařízení <ph name="DEVICE_TYPE" />, aktualizujte svůj telefon na novější verzi platformy Android.</translation> <translation id="9189690067274055051">Chcete-li zařízení <ph name="DEVICE_TYPE" /> odemknout, umístěte telefon blíže k němu a odemkněte jej.</translation> <translation id="9190063653747922532">L2TP/IPsec + předsdílený klíč</translation>
diff --git a/chrome/app/resources/generated_resources_es-419.xtb b/chrome/app/resources/generated_resources_es-419.xtb index 1891ca5..cd0789b 100644 --- a/chrome/app/resources/generated_resources_es-419.xtb +++ b/chrome/app/resources/generated_resources_es-419.xtb
@@ -3316,7 +3316,7 @@ <translation id="529175790091471945">Formatear este dispositivo</translation> <translation id="5292890015345653304">Inserta una tarjeta SD o una tarjeta de memoria USB.</translation> <translation id="5294529402252479912">Actualizar Adobe Reader ahora</translation> -<translation id="5297526204711817721">Tu conexión a este sitio no es privada. Para salir del modo de realidad virtual en cualquier momento, quita los auriculares y presiona Atrás.</translation> +<translation id="5297526204711817721">Tu conexión a este sitio no es privada. Para salir del modo RV en cualquier momento, quita los auriculares y presiona Atrás.</translation> <translation id="5298219193514155779">Tema creado por</translation> <translation id="5298363578196989456">No se puede importar la extensión "<ph name="IMPORT_NAME" />" porque no es un módulo compartido.</translation> <translation id="5299109548848736476">No realizar seguimiento</translation>
diff --git a/chrome/app/resources/generated_resources_es.xtb b/chrome/app/resources/generated_resources_es.xtb index 030c13b..ed8fa85 100644 --- a/chrome/app/resources/generated_resources_es.xtb +++ b/chrome/app/resources/generated_resources_es.xtb
@@ -4970,7 +4970,7 @@ <translation id="7543908552862239417">Habilitada (Flash baja el volumen cuando se produce una interrupción de otro sonido, experimental)</translation> <translation id="7544853251252956727">Reproducir aleatoriamente</translation> <translation id="7545288882499673859">Estrategia de prescindencia de memoria para la gestión de presión avanzada</translation> -<translation id="7545415673537747415">Controla cómo utiliza Google tu historial de navegación para personalizar la Búsqueda, los anuncios y otros servicios en la página <ph name="BEGIN_LINK" />Controles de actividad de Google<ph name="END_LINK" />.</translation> +<translation id="7545415673537747415">Controla cómo utiliza Google tu historial de navegación para personalizar la Búsqueda, los anuncios y otros servicios en la página <ph name="BEGIN_LINK" />Controles de la actividad de tu cuenta de Google<ph name="END_LINK" />.</translation> <translation id="7547317915858803630">Advertencia: la configuración de <ph name="PRODUCT_NAME" /> se almacena en una unidad de red, lo que puede provocar ralentizaciones, fallos e incluso pérdidas de datos.</translation> <translation id="7547811415869834682">Holandés</translation> <translation id="7548856833046333824">Cóctel</translation>
diff --git a/chrome/app/resources/generated_resources_fa.xtb b/chrome/app/resources/generated_resources_fa.xtb index fa06b11..fc70898 100644 --- a/chrome/app/resources/generated_resources_fa.xtb +++ b/chrome/app/resources/generated_resources_fa.xtb
@@ -6160,7 +6160,7 @@ <translation id="9109122242323516435">برای آزاد کردن فضا، فایلها را در حافظه دستگاه حذف کنید.</translation> <translation id="9110990317705400362">همواره به دنبال راههایی هستیم تا مرورتان را ایمنتر کنیم. قبلاً هر وبسایتی از شما میخواست برنامهافزودنیای را در مرورگرتان اضافه کنید. در جدیدترین نسخه Google Chrome، باید به Chrome صراحتاً بگویید که میخواهید با افزودن این برنامههای افزودنی از طریق صفحه افزونهها آنها را نصب کنید. <ph name="BEGIN_LINK" />بیشتر بدانید<ph name="END_LINK" /></translation> <translation id="9111102763498581341">باز کردن قفل</translation> -<translation id="9111296877637560526">با فعالکردن این گزینه، برنامههای وب میتوانند به رابطهای Virtual Reality APIs آزمایشی دسترسی پیدا کنند.</translation> +<translation id="9111296877637560526">با فعالکردن این گزینه، برنامههای وب میتوانند به رابطهای واقعیت مجازی (Virtual Reality APIs) آزمایشی دسترسی پیدا کنند.</translation> <translation id="9111395131601239814"><ph name="NETWORKDEVICE" />: <ph name="STATUS" /></translation> <translation id="9112614144067920641">لطفاً یک پین جدید انتخاب کنید.</translation> <translation id="9112748030372401671">تغییر کاغذدیواری</translation>
diff --git a/chrome/app/resources/generated_resources_hi.xtb b/chrome/app/resources/generated_resources_hi.xtb index 25ac98dcb..b749e65c 100644 --- a/chrome/app/resources/generated_resources_hi.xtb +++ b/chrome/app/resources/generated_resources_hi.xtb
@@ -6161,7 +6161,7 @@ <translation id="9109122242323516435">स्पेस खाली करने के लिए, डिवाइस की जगह से फ़ाइलों को हटाएं.</translation> <translation id="9110990317705400362">हम आपकी ब्राउज़िंग को सुरक्षित रखने के तरीकों पर लगातार कार्य कर रहे हैं. पूर्व में, कोई भी वेबसाइट आपको अपने ब्राउज़र में एक्सटेंशन जोड़ने के लिए संकेत दे सकती थी. Google Chrome के नवीनतम संस्करणों में, आपको एक्सटेंशन पेज के माध्यम से इन एक्सटेंशन को जोड़कर Chrome को स्पष्ट रूप से बताना होगा कि आप इन्हें इंस्टॉल करना चाहते हैं. <ph name="BEGIN_LINK" />और जानें<ph name="END_LINK" /></translation> <translation id="9111102763498581341">अनलॉक करें</translation> -<translation id="9111296877637560526">इस विकल्प को सक्षम करने से वेब ऐप्लिकेशन, प्रयोगात्मक Virtual Reality API ऐक्सेस कर सकेंगे.</translation> +<translation id="9111296877637560526">इस विकल्प को सक्षम करने से वेब ऐप्लिकेशन, प्रयोगात्मक आभासी वास्तविकता API ऐक्सेस कर सकेंगे.</translation> <translation id="9111395131601239814"><ph name="NETWORKDEVICE" />: <ph name="STATUS" /></translation> <translation id="9112614144067920641">कृपया नया पिन चुनें.</translation> <translation id="9112748030372401671">अपना वॉलपेपर बदलें</translation>
diff --git a/chrome/app/resources/generated_resources_it.xtb b/chrome/app/resources/generated_resources_it.xtb index d7faa9fe..7ec1bcc 100644 --- a/chrome/app/resources/generated_resources_it.xtb +++ b/chrome/app/resources/generated_resources_it.xtb
@@ -6146,7 +6146,7 @@ <translation id="9109122242323516435">Per liberare spazio, elimina i file dallo spazio di archiviazione del dispositivo.</translation> <translation id="9110990317705400362">Cerchiamo costantemente nuovi modi per rendere più sicura la navigazione. In passato, qualsiasi sito web poteva chiederti di aggiungere un'estensione nel browser. Nelle ultime versioni di Google Chrome, devi indicare esplicitamente a Chrome di voler installare le estensioni aggiungendole tramite la pagina Estensioni. <ph name="BEGIN_LINK" />Ulteriori informazioni<ph name="END_LINK" /></translation> <translation id="9111102763498581341">Sblocca</translation> -<translation id="9111296877637560526">L'attivazione di questa opzione consente alle applicazioni web di accedere alle API sperimentali Virtual Reality.</translation> +<translation id="9111296877637560526">L'attivazione di questa opzione consente alle applicazioni web di accedere alle API sperimentali di realtà virtuale.</translation> <translation id="9111395131601239814"><ph name="NETWORKDEVICE" />: <ph name="STATUS" /></translation> <translation id="9112614144067920641">Scegli un nuovo PIN.</translation> <translation id="9112748030372401671">Modifica dello sfondo</translation>
diff --git a/chrome/app/resources/generated_resources_iw.xtb b/chrome/app/resources/generated_resources_iw.xtb index 1de8d9e..2571063 100644 --- a/chrome/app/resources/generated_resources_iw.xtb +++ b/chrome/app/resources/generated_resources_iw.xtb
@@ -1864,7 +1864,7 @@ <translation id="3341703758641437857">אפשר גישה לכתובות אתרים של קבצים</translation> <translation id="3344786168130157628">שם נקודת הגישה:</translation> <translation id="3345886924813989455">לא נמצא דפדפן נתמך</translation> -<translation id="3346734205185115290">התר גלישה עם התקן מציאות מדומה, אם האפשרות זמינה למכשיר הזה.</translation> +<translation id="3346734205185115290">התר גלישה עם משקפי VR, אם האפשרות זמינה למכשיר הזה.</translation> <translation id="3347086966102161372">העתק כתובת &תמונה</translation> <translation id="3348038390189153836">זוהה התקן נשלף</translation> <translation id="3348459612390503954">ברכותינו</translation> @@ -6205,7 +6205,7 @@ <translation id="9183836083779743117"><ph name="DOWNLOAD_RECEIVED" /> מ-<ph name="DOWNLOAD_DOMAIN" />, <ph name="TIME_LEFT" /></translation> <translation id="9184146175870444618">כופה התייחסות אל touchstart, ואל touchmove ראשון בכל מעבד אירוע גלילה במהלך הנפה, כאל פסיביים.</translation> <translation id="9186729806195986201">כמו כן, חזור לגרסה המותקנת הקודמת של <ph name="IDS_SHORT_PRODUCT_NAME" />.</translation> -<translation id="9187651461283037651">הפעל את Chrome VR.</translation> +<translation id="9187651461283037651">הפעל את מצב VR של Chrome.</translation> <translation id="9188441292293901223">עדכן את הטלפון לגרסה חדשה יותר של Android כדי לבטל את הנעילה של <ph name="DEVICE_TYPE" /> זה.</translation> <translation id="9189690067274055051">בטל את נעילת הטלפון וקרב אותו אל ה-<ph name="DEVICE_TYPE" /> כדי להיכנס.</translation> <translation id="9190063653747922532">L2TP/IPSec + מפתח משותף מראש</translation>
diff --git a/chrome/app/resources/generated_resources_ml.xtb b/chrome/app/resources/generated_resources_ml.xtb index 6698e8aa..9b1b11c 100644 --- a/chrome/app/resources/generated_resources_ml.xtb +++ b/chrome/app/resources/generated_resources_ml.xtb
@@ -5,7 +5,7 @@ <translation id="1005274289863221750">നിങ്ങളുടെ മൈക്രോഫോണും ക്യാമറയും ഉപയോഗിക്കുക</translation> <translation id="1007233996198401083">കണക്റ്റുചെയ്യാൻ കഴിയില്ല.</translation> <translation id="1007408791287232274">ഉപകരണങ്ങൾ ലോഡുചെയ്യാനായില്ല.</translation> -<translation id="1010366937854368312">അധിക പ്രവേശനക്ഷമത സവിശേഷതകൾ ചേർക്കുക</translation> +<translation id="1010366937854368312">അധിക ഉപയോഗസഹായി സവിശേഷതകൾ ചേർക്കുക</translation> <translation id="1010833424573920260">{NUM_PAGES,plural, =1{പേജ് പ്രതികരിക്കുന്നില്ല}other{പേജുകൾ പ്രതികരിക്കുന്നില്ല}}</translation> <translation id="1012794136286421601">നിങ്ങളുടെ ഡോക്സ്, ഷീറ്റുകൾ, സ്ലൈഡുകൾ, ഡ്രോയിംഗ് ഫയലുകൾ എന്നിവ സമന്വയിപ്പിക്കുന്നു. അവ ഓൺലൈനിലോ ഓഫ്ലൈനിലോ ആക്സസ്സുചെയ്യുന്നതിന് Google ഡ്രൈവ് അപ്ലിക്കേഷൻ തുറക്കുക.</translation> <translation id="1013707859758800957">ഈ പേജിൽ പ്രവർത്തിക്കാൻ സാൻഡ്ബോക്സുചെയ്യാത്ത പ്ലഗിൻ അനുവദിച്ചിരിക്കുന്നു.</translation> @@ -142,7 +142,7 @@ <translation id="1187722533808055681">നിഷ്ക്രിയാവസ്ഥയിൽ നിന്ന് സജീവമാകൽ</translation> <translation id="1188807932851744811">ലോഗ് അപ്ലോഡുചെയ്തില്ല.</translation> <translation id="1189039156354786998">വീഡിയോ സ്ട്രീം ചെയ്യൽ ബ്ലോക്കുചെയ്തു</translation> -<translation id="1189418886587279221">നിങ്ങളുടെ ഉപകരണം ഉപയോഗിക്കുന്നത് എളുപ്പമാക്കുന്നതിന് പ്രവേശനക്ഷമത സവിശേഷതകൾ പ്രവർത്തനക്ഷമമാക്കുക.</translation> +<translation id="1189418886587279221">നിങ്ങളുടെ ഉപകരണം ഉപയോഗിക്കുന്നത് എളുപ്പമാക്കുന്നതിന് ഉപയോഗസഹായി സവിശേഷതകൾ പ്രവർത്തനക്ഷമമാക്കുക.</translation> <translation id="1190144681599273207">ഈ ഫയൽ ലഭ്യമാക്കുന്നതിന് ഏകദേശം <ph name="FILE_SIZE" /> മൊബൈൽ ഡാറ്റ ഉപയോഗിക്കും.</translation> <translation id="11901918071949011">{NUM_FILES,plural, =1{നിങ്ങളുടെ കമ്പ്യൂട്ടറിൽ സംഭരിച്ചിരിക്കുന്ന ഒരു ഫയൽ ആക്സസ് ചെയ്യുക}other{നിങ്ങളുടെ കമ്പ്യൂട്ടറിൽ സംഭരിച്ചിരിക്കുന്ന # ഫയലുകൾ ആക്സസ് ചെയ്യുക}}</translation> <translation id="1190596385362128063">കാലിബ്രേറ്റുചെയ്യുക</translation> @@ -803,7 +803,7 @@ <translation id="2045969484888636535">കുക്കികളെ തടയുന്നത് തുടരുക</translation> <translation id="204622017488417136">നിങ്ങളുടെ ഉപകരണം Chrome-ന്റെ മുമ്പ് ഇൻസ്റ്റാളുചെയ്ത പതിപ്പിലേക്ക് മടങ്ങും. എല്ലാ ഉപയോക്തൃ അക്കൗണ്ടുകളും പ്രാദേശിക ഡാറ്റയും നീക്കംചെയ്യും. ഇത് പഴയപടിയാക്കാനാകില്ല.</translation> <translation id="2048182445208425546">നിങ്ങളുടെ നെറ്റ്വർക്ക് ട്രാഫിക്ക് ആക്സസ്സുചെയ്യുക</translation> -<translation id="2049137146490122801">നിങ്ങളുടെ പ്രാമാണികന് നിങ്ങളുടെ മെഷീനിലുള്ള ലോക്കല് ഫയലുകളിലേക്കുള്ള ആക്സസ്സ് അപ്രാപ്തമാക്കി.</translation> +<translation id="2049137146490122801">നിങ്ങളുടെ ഓതന്റിക്കേറ്റർ നിങ്ങളുടെ മെഷീനിലുള്ള ലോക്കല് ഫയലുകളിലേക്കുള്ള ആക്സസ്സ് അപ്രാപ്തമാക്കി.</translation> <translation id="204914487372604757">കുറുക്കുവഴി സൃഷ്ടിക്കുക </translation> <translation id="2049639323467105390">ഈ ഉപകരണം നിയന്ത്രിക്കുന്നത് <ph name="DOMAIN" /> ആണ്.</translation> <translation id="2050339315714019657">ഛായാചിത്രം</translation> @@ -1352,7 +1352,7 @@ <translation id="2737755522130570180">document.write വഴി ലോഡുചെയ്ത സ്ക്രിപ്റ്റുകൾ ബ്ലോക്കുചെയ്യുക</translation> <translation id="2738771556149464852">അതിനുശേഷമല്ല</translation> <translation id="2739191690716947896">ഡീബഗ് ചെയ്യുക</translation> -<translation id="2739240477418971307">നിങ്ങളുടെ പ്രവേശനക്ഷമത ക്രമീകരണങ്ങൾ മാറ്റുക</translation> +<translation id="2739240477418971307">നിങ്ങളുടെ ഉപയോഗസഹായി ക്രമീകരണങ്ങൾ മാറ്റുക</translation> <translation id="2739842825616753233">ഒരു സൈറ്റിന് നിങ്ങളുടെ ക്യാമറയും മൈക്രോഫോണും ആക്സസ്സ് ചെയ്യേണ്ടതായി വരുമ്പോൾ ആവശ്യപ്പെടുക (ശുപാർശ ചെയ്യുന്നു)</translation> <translation id="2740393541869613458">സൂപ്പർവൈസുചെയ്ത ഉപയോക്താവ് സന്ദർശിച്ച വെബ്സൈറ്റുകളും ഒപ്പം ഇനിപ്പറയുന്നതും അവലോകനം ചെയ്യുക</translation> <translation id="274309227508543018">പേജുകളെ പശ്ചാത്തലത്തിൽ ഡൗൺലോഡുചെയ്യുന്നത് പ്രവർത്തനക്ഷമമാക്കുന്നു.</translation> @@ -1363,7 +1363,7 @@ <translation id="2749756011735116528"><ph name="PRODUCT_NAME" /> എന്നതിലേയ്ക്ക് സൈൻ ഇൻ ചെയ്യുക</translation> <translation id="2749881179542288782">സ്പെല്ലിംഗിനൊപ്പം വ്യാകരണവും പരിശോധിക്കുക</translation> <translation id="2750634961926122990">ഹോസ്റ്റ്നെയിം പ്രകാരം പൊരുത്തപ്പെടുത്തുക</translation> -<translation id="2755367719610958252">പ്രവേശനക്ഷമതാ ഫീച്ചറുകൾ മാനേജുചെയ്യുക</translation> +<translation id="2755367719610958252">ഉപയോഗസഹായി ഫീച്ചറുകൾ മാനേജുചെയ്യുക</translation> <translation id="275662540872599901">സ്ക്രീൻ ഓഫാണ്</translation> <translation id="2756798847867733934">SIM കാര്ഡ് അപ്രാപ്തമാക്കി</translation> <translation id="2765217105034171413">ചെറുത്</translation> @@ -2120,7 +2120,7 @@ <translation id="3649138363871392317">ഫോട്ടോ എടുത്തു</translation> <translation id="3650242103421962931">ലീനിയർ</translation> <translation id="3653999333232393305">നിങ്ങളുടെ മൈക്രോഫോൺ ആക്സസ്സുചെയ്യാൻ <ph name="HOST" /> എന്നതിനെ അനുവദിക്കുന്നത് തുടരുക</translation> -<translation id="3654045516529121250">നിങ്ങളുടെ പ്രവേശനക്ഷമത ക്രമീകരണങ്ങൾ റീഡുചെയ്യുക</translation> +<translation id="3654045516529121250">നിങ്ങളുടെ ഉപയോഗസഹായി ക്രമീകരണങ്ങൾ റീഡുചെയ്യുക</translation> <translation id="3655712721956801464">{NUM_FILES,plural, =1{ഇതിന് ഒരു ഫയലിലേക്ക് ശാശ്വതമായ ആക്സസ്സ് ഉണ്ട്.}other{ഇതിന് # ഫയലുകളിലേക്ക് ശാശ്വതമായ ആക്സസ്സ് ഉണ്ട്.}}</translation> <translation id="365793796291733849"><ph name="BEGIN_PARAGRAPH1" />നിങ്ങൾ സ്വയമേവയുള്ള ബായ്ക്കപ്പ് ഓണാക്കുമ്പോൾ, Google ഡ്രൈവിലെ ഒരു സ്വകാര്യ ഫോൾഡറിൽ ഉപകരണവും ആപ്പ് വിവരങ്ങളും ഇടയ്ക്കിടെ സംരക്ഷിക്കും. ആപ്പ് വിവരങ്ങൾ എന്നത് കോൺടാക്റ്റുകൾ, സന്ദേശങ്ങൾ, ഫോട്ടോകൾ എന്നിവ പോലുള്ള രഹസ്യസ്വഭാവമുള്ളതാകാൻ സാധ്യതയുള്ള വിവരങ്ങൾ ഉൾപ്പെടെ, ആപ്പ് സംരക്ഷിച്ചിട്ടുള്ള ഏതൊരു വിവരവും (ഡെവലപ്പർ ക്രമീകരണം അടിസ്ഥാനമാക്കി) ആകാം.<ph name="END_PARAGRAPH1" /> <ph name="BEGIN_PARAGRAPH2" />ബായ്ക്കപ്പ് ഡാറ്റയെ നിങ്ങളുടെ Drive storage ക്വാട്ടയിൽ കണക്കാക്കുന്നതല്ല. വലിയ ഫയലുകളോ സേവനത്തിൽ ഉൾപ്പെടുത്തേണ്ടെന്ന് ഡെവലപ്പർമാർ തീരുമാനിച്ചിട്ടുള്ള ഫയലുകളോ ബായ്ക്കപ്പെടുക്കില്ല.<ph name="END_PARAGRAPH2" /></translation> @@ -2303,7 +2303,7 @@ റെക്കോർഡ് ചെയ്ത ട്രെയ്സുകൾ മികച്ച രീതിയിൽ വിവരിക്കുന്ന ലേബൽ തിരഞ്ഞെടുക്കുക. ഇത് ട്രെയ്സുകൾ അപ്ലോഡ് ചെയ്തിരിക്കുന്ന ലക്ഷ്യസ്ഥാനങ്ങൾ തിരഞ്ഞെടുക്കും. ഉറപ്പില്ലെങ്കിൽ, മറ്റൊന്ന് തിരഞ്ഞെടുക്കുക. ശൂന്യമായി വിട്ടാൽ, ട്രെയ്സുകളൊന്നും അപ്ലോഡ് ചെയ്യുന്നതല്ല.</translation> <translation id="3890527239261066592">HTTP-യെ എല്ലായ്പ്പോഴും ന്യൂട്രൽ എന്ന് അടയാളപ്പെടുത്തുക</translation> <translation id="3892414795099177503">OpenVPN / L2TP ചേർക്കുക...</translation> -<translation id="3893536212201235195">നിങ്ങളുടെ പ്രവേശനക്ഷമതയുടെ ക്രമീകരണങ്ങൾ വായിച്ച് മാറ്റുക</translation> +<translation id="3893536212201235195">നിങ്ങളുടെ ഉപയോഗസഹായിയുടെ ക്രമീകരണങ്ങൾ വായിച്ച് മാറ്റുക</translation> <translation id="3893630138897523026">ChromeVox (സ്പോക്കൺ ഫീഡ്ബാക്ക്)</translation> <translation id="389589731200570180">അതിഥികളുമായി പങ്കിടുക</translation> <translation id="3897092660631435901">മെനു</translation> @@ -2409,7 +2409,7 @@ <translation id="4034042927394659004">കീ തെളിച്ചം കുറയ്ക്കുക</translation> <translation id="4035758313003622889">&ടാസ്ക് മാനേജര്</translation> <translation id="4037084878352560732">കുതിര</translation> -<translation id="4037463823853863991">Android-നായി പ്രവേശനക്ഷമതാ ടാബ് സ്വിച്ചർ പ്രവർത്തനക്ഷമമാക്കുക.</translation> +<translation id="4037463823853863991">Android-നായി ഉപയോഗസഹായി ടാബ് സ്വിച്ചർ പ്രവർത്തനക്ഷമമാക്കുക.</translation> <translation id="4037889604535939429">വ്യക്തിയെ എഡിറ്റുചെയ്യുക</translation> <translation id="40400351611212369">നെറ്റ്വർക്ക് സജീവമാക്കൽ പിശക്</translation> <translation id="4044260751144303020">നിശ്ചിത സ്ഥാനത്തെ ഘടകങ്ങൾക്കായുള്ള സംയോജനം.</translation> @@ -2719,7 +2719,7 @@ <translation id="4505051713979988367">Android ഫോൺ അൺലോക്കുചെയ്ത് വിളിപ്പാടരികെയായിരിക്കുമ്പോൾ, നിങ്ങളുടെ <ph name="DEVICE_TYPE" /> അൺലോക്കുചെയ്യും.</translation> <translation id="4508265954913339219">സജീവമാക്കല് പരാജയപ്പെട്ടു</translation> <translation id="4508345242223896011">സുഗമമായ സ്ക്രോളിംഗ്</translation> -<translation id="450867954911715010">പ്രവേശനക്ഷമത ക്രമീകരണങ്ങൾ</translation> +<translation id="450867954911715010">ഉപയോഗസഹായി ക്രമീകരണങ്ങൾ</translation> <translation id="4508765956121923607">ഉറ&വിടം കാണുക</translation> <translation id="4509017836361568632">ഫോട്ടോ നിരസിക്കുക</translation> <translation id="4513946894732546136">ഫീഡ്ബാക്ക്</translation> @@ -3769,7 +3769,7 @@ <translation id="5869029295770560994">മനസ്സിലായി</translation> <translation id="5869522115854928033">സംരക്ഷിച്ച പാസ്വേഡുകള്</translation> <translation id="5869741316553135824">എല്ലാ Chrome ഉപകരണങ്ങളിലേക്കും സമന്വയിപ്പിക്കാനായി Google പേയ്മെന്റുകളിലേക്ക് ക്രെഡിറ്റ് കാർഡുകൾ അപ്ലോഡുചെയ്യുന്നതിന് ഒരു പുതിയ ഓപ്ഷൻ പ്രവർത്തനക്ഷമമാക്കുന്നു.</translation> -<translation id="5870086504539785141">പ്രവേശനക്ഷമത മെനു അടയ്ക്കുക</translation> +<translation id="5870086504539785141">ഉപയോഗസഹായി മെനു അടയ്ക്കുക</translation> <translation id="5874045675243596003">നിർബന്ധമായി നടപ്പിലാക്കുക (ഞങ്ങൾക്ക് ഹാഷുകൾ നേടാനാവില്ലെങ്കിൽ പരാജയപ്പെടും)</translation> <translation id="5877064549588274448">ചാനൽ മാറ്റി. മാറ്റങ്ങൾ ബാധകമാകാൻ നിങ്ങളുടെ ഉപകരണം പുനരാരംഭിക്കുക.</translation> <translation id="5880247576487732437">ടോക്കൺ ലഭ്യമാണ്</translation> @@ -3895,7 +3895,7 @@ <translation id="6065289257230303064">സര്ട്ടിഫിക്കറ്റ് സബ്ജക്റ്റ് ഡയറക്ടറി ഗുണവിശേഷതകള്</translation> <translation id="6067080187494608396">വേഗത കുറഞ്ഞ UI ആനിമേഷനുകൾ</translation> <translation id="6071181508177083058">പാസ്വേഡ് സ്ഥിരീകരിക്കുക</translation> -<translation id="6073903501322152803">പ്രവേശനക്ഷമതാ ഫീച്ചറുകൾ ചേർക്കുക</translation> +<translation id="6073903501322152803">ഉപയോഗസഹായി ഫീച്ചറുകൾ ചേർക്കുക</translation> <translation id="6074825444536523002">Google ഫോം</translation> <translation id="6075731018162044558">ക്ഷമിക്കണം! ഈ ഉപകരണത്തിനായി ദീർഘകാല API ആക്സസ്സ് ടോക്കൺ നേടുന്നതിൽ സിസ്റ്റം പരാജയപ്പെട്ടു.</translation> <translation id="6075907793831890935"><ph name="HOSTNAME" /> എന്ന പേരിലുള്ള ഉപകരണം ഉപയോഗിച്ച് ഡാറ്റ എക്സ്ചേഞ്ചുചെയ്യുക</translation> @@ -4095,7 +4095,7 @@ <translation id="6341850831632289108">നിങ്ങളുടെ ഭൗതിക ലൊക്കേഷൻ കണ്ടെത്തുക</translation> <translation id="634208815998129842">ടാസ്ക് മാനേജർ</translation> <translation id="6344170822609224263">നെറ്റ്വർക്ക് കണക്ഷനുകളുടെ ലിസ്റ്റ് ആക്സസ്സുചെയ്യുക</translation> -<translation id="6344584046526421554">പരീക്ഷണാത്മക പ്രവേശനക്ഷമതാ ഫീച്ചറുകൾ</translation> +<translation id="6344584046526421554">പരീക്ഷണാത്മക ഉപയോഗസഹായി ഫീച്ചറുകൾ</translation> <translation id="6346310558342052870">ആക്സസ് നിയന്ത്രിതമാണ്</translation> <translation id="6347003977836730270">വിവരബാറിന് പകരമായി നൽകിയ പുതിയ വിവർത്തന ബബിൾ UX പ്രവർത്തനക്ഷമമാക്കുക.</translation> <translation id="6348109281845364640">പ്രിന്റർ സജ്ജമാക്കാനായില്ല</translation> @@ -4559,7 +4559,7 @@ <translation id="6980462514016882061">തിരയലും പരസ്യങ്ങളും മറ്റ് Google സേവനങ്ങളും വ്യക്തിപരമാക്കാൻ, Google നിങ്ങളുടെ ബ്രൗസിംഗ് ചരിത്രം ഉപയോഗിച്ചേക്കാം</translation> <translation id="6980956047710795611">എല്ലാ Chrome OS ഡാറ്റയും പുതിയ പാസ്വേഡിലേക്ക് മൈഗ്രേറ്റ് ചെയ്യുക (മുൻ പാസ്വേഡ് ആവശ്യമുണ്ട്)</translation> -<translation id="6981982820502123353">പ്രവേശനക്ഷമത</translation> +<translation id="6981982820502123353">ഉപയോഗസഹായി</translation> <translation id="6982896539684144327"><ph name="VENDOR_NAME" />-ൽ നിന്നുള്ള പ്രിന്റർ തിരിച്ചറിഞ്ഞു</translation> <translation id="6983783921975806247">രജിസ്ട്രേഡ് OID</translation> <translation id="6983991971286645866">എല്ലാ എഡിറ്റുകളും $1 എന്നതിൽ സംരക്ഷിക്കും.</translation> @@ -4797,7 +4797,7 @@ <translation id="7297443947353982503">ഉപയോക്തൃനാമം/പാസ്വേഡ് ശരിയല്ല അല്ലെങ്കിൽ EAP-പ്രാമാണീകരണം പരാജയപ്പെട്ടു</translation> <translation id="7299337219131431707">അതിഥി ബ്രൗസിംഗ് പ്രവർത്തനക്ഷമമാക്കുക</translation> <translation id="7299441085833132046"><ph name="BEGIN_LINK" />സഹായം<ph name="END_LINK" /></translation> -<translation id="7303492016543161086">സിസ്റ്റം മെനുവിൽ പ്രവേശനക്ഷമത ഓപ്ഷനുകൾ കാണിക്കുക</translation> +<translation id="7303492016543161086">സിസ്റ്റം മെനുവിൽ ഉപയോഗസഹായി ഓപ്ഷനുകൾ കാണിക്കുക</translation> <translation id="730515362922783851">ഏതു ഉപകരണം ഉപയോഗിച്ചും പ്രാദേശിക നെറ്റ്വർക്കിലോ ഇന്റർനെറ്റിലോ ഡാറ്റ എക്സ്ചേഞ്ച് ചെയ്യുക</translation> <translation id="7309257895202129721">&നിയന്ത്രണങ്ങള് കാണിക്കുക</translation> <translation id="7311079019872751559">അൺസാൻഡ്ബോക്സ് ചെയ്ത പ്ലഗിൻ ആക്സസ്സ്</translation> @@ -5297,7 +5297,7 @@ <translation id="7986075254672229615">ക്രെഡൻഷ്യൽ മാനേജർ API-യുടെ പരീക്ഷണാത്മക നിർവ്വഹണം പ്രവർത്തനക്ഷമമാക്കുന്നു. ചെയ്യുന്നകാര്യത്തെക്കുറിച്ച് നിങ്ങൾക്ക് അറിയില്ലെങ്കിൽ ഇത് പ്രവർത്തനക്ഷമമാക്കരുത്.</translation> <translation id="7986295104073916105">സംരക്ഷിച്ച പാസ്വേഡ് ക്രമീകരണം വായിക്കുക, മാറ്റുക</translation> <translation id="7987485481246785146">സൊറാനി കുർദ്ദിഷ് അറബിക് അധിഷ്ഠിത കീബോർഡ്</translation> -<translation id="7988355189918024273">പ്രവേശനക്ഷമത സവിശേഷതകള് സാദ്ധ്യമാക്കുക </translation> +<translation id="7988355189918024273">ഉപയോഗസഹായി സവിശേഷതകള് സാദ്ധ്യമാക്കുക </translation> <translation id="7988930390477596403">നിങ്ങൾ അടുത്ത തവണ ഈ <ph name="DEVICE_TYPE" /> അൺലോക്കുചെയ്യുമ്പോൾ ഇത് സജീവമാകും. Smart Lock ഉപയോഗിച്ച്, പാസ്വേഡില്ലാതെ തന്നെ നിങ്ങളുടെ ഫോൺ ഈ ഉപകരണത്തെ അൺലോക്കുചെയ്യും. Smart Lock പ്രവർത്തനക്ഷമമാക്കുന്നതിന് Bluetooth ഓണാക്കും.</translation> <translation id="7994370417837006925">ഒന്നിലധികം സൈൻ ഇൻ</translation> <translation id="799547531016638432">കുറുക്കുവഴി നീക്കംചെയ്യുക</translation> @@ -5845,7 +5845,7 @@ <translation id="8704521619148782536">ഇത് സാധാരണയിലും കൂടുതൽ സമയമെടുക്കുന്നു. നിങ്ങൾക്ക് കാത്തിരിക്കാം, അല്ലെങ്കിൽ റദ്ദാക്കി പിന്നീട് വീണ്ടും ശ്രമിക്കുക.</translation> <translation id="8704983632490900895">സംരക്ഷിച്ച ഓഫ്ലൈൻ പേജുകളെ മറ്റ് അപ്ലിക്കേഷനുകൾ വഴി പങ്കിടുന്നതിനെ പ്രവർത്തനക്ഷമമാക്കുന്നു.</translation> <translation id="8705331520020532516">സീരിയല് നമ്പര്</translation> -<translation id="8706385129644254954">പ്രവേശനക്ഷമത ടാബ് സ്വിച്ചർ</translation> +<translation id="8706385129644254954">ഉപയോഗസഹായി ടാബ് സ്വിച്ചർ</translation> <translation id="8708000541097332489">പുറത്തുകടക്കുമ്പോൾ മായ്ക്കുക</translation> <translation id="870805141700401153">Microsoft Individual Code Signing</translation> <translation id="8708671767545720562">&കൂടുതൽ വിവരങ്ങൾ</translation>
diff --git a/chrome/app/resources/generated_resources_mr.xtb b/chrome/app/resources/generated_resources_mr.xtb index 919bc2a9..b2abdd8 100644 --- a/chrome/app/resources/generated_resources_mr.xtb +++ b/chrome/app/resources/generated_resources_mr.xtb
@@ -6153,7 +6153,7 @@ <translation id="9109122242323516435">स्थान मोकळे करण्यासाठी, डिव्हाइस संचयामधून फायली हटवा.</translation> <translation id="9110990317705400362">आम्ही आपले ब्राउझिंग सुरक्षित करण्यासाठी सातत्याने मार्ग शोधत आहोत. मागे, आपल्या ब्राउझरमध्ये विस्तार जोडण्यासाठी कोणतीही वेबसाइट आपल्याला सूचित करू शकत होती. Google Chrome च्या नवीनतम आवृत्तीमध्ये, विस्तार पृष्ठाद्वारे ते जोडून हे विस्तार आपण स्थापित करू इच्छित आहात हे आपण Chrome ला स्पष्टपणे सांगणे आवश्यक आहे. <ph name="BEGIN_LINK" />अधिक जाणून घ्या<ph name="END_LINK" /></translation> <translation id="9111102763498581341">अनलॉक करा</translation> -<translation id="9111296877637560526">हा पर्याय सक्षम करण्यामुळे वेब अनुप्रयोगांना प्रायोगिक व्हर्च्युअल वास्तविकता API मध्ये प्रवेश करण्याची अनुमती मिळते.</translation> +<translation id="9111296877637560526">हा पर्याय सक्षम करण्यामुळे वेब अनुप्रयोगांना प्रायोगिक आभासी वास्तविकता API मध्ये प्रवेश करण्याची अनुमती मिळते.</translation> <translation id="9111395131601239814"><ph name="NETWORKDEVICE" />: <ph name="STATUS" /></translation> <translation id="9112614144067920641">कृपया नवीन पिन निवडा.</translation> <translation id="9112748030372401671">आपला वॉलपेपर बदला</translation>
diff --git a/chrome/app/resources/generated_resources_pl.xtb b/chrome/app/resources/generated_resources_pl.xtb index d93bf0bc..f12035c 100644 --- a/chrome/app/resources/generated_resources_pl.xtb +++ b/chrome/app/resources/generated_resources_pl.xtb
@@ -1870,7 +1870,7 @@ <translation id="3341703758641437857">Zezwalaj na dostęp do adresów URL plików</translation> <translation id="3344786168130157628">Nazwa punktu dostępu:</translation> <translation id="3345886924813989455">Nie znaleziono obsługiwanej przeglądarki</translation> -<translation id="3346734205185115290">Zezwól na przeglądanie przy użyciu zestawu do rzeczywistości wirtualnej, jeśli jest to możliwe na tym urządzeniu.</translation> +<translation id="3346734205185115290">Zezwól na przeglądanie przy użyciu zestawu VR, jeśli jest to możliwe na tym urządzeniu.</translation> <translation id="3347086966102161372">K&opiuj adres obrazu</translation> <translation id="3348038390189153836">Wykryto urządzenie wymienne</translation> <translation id="3348459612390503954">Gratulacje</translation> @@ -3317,7 +3317,7 @@ <translation id="529175790091471945">Sformatuj urządzenie</translation> <translation id="5292890015345653304">Włóż kartę SD lub pamięć USB</translation> <translation id="5294529402252479912">Aktualizuj program Adobe Reader teraz</translation> -<translation id="5297526204711817721">Połączenie z tą stroną nie jest prywatne. Aby w dowolnym momencie zamknąć tryb rzeczywistości wirtualnej, zdejmij gogle i naciśnij Wstecz.</translation> +<translation id="5297526204711817721">Połączenie z tą stroną nie jest prywatne. Aby w dowolnym momencie zamknąć tryb VR, zdejmij gogle i naciśnij Wstecz.</translation> <translation id="5298219193514155779">Motyw utworzony przez</translation> <translation id="5298363578196989456">Nie można zaimportować rozszerzenia „<ph name="IMPORT_NAME" />”, ponieważ nie jest to moduł udostępniany.</translation> <translation id="5299109548848736476">Bez śledzenia</translation>
diff --git a/chrome/app/resources/generated_resources_ro.xtb b/chrome/app/resources/generated_resources_ro.xtb index 2d66fd23..12d1907 100644 --- a/chrome/app/resources/generated_resources_ro.xtb +++ b/chrome/app/resources/generated_resources_ro.xtb
@@ -3319,7 +3319,7 @@ <translation id="529175790091471945">Formatează acest dispozitiv</translation> <translation id="5292890015345653304">Introdu un card SD sau un stick de memorie USB</translation> <translation id="5294529402252479912">Actualizează Adobe Reader acum</translation> -<translation id="5297526204711817721">Conexiunea la acest site nu este privată. Pentru a ieși oricând din modul VR, scoate vizualizatorul și apasă pe Înapoi.</translation> +<translation id="5297526204711817721">Conexiunea la acest site nu este privată. Pentru a ieși oricând din modul RV, scoate vizualizatorul și apasă pe Înapoi.</translation> <translation id="5298219193514155779">Temă creată de</translation> <translation id="5298363578196989456">Nu se poate importa extensia „<ph name="IMPORT_NAME" />”, deoarece nu este un modul folosit în comun.</translation> <translation id="5299109548848736476">Nu urmăriți</translation>
diff --git a/chrome/app/resources/generated_resources_te.xtb b/chrome/app/resources/generated_resources_te.xtb index 5d06496..b5edf26 100644 --- a/chrome/app/resources/generated_resources_te.xtb +++ b/chrome/app/resources/generated_resources_te.xtb
@@ -6158,7 +6158,7 @@ <translation id="9109122242323516435">స్థలాన్ని ఖాళీ చేయడానికి, పరికర నిల్వ నుండి ఫైల్లను తొలగించండి.</translation> <translation id="9110990317705400362">మేము మీ బ్రౌజింగ్ను సురక్షితం చేసే మార్గాల కోసం నిరంతరం శోధిస్తున్నాము. గతంలో, ఏ వెబ్సైట్ అయినా మీ బ్రౌజర్కు పొడిగింపుని జోడించడానికి మిమ్మల్ని ప్రాంప్ట్ చేయవచ్చు. Google Chrome తాజా సంస్కరణల్లో, మీరు తప్పనిసరిగా పొడిగింపుల పేజీలో వాటిని జోడించడం ద్వారా ఈ పొడిగింపులను ఇన్స్టాల్ చేయాలనుకుంటున్నట్లు Chromeకి ప్రత్యేకించి తెలియజేయాలి. <ph name="BEGIN_LINK" />మరింత తెలుసుకోండి<ph name="END_LINK" /></translation> <translation id="9111102763498581341">అన్లాక్ చెయ్యి</translation> -<translation id="9111296877637560526">ఈ ఎంపికను ప్రారంభిస్తే ప్రయోగాత్మక వర్చువల్ వాస్తవ APIలను ప్రాప్యత చేయడానికి వెబ్ అనువర్తనాలు అనుమతించబడతాయి.</translation> +<translation id="9111296877637560526">ఈ ఎంపికను ప్రారంభిస్తే ప్రయోగాత్మక వర్చువల్ రియాలిటీ APIలను ప్రాప్యత చేయడానికి వెబ్ అనువర్తనాలు అనుమతించబడతాయి.</translation> <translation id="9111395131601239814"><ph name="NETWORKDEVICE" />: <ph name="STATUS" /></translation> <translation id="9112614144067920641">దయచేసి ఒక క్రొత్త పిన్ ఎంచుకోండి.</translation> <translation id="9112748030372401671">మీ వాల్పేపర్ను మార్చండి</translation>
diff --git a/chrome/app/resources/generated_resources_tr.xtb b/chrome/app/resources/generated_resources_tr.xtb index da988b0d..72cbc0f 100644 --- a/chrome/app/resources/generated_resources_tr.xtb +++ b/chrome/app/resources/generated_resources_tr.xtb
@@ -1871,7 +1871,7 @@ <translation id="3341703758641437857">Dosya URL'lerine erişime izin ver</translation> <translation id="3344786168130157628">Erişim noktası adı:</translation> <translation id="3345886924813989455">Desteklenen tarayıcı bulunamadı</translation> -<translation id="3346734205185115290">Bu cihaz için kullanılabiliyorsa Sanal Gerçeklik başlığıyla göz atmaya izin verin.</translation> +<translation id="3346734205185115290">Bu cihaz için kullanılabiliyorsa VR başlığıyla göz atmaya izin verin.</translation> <translation id="3347086966102161372">Resim adresini k&opyala</translation> <translation id="3348038390189153836">Kaldırılabilir cihaz algılandı</translation> <translation id="3348459612390503954">Tebrikler</translation> @@ -3320,7 +3320,7 @@ <translation id="529175790091471945">Bu cihazı biçimlendir</translation> <translation id="5292890015345653304">SD kart veya USB bellek çubuğu takın</translation> <translation id="5294529402252479912">Adobe Reader'ı şimdi güncelle</translation> -<translation id="5297526204711817721">Bu siteyle bağlantınız gizli değil. Sanal Gerçeklik modundan istediğiniz zaman çıkmak için başlığı çıkarıp Geri düğmesine basın.</translation> +<translation id="5297526204711817721">Bu siteyle bağlantınız gizli değil. VR modundan istediğiniz zaman çıkmak için başlığı çıkarıp Geri düğmesine basın.</translation> <translation id="5298219193514155779">Temayı oluşturan:</translation> <translation id="5298363578196989456">Paylaşılan bir modül olmadığından "<ph name="IMPORT_NAME" />" uzantısı içe aktarılamıyor.</translation> <translation id="5299109548848736476">Do Not Track</translation> @@ -6166,7 +6166,7 @@ <translation id="9109122242323516435">Yer açmak için cihaz depolama alanındaki dosyaları silin.</translation> <translation id="9110990317705400362">Sürekli olarak, web'e daha güvenli göz atabilmenizi sağlamanın yollarını aramaktayız. Önceden, herhangi bir web sitesi, tarayıcınıza uzantı eklemeniz için istekte bulunabiliyordu. Google Chrome'un son sürümlerinde bu uzantıları yüklemek istediğinizi Chrome'a açıkça söylemelisiniz. Bunu yapmak için uzantıları Uzantılar sayfası üzerinden eklemeniz gerekiyor. <ph name="BEGIN_LINK" />Daha fazla bilgi edinin<ph name="END_LINK" /></translation> <translation id="9111102763498581341">Kilidi Aç</translation> -<translation id="9111296877637560526">Bu seçeneğin etkinleştirilmesi web uygulamalarının deneysel Sanal Gerçeklik API'larına erişmesine olanak sağlar.</translation> +<translation id="9111296877637560526">Bu seçeneğin etkinleştirilmesi web uygulamalarının deneysel Sanal Gerçeklik API'lerine erişmesine olanak sağlar.</translation> <translation id="9111395131601239814"><ph name="NETWORKDEVICE" />: <ph name="STATUS" /></translation> <translation id="9112614144067920641">Lütfen yeni bir PIN seçin.</translation> <translation id="9112748030372401671">Duvar kağıdınızı değiştirme</translation>
diff --git a/chrome/app/resources/generated_resources_vi.xtb b/chrome/app/resources/generated_resources_vi.xtb index 102a475..462d650d 100644 --- a/chrome/app/resources/generated_resources_vi.xtb +++ b/chrome/app/resources/generated_resources_vi.xtb
@@ -6166,7 +6166,7 @@ <translation id="9109122242323516435">Để giải phóng dung lượng, hãy xóa tệp khỏi bộ nhớ thiết bị.</translation> <translation id="9110990317705400362">Chúng tôi không ngừng tìm cách để giúp cho quá trình duyệt web của bạn trở nên an toàn hơn. Trước đây, bất kỳ trang web nào cũng có thể nhắc bạn thêm tiện ích vào trình duyệt. Trong các phiên bản mới nhất của Google Chrome, bạn phải cho Chrome biết rõ rằng bạn muốn cài đặt các tiện ích này bằng cách thêm chúng thông qua trang Tiện ích. <ph name="BEGIN_LINK" />Tìm hiểu thêm<ph name="END_LINK" /></translation> <translation id="9111102763498581341">Mở khóa</translation> -<translation id="9111296877637560526">Bật tùy chọn này cho phép các ứng dụng web truy cập API Virtual Reality thử nghiệm.</translation> +<translation id="9111296877637560526">Bật tùy chọn này cho phép các ứng dụng web truy cập API Thực tế ảo thử nghiệm.</translation> <translation id="9111395131601239814"><ph name="NETWORKDEVICE" />: <ph name="STATUS" /></translation> <translation id="9112614144067920641">Vui lòng chọn mã PIN mới.</translation> <translation id="9112748030372401671">Thay đổi hình nền của bạn</translation>
diff --git a/chrome/app/resources/generated_resources_zh-TW.xtb b/chrome/app/resources/generated_resources_zh-TW.xtb index 4f55aca..a24594c 100644 --- a/chrome/app/resources/generated_resources_zh-TW.xtb +++ b/chrome/app/resources/generated_resources_zh-TW.xtb
@@ -606,7 +606,7 @@ <translation id="1747687775439512873">停用 WiMAX</translation> <translation id="174773101815569257">滑鼠游標鎖定</translation> <translation id="174937106936716857">檔案總數</translation> -<translation id="1749854530031883739">在無法最大化的視窗背後的 TouchView (最大化模式) 中顯示灰色視窗背景幕。</translation> +<translation id="1749854530031883739">顯示 TouchView (最大化模式) 中無法最大化的視窗使用的灰色視窗背景幕。</translation> <translation id="175196451752279553">重新開啟已關閉分頁(&E)</translation> <translation id="1753682364559456262">管理封鎖圖片設定...</translation> <translation id="1753905327828125965">最常造訪</translation> @@ -2834,7 +2834,7 @@ <translation id="4669109953235344059">重試</translation> <translation id="4672073213100265975">已啟用:3G</translation> <translation id="4672657274720418656">提取頁面</translation> -<translation id="4673442866648850031">移除觸控筆時開啟觸控筆工具</translation> +<translation id="4673442866648850031">移除觸控筆時取出觸控筆工具</translation> <translation id="4677772697204437347">GPU 記憶體</translation> <translation id="4681930562518940301">在新分頁中開啟原始圖片(&I)</translation> <translation id="4682551433947286597">登入畫面上顯示的桌布。</translation>
diff --git a/chrome/browser/android/vr_shell/BUILD.gn b/chrome/browser/android/vr_shell/BUILD.gn index 4e06340..0d0abfb 100644 --- a/chrome/browser/android/vr_shell/BUILD.gn +++ b/chrome/browser/android/vr_shell/BUILD.gn
@@ -38,6 +38,8 @@ "vr_input_manager.h", "vr_math.cc", "vr_math.h", + "vr_omnibox.cc", + "vr_omnibox.h", "vr_shell.cc", "vr_shell.h", "vr_shell_delegate.cc", @@ -64,6 +66,7 @@ ":vr_shell_jni_headers", "//base", "//cc", + "//components/omnibox/browser", "//components/rappor", "//components/security_state/core", "//content/public/browser",
diff --git a/chrome/browser/android/vr_shell/ui_interface.cc b/chrome/browser/android/vr_shell/ui_interface.cc index 6d021b5..215cfa7a 100644 --- a/chrome/browser/android/vr_shell/ui_interface.cc +++ b/chrome/browser/android/vr_shell/ui_interface.cc
@@ -4,12 +4,18 @@ #include "chrome/browser/android/vr_shell/ui_interface.h" +#include <memory> +#include <utility> + +#include "base/memory/ptr_util.h" +#include "chrome/browser/android/vr_shell/vr_omnibox.h" #include "chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.h" #include "url/gurl.h" namespace vr_shell { -UiInterface::UiInterface(Mode initial_mode, bool fullscreen) { +UiInterface::UiInterface(Mode initial_mode, bool fullscreen) + : omnibox_(base::MakeUnique<VrOmnibox>(this)) { SetMode(initial_mode); SetFullscreen(fullscreen); } @@ -31,6 +37,16 @@ FlushModeState(); } +void UiInterface::HandleOmniboxInput(const base::DictionaryValue& input) { + omnibox_->HandleInput(input); +} + +void UiInterface::SetOmniboxSuggestions( + std::unique_ptr<base::Value> suggestions) { + updates_.Set("suggestions", std::move(suggestions)); + FlushUpdates(); +} + void UiInterface::FlushModeState() { updates_.SetInteger("mode", static_cast<int>(mode_)); updates_.SetBoolean("menuMode", menu_mode_);
diff --git a/chrome/browser/android/vr_shell/ui_interface.h b/chrome/browser/android/vr_shell/ui_interface.h index cc825c3..85b2c862 100644 --- a/chrome/browser/android/vr_shell/ui_interface.h +++ b/chrome/browser/android/vr_shell/ui_interface.h
@@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_ #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_ +#include <memory> + #include "base/macros.h" #include "base/values.h" @@ -12,6 +14,8 @@ namespace vr_shell { +class VrOmnibox; + class UiCommandHandler { public: virtual void SendCommandToUi(const base::Value& value) = 0; @@ -41,6 +45,10 @@ void SetLoadProgress(double progress); void SetURL(const GURL& url); + // Omnibox input and output handling. + void HandleOmniboxInput(const base::DictionaryValue& input); + void SetOmniboxSuggestions(std::unique_ptr<base::Value> suggestions); + // Called by WebUI when starting VR. void OnDomContentsLoaded(); void SetUiCommandHandler(UiCommandHandler* handler); @@ -56,6 +64,8 @@ bool loaded_ = false; base::DictionaryValue updates_; + std::unique_ptr<VrOmnibox> omnibox_; + DISALLOW_COPY_AND_ASSIGN(UiInterface); };
diff --git a/chrome/browser/android/vr_shell/vr_omnibox.cc b/chrome/browser/android/vr_shell/vr_omnibox.cc new file mode 100644 index 0000000..a5e7092 --- /dev/null +++ b/chrome/browser/android/vr_shell/vr_omnibox.cc
@@ -0,0 +1,67 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/android/vr_shell/vr_omnibox.h" + +#include <string> +#include <utility> + +#include "base/strings/string16.h" +#include "chrome/browser/android/vr_shell/ui_interface.h" +#include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" +#include "chrome/browser/profiles/profile_manager.h" +#include "components/omnibox/browser/autocomplete_classifier.h" +#include "components/omnibox/browser/autocomplete_controller.h" +#include "components/omnibox/browser/autocomplete_input.h" + +namespace vr_shell { + +VrOmnibox::VrOmnibox(UiInterface* ui) + : ui_(ui), + profile_(ProfileManager::GetLastUsedProfile()), + autocomplete_controller_(base::MakeUnique<AutocompleteController>( + base::MakeUnique<ChromeAutocompleteProviderClient>(profile_), + this, + AutocompleteClassifier::kDefaultOmniboxProviders)) {} + +VrOmnibox::~VrOmnibox() = default; + +void VrOmnibox::HandleInput(const base::DictionaryValue& dict) { + base::string16 text; + CHECK(dict.GetString("text", &text)); + + // TODO(crbug.com/683344): Scrub and appropriately tune these parameters. + GURL current_url; + size_t cursor_pos = base::string16::npos; + std::string desired_tld; + metrics::OmniboxEventProto::PageClassification page_classification = + metrics::OmniboxEventProto::OTHER; + bool prevent_inline_autocomplete = false; + bool prefer_keyword = false; + bool allow_exact_keyword_match = false; + bool want_asynchronous_matches = true; + bool from_omnibox_focus = false; + + autocomplete_controller_->Start(AutocompleteInput( + text, cursor_pos, desired_tld, current_url, page_classification, + prevent_inline_autocomplete, prefer_keyword, allow_exact_keyword_match, + want_asynchronous_matches, from_omnibox_focus, + ChromeAutocompleteSchemeClassifier(profile_))); +} + +void VrOmnibox::OnResultChanged(bool default_match_changed) { + const AutocompleteResult& result = autocomplete_controller_->result(); + auto suggestions = base::MakeUnique<base::ListValue>(); + + for (const AutocompleteMatch& match : result) { + auto entry = base::MakeUnique<base::DictionaryValue>(); + entry->SetString("description", match.contents); + entry->SetString("url", match.destination_url.spec()); + suggestions->Append(std::move(entry)); + } + + ui_->SetOmniboxSuggestions(std::move(suggestions)); +} + +} // namespace vr_shell
diff --git a/chrome/browser/android/vr_shell/vr_omnibox.h b/chrome/browser/android/vr_shell/vr_omnibox.h new file mode 100644 index 0000000..d4d058a7 --- /dev/null +++ b/chrome/browser/android/vr_shell/vr_omnibox.h
@@ -0,0 +1,41 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_OMNIBOX_H_ +#define CHROME_BROWSER_ANDROID_VR_SHELL_VR_OMNIBOX_H_ + +#include <memory> + +#include "base/macros.h" +#include "base/values.h" +#include "components/omnibox/browser/autocomplete_controller_delegate.h" + +class AutocompleteController; +class Profile; + +namespace vr_shell { + +class UiInterface; + +class VrOmnibox : public AutocompleteControllerDelegate { + public: + explicit VrOmnibox(UiInterface* ui); + ~VrOmnibox() override; + + void HandleInput(const base::DictionaryValue& dict); + + private: + void OnResultChanged(bool default_match_changed) override; + + UiInterface* ui_; + + Profile* profile_; + std::unique_ptr<AutocompleteController> autocomplete_controller_; + + DISALLOW_COPY_AND_ASSIGN(VrOmnibox); +}; + +} // namespace vr_shell + +#endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_OMNIBOX_H_
diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc index 8a0c52a..d02f727 100644 --- a/chrome/browser/android/vr_shell/vr_shell.cc +++ b/chrome/browser/android/vr_shell/vr_shell.cc
@@ -6,6 +6,9 @@ #include <android/native_window_jni.h> +#include <string> +#include <utility> + #include "base/memory/ptr_util.h" #include "base/metrics/histogram_macros.h" #include "base/threading/platform_thread.h" @@ -329,7 +332,8 @@ base::Passed(args->CreateDeepCopy()))); } -void VrShell::DoUiAction(const UiAction action) { +void VrShell::DoUiAction(const UiAction action, + const base::DictionaryValue* arguments) { content::NavigationController& controller = main_contents_->GetController(); switch (action) { case HISTORY_BACK: @@ -346,6 +350,20 @@ case RELOAD: controller.Reload(content::ReloadType::NORMAL, false); break; + case LOAD_URL: { + std::string url_string; + CHECK(arguments->GetString("url", &url_string)); + GURL url(url_string); + // TODO(crbug.com/683344): Sanitize the URL and prefix, and pass the + // proper transition type down from the UI. + controller.LoadURL(url, content::Referrer(), + ui::PageTransition::PAGE_TRANSITION_AUTO_TOPLEVEL, + std::string("")); + break; + } + case OMNIBOX_CONTENT: + html_interface_->HandleOmniboxInput(*arguments); + break; #if defined(ENABLE_VR_SHELL_UI_DEV) case RELOAD_UI: ui_contents_->GetController().Reload(content::ReloadType::NORMAL, false);
diff --git a/chrome/browser/android/vr_shell/vr_shell.h b/chrome/browser/android/vr_shell/vr_shell.h index d979adf..6a4eb6b 100644 --- a/chrome/browser/android/vr_shell/vr_shell.h +++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -52,7 +52,9 @@ RELOAD, ZOOM_OUT, ZOOM_IN, - RELOAD_UI + RELOAD_UI, + LOAD_URL, + OMNIBOX_CONTENT, }; class VrMetricsHelper; @@ -122,7 +124,8 @@ void UpdateScene(const base::ListValue* args); // Perform a UI action triggered by the javascript API. - void DoUiAction(const UiAction action); + void DoUiAction(const UiAction action, + const base::DictionaryValue* arguments); void SetContentCssSize(float width, float height, float dpr); void SetUiCssSize(float width, float height, float dpr);
diff --git a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc index 1cea9df..bf15ceb6 100644 --- a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc +++ b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc
@@ -45,7 +45,7 @@ // external protocol handler because we don't want pages to open them, but // users still can. const ExternalProtocolHandler::BlockState block_state = - ExternalProtocolHandler::GetBlockState(scheme, profile_); + ExternalProtocolHandler::GetBlockState(scheme); switch (block_state) { case ExternalProtocolHandler::DONT_BLOCK: return metrics::OmniboxInputType::URL;
diff --git a/chrome/browser/chrome_site_per_process_browsertest.cc b/chrome/browser/chrome_site_per_process_browsertest.cc index 8e161e6..74de684 100644 --- a/chrome/browser/chrome_site_per_process_browsertest.cc +++ b/chrome/browser/chrome_site_per_process_browsertest.cc
@@ -391,8 +391,8 @@ protocol); } - ExternalProtocolHandler::BlockState GetBlockState(const std::string& scheme, - Profile* profile) override { + ExternalProtocolHandler::BlockState GetBlockState( + const std::string& scheme) override { return ExternalProtocolHandler::DONT_BLOCK; }
diff --git a/chrome/browser/chromeos/app_mode/app_launch_utils.cc b/chrome/browser/chromeos/app_mode/app_launch_utils.cc index a60d4b2..0311b0fa 100644 --- a/chrome/browser/chromeos/app_mode/app_launch_utils.cc +++ b/chrome/browser/chromeos/app_mode/app_launch_utils.cc
@@ -43,6 +43,13 @@ // See comments above. Network is assumed to be online here. return true; } + bool ShouldSkipAppInstallation() override { + // Given that this delegate does not reliably report whether the network is + // ready, avoid making app update checks - this might take a while if + // network is not online. Also, during crash-restart, we should continue + // with the same app version as the restored session. + return true; + } void OnLoadingOAuthFile() override {} void OnInitializingTokenService() override {} void OnInstallingApp() override {}
diff --git a/chrome/browser/chromeos/app_mode/startup_app_launcher.cc b/chrome/browser/chromeos/app_mode/startup_app_launcher.cc index 3142516..ed2177c 100644 --- a/chrome/browser/chromeos/app_mode/startup_app_launcher.cc +++ b/chrome/browser/chromeos/app_mode/startup_app_launcher.cc
@@ -96,14 +96,21 @@ } void StartupAppLauncher::ContinueWithNetworkReady() { - if (!network_ready_handled_) { - network_ready_handled_ = true; - // The network might not be ready when KioskAppManager tries to update - // external cache initially. Update the external cache now that the network - // is ready for sure. - wait_for_crx_update_ = true; - KioskAppManager::Get()->UpdateExternalCache(); + if (network_ready_handled_) + return; + + network_ready_handled_ = true; + + if (delegate_->ShouldSkipAppInstallation()) { + MaybeLaunchApp(); + return; } + + // The network might not be ready when KioskAppManager tries to update + // external cache initially. Update the external cache now that the network + // is ready for sure. + wait_for_crx_update_ = true; + KioskAppManager::Get()->UpdateExternalCache(); } void StartupAppLauncher::StartLoadingOAuthFile() { @@ -188,6 +195,11 @@ return; } + if (delegate_->ShouldSkipAppInstallation()) { + MaybeLaunchApp(); + return; + } + // Update the offline enabled crx cache if the network is ready; // or just install the app. if (delegate_->IsNetworkReady()) @@ -243,11 +255,20 @@ } void StartupAppLauncher::MaybeLaunchApp() { - // Check if the app is offline enabled. const Extension* extension = GetPrimaryAppExtension(); - DCHECK(extension); + // Verify that requred apps are installed. While the apps should be + // present at this point, crash recovery flow skips app installation steps - + // this means that the kiosk app might not yet be downloaded. If that is + // the case, bail out from the app launch. + if (!extension || !AreSecondaryAppsInstalled()) { + OnLaunchFailure(KioskAppLaunchError::UNABLE_TO_LAUNCH); + return; + } + const bool offline_enabled = extensions::OfflineEnabledInfo::IsOfflineEnabled(extension); + // If the app is not offline enabled, make sure the network is ready before + // launching. if (offline_enabled || delegate_->IsNetworkReady()) { BrowserThread::PostTask( BrowserThread::UI,
diff --git a/chrome/browser/chromeos/app_mode/startup_app_launcher.h b/chrome/browser/chromeos/app_mode/startup_app_launcher.h index 49a7f62..0f567b5 100644 --- a/chrome/browser/chromeos/app_mode/startup_app_launcher.h +++ b/chrome/browser/chromeos/app_mode/startup_app_launcher.h
@@ -46,6 +46,10 @@ // Returns true if Internet is online. virtual bool IsNetworkReady() = 0; + // Whether app launch flow can assume all required apps are installed, and + // skip app installation steps. + virtual bool ShouldSkipAppInstallation() = 0; + virtual void OnLoadingOAuthFile() = 0; virtual void OnInitializingTokenService() = 0; virtual void OnInstallingApp() = 0;
diff --git a/chrome/browser/chromeos/login/app_launch_controller.cc b/chrome/browser/chromeos/login/app_launch_controller.cc index 9ba7cd1..62b0e79 100644 --- a/chrome/browser/chromeos/login/app_launch_controller.cc +++ b/chrome/browser/chromeos/login/app_launch_controller.cc
@@ -414,6 +414,10 @@ return app_launch_splash_screen_actor_->IsNetworkReady(); } +bool AppLaunchController::ShouldSkipAppInstallation() { + return false; +} + void AppLaunchController::OnLoadingOAuthFile() { app_launch_splash_screen_actor_->UpdateAppLaunchState( AppLaunchSplashScreenActor::APP_LAUNCH_STATE_LOADING_AUTH_FILE);
diff --git a/chrome/browser/chromeos/login/app_launch_controller.h b/chrome/browser/chromeos/login/app_launch_controller.h index 895846e..c0399a7 100644 --- a/chrome/browser/chromeos/login/app_launch_controller.h +++ b/chrome/browser/chromeos/login/app_launch_controller.h
@@ -101,6 +101,7 @@ // StartupAppLauncher::Delegate overrides: void InitializeNetwork() override; bool IsNetworkReady() override; + bool ShouldSkipAppInstallation() override; void OnLoadingOAuthFile() override; void OnInitializingTokenService() override; void OnInstallingApp() override;
diff --git a/chrome/browser/chromeos/login/signin/oauth2_browsertest.cc b/chrome/browser/chromeos/login/signin/oauth2_browsertest.cc index 94530959..34c07a0 100644 --- a/chrome/browser/chromeos/login/signin/oauth2_browsertest.cc +++ b/chrome/browser/chromeos/login/signin/oauth2_browsertest.cc
@@ -6,7 +6,6 @@ #include <utility> #include "base/macros.h" -#include "base/memory/ptr_util.h" #include "base/message_loop/message_loop.h" #include "base/strings/stringprintf.h" #include "base/synchronization/waitable_event.h" @@ -39,7 +38,6 @@ #include "components/signin/core/browser/profile_oauth2_token_service.h" #include "components/user_manager/user.h" #include "components/user_manager/user_manager.h" -#include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_service.h" #include "content/public/test/browser_test_utils.h" #include "extensions/browser/process_manager.h" @@ -144,28 +142,6 @@ DISALLOW_COPY_AND_ASSIGN(OAuth2LoginManagerStateWaiter); }; -// Blocks a BrowserThread on construction and unblocks it on destruction. -class BrowserThreadBlocker { - public: - explicit BrowserThreadBlocker(content::BrowserThread::ID identifier) - : unblock_event_(new base::WaitableEvent( - base::WaitableEvent::ResetPolicy::MANUAL, - base::WaitableEvent::InitialState::NOT_SIGNALED)) { - content::BrowserThread::PostTask( - identifier, FROM_HERE, - base::Bind(&BlockThreadOnThread, base::Owned(unblock_event_))); - } - ~BrowserThreadBlocker() { unblock_event_->Signal(); } - - private: - // Blocks the target thread until |event| is signaled. - static void BlockThreadOnThread(base::WaitableEvent* event) { event->Wait(); } - - // Owned by the BlockThreadOnThread callback. - base::WaitableEvent* const unblock_event_; - DISALLOW_COPY_AND_ASSIGN(BrowserThreadBlocker); -}; - } // namespace class OAuth2Test : public OobeBaseTest { @@ -388,15 +364,8 @@ // Wait for the session merge to finish. WaitForMergeSessionCompletion(OAuth2LoginManager::SESSION_RESTORE_DONE); } - } +} - OAuth2LoginManager::SessionRestoreStrategy GetSessionRestoreStrategy() { - OAuth2LoginManager* login_manager = - OAuth2LoginManagerFactory::GetInstance()->GetForProfile(profile()); - return login_manager->restore_strategy_; - } - - private: DISALLOW_COPY_AND_ASSIGN(OAuth2Test); }; @@ -536,56 +505,6 @@ user_manager::User::OAUTH2_TOKEN_STATUS_INVALID); } -// Sets up a new user with stored refresh token. -IN_PROC_BROWSER_TEST_F(OAuth2Test, PRE_OverlappingContinueSessionRestore) { - StartNewUserSession(true); -} - -// Tests that ContinueSessionRestore could be called multiple times. -IN_PROC_BROWSER_TEST_F(OAuth2Test, OverlappingContinueSessionRestore) { - SetupGaiaServerForUnexpiredAccount(); - SimulateNetworkOnline(); - - // Waits for login screen to be ready. - content::WindowedNotificationObserver( - chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, - content::NotificationService::AllSources()) - .Wait(); - - // Blocks DB thread to control TokenService::LoadCredentials timing. - std::unique_ptr<BrowserThreadBlocker> db_blocker = - base::MakeUnique<BrowserThreadBlocker>(content::BrowserThread::DB); - - // Signs in as the existing user created in pre test. - EXPECT_TRUE( - TryToLogin(AccountId::FromUserEmailGaiaId(kTestEmail, kTestGaiaId), - kTestAccountPassword)); - - // Session restore should be using the saved tokens. - EXPECT_EQ(OAuth2LoginManager::RESTORE_FROM_SAVED_OAUTH2_REFRESH_TOKEN, - GetSessionRestoreStrategy()); - - // Checks that refresh token is not yet loaded. - ProfileOAuth2TokenService* token_service = - ProfileOAuth2TokenServiceFactory::GetForProfile(profile()); - const std::string account_id = - PickAccountId(profile(), kTestGaiaId, kTestEmail); - EXPECT_FALSE(token_service->RefreshTokenIsAvailable(account_id)); - - // Invokes ContinueSessionRestore multiple times and there should be - // no DCHECK failures. - OAuth2LoginManager* login_manager = - OAuth2LoginManagerFactory::GetInstance()->GetForProfile(profile()); - login_manager->ContinueSessionRestore(); - login_manager->ContinueSessionRestore(); - - // Let go DB thread to finish TokenService::LoadCredentials. - db_blocker.reset(); - - // Session restore can finish normally and token is loaded. - WaitForMergeSessionCompletion(OAuth2LoginManager::SESSION_RESTORE_DONE); - EXPECT_TRUE(token_service->RefreshTokenIsAvailable(account_id)); -} const char kGooglePageContent[] = "<html><title>Hello!</title><script>alert('hello');</script>" @@ -729,11 +648,12 @@ replace_non_google_host.SetHostStr("www.somethingelse.org"); GURL non_google_url = server_url.ReplaceComponents(replace_non_google_host); non_google_page_url_ = non_google_url.Resolve(kRandomPagePath); - } +} - void SetUp() override { - embedded_test_server()->RegisterRequestHandler(base::Bind( - &FakeGoogle::HandleRequest, base::Unretained(&fake_google_))); +void SetUp() override { + embedded_test_server()->RegisterRequestHandler( + base::Bind(&FakeGoogle::HandleRequest, + base::Unretained(&fake_google_))); OAuth2Test::SetUp(); }
diff --git a/chrome/browser/external_protocol/external_protocol_handler.cc b/chrome/browser/external_protocol/external_protocol_handler.cc index 96206ed..d629ddd 100644 --- a/chrome/browser/external_protocol/external_protocol_handler.cc +++ b/chrome/browser/external_protocol/external_protocol_handler.cc
@@ -52,12 +52,11 @@ ExternalProtocolHandler::BlockState GetBlockStateWithDelegate( const std::string& scheme, - ExternalProtocolHandler::Delegate* delegate, - Profile* profile) { + ExternalProtocolHandler::Delegate* delegate) { if (!delegate) - return ExternalProtocolHandler::GetBlockState(scheme, profile); + return ExternalProtocolHandler::GetBlockState(scheme); - return delegate->GetBlockState(scheme, profile); + return delegate->GetBlockState(scheme); } void RunExternalProtocolDialogWithDelegate( @@ -136,8 +135,7 @@ // static ExternalProtocolHandler::BlockState ExternalProtocolHandler::GetBlockState( - const std::string& scheme, - Profile* profile) { + const std::string& scheme) { // If we are being carpet bombed, block the request. if (!g_accept_requests) return BLOCK; @@ -149,36 +147,18 @@ return BLOCK; } - // Check if there are any prefs in the local state. If there are, wipe them, - // and migrate the prefs to the profile. - // TODO(ramyasharma) remove the migration in M61. - PrefService* local_prefs = g_browser_process->local_state(); - PrefService* profile_prefs = profile->GetPrefs(); - if (local_prefs && profile_prefs) { // May be NULL during testing. - DictionaryPrefUpdate local_state_schemas(local_prefs, - prefs::kExcludedSchemes); - DictionaryPrefUpdate update_excluded_schemas_profile( - profile_prefs, prefs::kExcludedSchemes); - if (update_excluded_schemas_profile->empty()) { - // Copy local state to profile state. - for (base::DictionaryValue::Iterator it(*local_state_schemas); - !it.IsAtEnd(); it.Advance()) { - bool is_blocked; - // Discard local state if set to blocked, to reset all users - // stuck in 'Do Nothing' + 'Do Not Open' state back to the default - // prompt state. - if (it.value().GetAsBoolean(&is_blocked) && !is_blocked) - update_excluded_schemas_profile->SetBoolean(it.key(), is_blocked); - } - // TODO(ramyasharma): Clear only if required. - local_prefs->ClearPref(prefs::kExcludedSchemes); - } + // Check the stored prefs. + // TODO(pkasting): This kind of thing should go in the preferences on the + // profile, not in the local state. http://crbug.com/457254 + PrefService* pref = g_browser_process->local_state(); + if (pref) { // May be NULL during testing. + DictionaryPrefUpdate update_excluded_schemas(pref, prefs::kExcludedSchemes); - // Prepopulate the default states each time. - PrepopulateDictionary(update_excluded_schemas_profile.Get()); + // Warm up the dictionary if needed. + PrepopulateDictionary(update_excluded_schemas.Get()); bool should_block; - if (update_excluded_schemas_profile->GetBoolean(scheme, &should_block)) + if (update_excluded_schemas->GetBoolean(scheme, &should_block)) return should_block ? BLOCK : DONT_BLOCK; } @@ -187,18 +167,18 @@ // static void ExternalProtocolHandler::SetBlockState(const std::string& scheme, - BlockState state, - Profile* profile) { + BlockState state) { // Set in the stored prefs. - PrefService* profile_prefs = profile->GetPrefs(); - if (profile_prefs) { // May be NULL during testing. - DictionaryPrefUpdate update_excluded_schemas_profile( - profile_prefs, prefs::kExcludedSchemes); - if (!update_excluded_schemas_profile->empty()) { - if (state == UNKNOWN) - update_excluded_schemas_profile->Remove(scheme, nullptr); - else - update_excluded_schemas_profile->SetBoolean(scheme, (state == BLOCK)); + // TODO(pkasting): This kind of thing should go in the preferences on the + // profile, not in the local state. http://crbug.com/457254 + PrefService* pref = g_browser_process->local_state(); + if (pref) { // May be NULL during testing. + DictionaryPrefUpdate update_excluded_schemas(pref, prefs::kExcludedSchemes); + + if (state == UNKNOWN) { + update_excluded_schemas->Remove(scheme, NULL); + } else { + update_excluded_schemas->SetBoolean(scheme, (state == BLOCK)); } } } @@ -217,14 +197,8 @@ // have parameters unexpected by the external program. std::string escaped_url_string = net::EscapeExternalHandlerValue(url.spec()); GURL escaped_url(escaped_url_string); - - content::WebContents* web_contents = tab_util::GetWebContentsByID( - render_process_host_id, render_view_routing_id); - Profile* profile = nullptr; - if (web_contents) // Maybe NULL during testing. - profile = Profile::FromBrowserContext(web_contents->GetBrowserContext()); BlockState block_state = - GetBlockStateWithDelegate(escaped_url.scheme(), delegate, profile); + GetBlockStateWithDelegate(escaped_url.scheme(), delegate); if (block_state == BLOCK) { if (delegate) delegate->BlockRequest(); @@ -269,6 +243,11 @@ // static void ExternalProtocolHandler::PrepopulateDictionary( base::DictionaryValue* win_pref) { + static bool is_warm = false; + if (is_warm) + return; + is_warm = true; + static const char* const denied_schemes[] = { "afp", "data",
diff --git a/chrome/browser/external_protocol/external_protocol_handler.h b/chrome/browser/external_protocol/external_protocol_handler.h index e70e79bb..99c0f03 100644 --- a/chrome/browser/external_protocol/external_protocol_handler.h +++ b/chrome/browser/external_protocol/external_protocol_handler.h
@@ -14,7 +14,6 @@ class GURL; class PrefRegistrySimple; -class Profile; namespace base { class DictionaryValue; @@ -35,8 +34,7 @@ CreateShellWorker( const shell_integration::DefaultWebClientWorkerCallback& callback, const std::string& protocol) = 0; - virtual BlockState GetBlockState(const std::string& scheme, - Profile* profile) = 0; + virtual BlockState GetBlockState(const std::string& scheme) = 0; virtual void BlockRequest() = 0; virtual void RunExternalProtocolDialog( const GURL& url, @@ -52,12 +50,10 @@ }; // Returns whether we should block a given scheme. - static BlockState GetBlockState(const std::string& scheme, Profile* profile); + static BlockState GetBlockState(const std::string& scheme); // Sets whether we should block a given scheme. - static void SetBlockState(const std::string& scheme, - BlockState state, - Profile* profile); + static void SetBlockState(const std::string& scheme, BlockState state); // Checks to see if the protocol is allowed, if it is whitelisted, // the application associated with the protocol is launched on the io thread,
diff --git a/chrome/browser/external_protocol/external_protocol_handler_unittest.cc b/chrome/browser/external_protocol/external_protocol_handler_unittest.cc index 62e4c31f..e0c29f4d 100644 --- a/chrome/browser/external_protocol/external_protocol_handler_unittest.cc +++ b/chrome/browser/external_protocol/external_protocol_handler_unittest.cc
@@ -6,11 +6,6 @@ #include "base/message_loop/message_loop.h" #include "base/run_loop.h" -#include "chrome/browser/prefs/browser_prefs.h" -#include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_profile.h" -#include "components/prefs/testing_pref_service.h" #include "content/public/test/test_browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -57,8 +52,8 @@ return new FakeExternalProtocolHandlerWorker(callback, protocol, os_state_); } - ExternalProtocolHandler::BlockState GetBlockState(const std::string& scheme, - Profile* profile) override { + ExternalProtocolHandler::BlockState GetBlockState( + const std::string& scheme) override { return block_state_; } @@ -116,19 +111,11 @@ : ui_thread_(BrowserThread::UI, base::MessageLoop::current()), file_thread_(BrowserThread::FILE) {} - void SetUp() override { - file_thread_.Start(); - local_state_.reset(new TestingPrefServiceSimple); - profile_.reset(new TestingProfile()); - chrome::RegisterLocalState(local_state_->registry()); - TestingBrowserProcess::GetGlobal()->SetLocalState(local_state_.get()); - } + void SetUp() override { file_thread_.Start(); } void TearDown() override { // Ensure that g_accept_requests gets set back to true after test execution. ExternalProtocolHandler::PermitLaunchUrl(); - TestingBrowserProcess::GetGlobal()->SetLocalState(nullptr); - local_state_.reset(); } void DoTest(ExternalProtocolHandler::BlockState block_state, @@ -158,9 +145,6 @@ content::TestBrowserThread file_thread_; FakeExternalProtocolHandlerDelegate delegate_; - - std::unique_ptr<TestingPrefServiceSimple> local_state_; - std::unique_ptr<TestingProfile> profile_; }; TEST_F(ExternalProtocolHandlerTest, TestLaunchSchemeBlockedChromeDefault) { @@ -207,56 +191,3 @@ DoTest(ExternalProtocolHandler::UNKNOWN, shell_integration::UNKNOWN_DEFAULT, true, false, false); } - -TEST_F(ExternalProtocolHandlerTest, TestGetBlockStateUnknown) { - ExternalProtocolHandler::BlockState block_state = - ExternalProtocolHandler::GetBlockState("tel", profile_.get()); - ASSERT_EQ(ExternalProtocolHandler::UNKNOWN, block_state); - ASSERT_TRUE(local_state_->GetDictionary(prefs::kExcludedSchemes)->empty()); - ASSERT_FALSE( - profile_->GetPrefs()->GetDictionary(prefs::kExcludedSchemes)->empty()); -} - -TEST_F(ExternalProtocolHandlerTest, TestGetBlockStateDefaultBlock) { - ExternalProtocolHandler::BlockState block_state = - ExternalProtocolHandler::GetBlockState("afp", profile_.get()); - ASSERT_EQ(ExternalProtocolHandler::BLOCK, block_state); - ASSERT_TRUE(local_state_->GetDictionary(prefs::kExcludedSchemes)->empty()); - ASSERT_FALSE( - profile_->GetPrefs()->GetDictionary(prefs::kExcludedSchemes)->empty()); -} - -TEST_F(ExternalProtocolHandlerTest, TestGetBlockStateDefaultDontBlock) { - ExternalProtocolHandler::BlockState block_state = - ExternalProtocolHandler::GetBlockState("mailto", profile_.get()); - ASSERT_EQ(ExternalProtocolHandler::DONT_BLOCK, block_state); - ASSERT_TRUE(local_state_->GetDictionary(prefs::kExcludedSchemes)->empty()); - ASSERT_FALSE( - profile_->GetPrefs()->GetDictionary(prefs::kExcludedSchemes)->empty()); -} - -TEST_F(ExternalProtocolHandlerTest, - TestGetBlockStateLocalBlockStateCopiedAndResetOnProfilePref) { - base::DictionaryValue prefs_local; - prefs_local.SetBoolean("tel", true); - local_state_->Set(prefs::kExcludedSchemes, prefs_local); - ExternalProtocolHandler::BlockState block_state = - ExternalProtocolHandler::GetBlockState("tel", profile_.get()); - ASSERT_EQ(ExternalProtocolHandler::UNKNOWN, block_state); - ASSERT_TRUE(local_state_->GetDictionary(prefs::kExcludedSchemes)->empty()); - ASSERT_FALSE( - profile_->GetPrefs()->GetDictionary(prefs::kExcludedSchemes)->empty()); -} - -TEST_F(ExternalProtocolHandlerTest, - TestGetBlockStateLocalDontBlockCopiedAsIsToProfilePref) { - base::DictionaryValue prefs_local; - prefs_local.SetBoolean("tel", false); - local_state_->Set(prefs::kExcludedSchemes, prefs_local); - ExternalProtocolHandler::BlockState block_state = - ExternalProtocolHandler::GetBlockState("tel", profile_.get()); - ASSERT_EQ(ExternalProtocolHandler::DONT_BLOCK, block_state); - ASSERT_TRUE(local_state_->GetDictionary(prefs::kExcludedSchemes)->empty()); - ASSERT_FALSE( - profile_->GetPrefs()->GetDictionary(prefs::kExcludedSchemes)->empty()); -}
diff --git a/chrome/browser/installable/installable_manager.cc b/chrome/browser/installable/installable_manager.cc index 95bffb9c..a9d95f4 100644 --- a/chrome/browser/installable/installable_manager.cc +++ b/chrome/browser/installable/installable_manager.cc
@@ -142,20 +142,27 @@ StartNextTask(); } -InstallableManager::IconProperty& InstallableManager::GetIcon( - const InstallableParams& params) { - return icons_[{params.ideal_primary_icon_size_in_px, - params.minimum_primary_icon_size_in_px}]; +InstallableManager::IconParams InstallableManager::ParamsForPrimaryIcon( + const InstallableParams& params) const { + return std::make_tuple(params.ideal_primary_icon_size_in_px, + params.minimum_primary_icon_size_in_px, + IconPurpose::ANY); } -bool InstallableManager::IsIconFetched(const InstallableParams& params) const { - const auto it = icons_.find({params.ideal_primary_icon_size_in_px, - params.minimum_primary_icon_size_in_px}); +InstallableManager::IconParams InstallableManager::ParamsForBadgeIcon( + const InstallableParams& params) const { + return std::make_tuple(params.ideal_badge_icon_size_in_px, + params.minimum_badge_icon_size_in_px, + IconPurpose::BADGE); +} + +bool InstallableManager::IsIconFetched(const IconParams& params) const { + const auto it = icons_.find(params); return it != icons_.end() && it->second.fetched; } -void InstallableManager::SetIconFetched(const InstallableParams& params) { - GetIcon(params).fetched = true; +void InstallableManager::SetIconFetched(const IconParams& params) { + icons_[params].fetched = true; } InstallableStatusCode InstallableManager::GetErrorCode( @@ -167,11 +174,12 @@ return installable_->error; if (params.fetch_valid_primary_icon) { - IconProperty& icon = GetIcon(params); + IconProperty& icon = icons_[ParamsForPrimaryIcon(params)]; if (icon.error != NO_ERROR_DETECTED) return icon.error; } + // Do not report badge icon's error because badge icon is optional. return NO_ERROR_DETECTED; } @@ -189,17 +197,15 @@ } InstallableStatusCode InstallableManager::icon_error( - const InstallableManager::IconParams& icon_params) { + const IconParams& icon_params) { return icons_[icon_params].error; } -GURL& InstallableManager::icon_url( - const InstallableManager::IconParams& icon_params) { +GURL& InstallableManager::icon_url(const IconParams& icon_params) { return icons_[icon_params].url; } -const SkBitmap* InstallableManager::icon( - const InstallableManager::IconParams& icon_params) { +const SkBitmap* InstallableManager::icon(const IconParams& icon_params) { return icons_[icon_params].icon.get(); } @@ -216,7 +222,10 @@ // b. the resource has been fetched/checked. return manifest_->fetched && (!params.check_installable || installable_->fetched) && - (!params.fetch_valid_primary_icon || IsIconFetched(params)); + (!params.fetch_valid_primary_icon || + IsIconFetched(ParamsForPrimaryIcon(params))) && + (!params.fetch_valid_badge_icon || + IsIconFetched(ParamsForBadgeIcon(params))); } void InstallableManager::Reset() { @@ -236,19 +245,32 @@ const InstallableParams& params = tasks_[0].first; installable_->fetched = true; - SetIconFetched(params); + SetIconFetched(ParamsForPrimaryIcon(params)); + SetIconFetched(ParamsForBadgeIcon(params)); } void InstallableManager::RunCallback(const Task& task, InstallableStatusCode code) { const InstallableParams& params = task.first; - IconProperty& icon = GetIcon(params); + IconProperty null_icon; + IconProperty* primary_icon = &null_icon; + IconProperty* badge_icon = &null_icon; + + if (params.fetch_valid_primary_icon && + base::ContainsKey(icons_, ParamsForPrimaryIcon(params))) + primary_icon = &icons_[ParamsForPrimaryIcon(params)]; + if (params.fetch_valid_badge_icon && + base::ContainsKey(icons_, ParamsForBadgeIcon(params))) + badge_icon = &icons_[ParamsForBadgeIcon(params)]; + InstallableData data = { code, manifest_url(), manifest(), - params.fetch_valid_primary_icon ? icon.url : GURL::EmptyGURL(), - params.fetch_valid_primary_icon ? icon.icon.get() : nullptr, + primary_icon->url, + primary_icon->icon.get(), + badge_icon->url, + badge_icon->icon.get(), params.check_installable ? is_installable() : false}; task.second.Run(data); @@ -279,14 +301,19 @@ return; } - if (!manifest_->fetched) + if (!manifest_->fetched) { FetchManifest(); - else if (params.check_installable && !installable_->fetched) + } else if (params.check_installable && !installable_->fetched) { CheckInstallable(); - else if (params.fetch_valid_primary_icon && !IsIconFetched(params)) - CheckAndFetchBestIcon(); - else + } else if (params.fetch_valid_primary_icon && + !IsIconFetched(ParamsForPrimaryIcon(params))) { + CheckAndFetchBestIcon(ParamsForPrimaryIcon(params)); + } else if (params.fetch_valid_badge_icon && + !IsIconFetched(ParamsForBadgeIcon(params))) { + CheckAndFetchBestIcon(ParamsForBadgeIcon(params)); + } else { NOTREACHED(); + } } void InstallableManager::FetchManifest() { @@ -402,26 +429,35 @@ WorkOnTask(); } -void InstallableManager::CheckAndFetchBestIcon() { +void InstallableManager::CheckAndFetchBestIcon(const IconParams& params) { DCHECK(!manifest().IsEmpty()); - DCHECK(!tasks_.empty()); - const InstallableParams& params = tasks_[0].first; - IconProperty& icon = GetIcon(params); + int ideal_icon_size_in_px = std::get<0>(params); + int minimum_icon_size_in_px = std::get<1>(params); + IconPurpose icon_purpose = std::get<2>(params); + + IconProperty& icon = icons_[params]; icon.fetched = true; + // Filter by icon purpose. + std::vector<content::Manifest::Icon> filtered_icons; + std::copy_if(manifest().icons.begin(), manifest().icons.end(), + std::back_inserter(filtered_icons), + [icon_purpose](const content::Manifest::Icon& icon) { + return base::ContainsValue(icon.purpose, icon_purpose); + }); + GURL icon_url = ManifestIconSelector::FindBestMatchingIcon( - manifest().icons, params.ideal_primary_icon_size_in_px, - params.minimum_primary_icon_size_in_px); + filtered_icons, ideal_icon_size_in_px, minimum_icon_size_in_px); if (icon_url.is_empty()) { icon.error = NO_ACCEPTABLE_ICON; } else { bool can_download_icon = ManifestIconDownloader::Download( - GetWebContents(), icon_url, params.ideal_primary_icon_size_in_px, - params.minimum_primary_icon_size_in_px, - base::Bind(&InstallableManager::OnAppIconFetched, - weak_factory_.GetWeakPtr(), icon_url)); + GetWebContents(), icon_url, ideal_icon_size_in_px, + minimum_icon_size_in_px, + base::Bind(&InstallableManager::OnIconFetched, + weak_factory_.GetWeakPtr(), icon_url, params)); if (can_download_icon) return; icon.error = CANNOT_DOWNLOAD_ICON; @@ -430,11 +466,9 @@ WorkOnTask(); } -void InstallableManager::OnAppIconFetched(const GURL icon_url, - const SkBitmap& bitmap) { - DCHECK(!tasks_.empty()); - const InstallableParams& params = tasks_[0].first; - IconProperty& icon = GetIcon(params); +void InstallableManager::OnIconFetched( + const GURL icon_url, const IconParams& params, const SkBitmap& bitmap) { + IconProperty& icon = icons_[params]; if (!GetWebContents()) return;
diff --git a/chrome/browser/installable/installable_manager.h b/chrome/browser/installable/installable_manager.h index 3906abe..3f50814 100644 --- a/chrome/browser/installable/installable_manager.h +++ b/chrome/browser/installable/installable_manager.h
@@ -7,6 +7,7 @@ #include <map> #include <memory> +#include <tuple> #include <utility> #include <vector> @@ -33,6 +34,14 @@ // |fetch_valid_primary_icon| is true. int minimum_primary_icon_size_in_px = -1; + // The ideal badge icon size to fetch. Used only if + // |fetch_valid_badge_icon| is true. + int ideal_badge_icon_size_in_px = -1; + + // The minimum badge icon size to fetch. Used only if + // |fetch_valid_badge_icon| is true. + int minimum_badge_icon_size_in_px = -1; + // Check whether the site is installable. That is, it has a manifest valid for // a web app and a service worker controlling the manifest start URL and the // current URL. @@ -41,6 +50,10 @@ // Check whether there is a fetchable, non-empty icon in the manifest // conforming to the primary icon size parameters. bool fetch_valid_primary_icon = false; + + // Check whether there is a fetchable, non-empty icon in the manifest + // conforming to the badge icon size parameters. + bool fetch_valid_badge_icon = false; }; // This struct is passed to an InstallableCallback when the InstallableManager @@ -67,6 +80,17 @@ // retrieved, the reason will be in error_code. const SkBitmap* primary_icon; + // Empty if no badge_icon was requested. + const GURL& badge_icon_url; + + // nullptr if the most appropriate badge icon couldn't be determined or + // downloaded. The underlying badge icon is owned by the InstallableManager; + // clients must copy the bitmap if they want to to use it. Since the badge + // icon is optional, no error code is set if it cannot be fetched, and clients + // specifying fetch_valid_badge_icon must check that the bitmap exists before + // using it. + const SkBitmap* badge_icon; + // true if the site has a service worker and a viable web app manifest. If // check_installable was true and the site isn't installable, the reason will // be in error_code. @@ -110,21 +134,25 @@ FRIEND_TEST_ALL_PREFIXES(InstallableManagerBrowserTest, CheckWebapp); using Task = std::pair<InstallableParams, InstallableCallback>; - using IconParams = std::pair<int, int>; + using IconParams = std::tuple<int, int, content::Manifest::Icon::IconPurpose>; struct ManifestProperty; struct InstallableProperty; struct IconProperty; - // Returns the IconProperty matching |params|. Creates if it doesn't exist. - IconProperty& GetIcon(const InstallableParams& params); + // Returns an IconParams object that queries for a primary icon conforming to + // the primary icon size parameters in |params|. + IconParams ParamsForPrimaryIcon(const InstallableParams& params) const; + // Returns an IconParams object that queries for a badge icon conforming to + // the badge icon size parameters in |params|. + IconParams ParamsForBadgeIcon(const InstallableParams& params) const; - // Returns true if the icon sizes in |params| matches any fetched icon. false - // if no icon has been requested yet or there is no match. - bool IsIconFetched(const InstallableParams& params) const; + // Returns true if |params| matches any fetched icon, or false if no icon has + // been requested yet or there is no match. + bool IsIconFetched(const IconParams& params) const; - // Sets the icon parameters in |params| as being fetched. - void SetIconFetched(const InstallableParams& params); + // Sets the icon matching |params| as fetched. + void SetIconFetched(const IconParams& params); // Returns the error code associated with the resources requested in |params|, // or NO_ERROR_DETECTED if there is no error. @@ -169,8 +197,9 @@ void CheckServiceWorker(); void OnDidCheckHasServiceWorker(bool has_service_worker); - void CheckAndFetchBestIcon(); - void OnAppIconFetched(const GURL icon_url, const SkBitmap& bitmap); + void CheckAndFetchBestIcon(const IconParams& params); + void OnIconFetched( + const GURL icon_url, const IconParams& params, const SkBitmap& bitmap); // content::WebContentsObserver overrides void DidFinishNavigation(content::NavigationHandle* handle) override;
diff --git a/chrome/browser/installable/installable_manager_browsertest.cc b/chrome/browser/installable/installable_manager_browsertest.cc index 5ca3466..fa43b1a 100644 --- a/chrome/browser/installable/installable_manager_browsertest.cc +++ b/chrome/browser/installable/installable_manager_browsertest.cc
@@ -14,8 +14,13 @@ #include "chrome/test/base/ui_test_utils.h" #include "net/test/embedded_test_server/embedded_test_server.h" +using IconPurpose = content::Manifest::Icon::IconPurpose; + namespace { +const std::tuple<int, int, IconPurpose> kPrimaryIconParams{144, 144, + IconPurpose::ANY}; + InstallableParams GetManifestParams() { InstallableParams params; params.check_installable = false; @@ -32,7 +37,7 @@ return params; } -InstallableParams GetIconParams() { +InstallableParams GetPrimaryIconParams() { InstallableParams params = GetManifestParams(); params.ideal_primary_icon_size_in_px = 144; params.minimum_primary_icon_size_in_px = 144; @@ -40,6 +45,17 @@ return params; } +InstallableParams GetPrimaryIconAndBadgeIconParams() { + InstallableParams params = GetManifestParams(); + params.ideal_primary_icon_size_in_px = 144; + params.minimum_primary_icon_size_in_px = 144; + params.fetch_valid_primary_icon = true; + params.ideal_badge_icon_size_in_px = 72; + params.minimum_badge_icon_size_in_px = 72; + params.fetch_valid_badge_icon = true; + return params; +} + } // anonymous namespace class CallbackTester { @@ -51,9 +67,12 @@ error_code_ = data.error_code; manifest_url_ = data.manifest_url; manifest_ = data.manifest; - icon_url_ = data.primary_icon_url; + primary_icon_url_ = data.primary_icon_url; if (data.primary_icon) - icon_.reset(new SkBitmap(*data.primary_icon)); + primary_icon_.reset(new SkBitmap(*data.primary_icon)); + badge_icon_url_ = data.badge_icon_url; + if (data.badge_icon) + badge_icon_.reset(new SkBitmap(*data.badge_icon)); is_installable_ = data.is_installable; base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, quit_closure_); } @@ -61,8 +80,10 @@ InstallableStatusCode error_code() const { return error_code_; } const GURL& manifest_url() const { return manifest_url_; } const content::Manifest& manifest() const { return manifest_; } - const GURL& icon_url() const { return icon_url_; } - const SkBitmap* icon() const { return icon_.get(); } + const GURL& primary_icon_url() const { return primary_icon_url_; } + const SkBitmap* primary_icon() const { return primary_icon_.get(); } + const GURL& badge_icon_url() const { return badge_icon_url_; } + const SkBitmap* badge_icon() const { return badge_icon_.get(); } bool is_installable() const { return is_installable_; } private: @@ -70,8 +91,10 @@ InstallableStatusCode error_code_; GURL manifest_url_; content::Manifest manifest_; - GURL icon_url_; - std::unique_ptr<SkBitmap> icon_; + GURL primary_icon_url_; + std::unique_ptr<SkBitmap> primary_icon_; + GURL badge_icon_url_; + std::unique_ptr<SkBitmap> badge_icon_; bool is_installable_; }; @@ -92,9 +115,9 @@ error_code_ = data.error_code; manifest_url_ = data.manifest_url; manifest_ = data.manifest; - icon_url_ = data.primary_icon_url; + primary_icon_url_ = data.primary_icon_url; if (data.primary_icon) - icon_.reset(new SkBitmap(*data.primary_icon)); + primary_icon_.reset(new SkBitmap(*data.primary_icon)); is_installable_ = data.is_installable; manager_->GetData(params_, @@ -105,8 +128,8 @@ void OnDidFinishSecondCheck(const InstallableData& data) { EXPECT_EQ(error_code_, data.error_code); EXPECT_EQ(manifest_url_, data.manifest_url); - EXPECT_EQ(icon_url_, data.primary_icon_url); - EXPECT_EQ(icon_.get(), data.primary_icon); + EXPECT_EQ(primary_icon_url_, data.primary_icon_url); + EXPECT_EQ(primary_icon_.get(), data.primary_icon); EXPECT_EQ(is_installable_, data.is_installable); EXPECT_EQ(manifest_.IsEmpty(), data.manifest.IsEmpty()); EXPECT_EQ(manifest_.start_url, data.manifest.start_url); @@ -124,8 +147,8 @@ InstallableStatusCode error_code_; GURL manifest_url_; content::Manifest manifest_; - GURL icon_url_; - std::unique_ptr<SkBitmap> icon_; + GURL primary_icon_url_; + std::unique_ptr<SkBitmap> primary_icon_; bool is_installable_; }; @@ -208,8 +231,10 @@ // If there is no manifest, everything should be empty. EXPECT_TRUE(tester->manifest().IsEmpty()); EXPECT_TRUE(tester->manifest_url().is_empty()); - EXPECT_TRUE(tester->icon_url().is_empty()); - EXPECT_EQ(nullptr, tester->icon()); + EXPECT_TRUE(tester->primary_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_FALSE(tester->is_installable()); EXPECT_EQ(NO_MANIFEST, tester->error_code()); } @@ -229,8 +254,10 @@ EXPECT_TRUE(tester->manifest().IsEmpty()); EXPECT_FALSE(tester->manifest_url().is_empty()); - EXPECT_TRUE(tester->icon_url().is_empty()); - EXPECT_EQ(nullptr, tester->icon()); + EXPECT_TRUE(tester->primary_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_FALSE(tester->is_installable()); EXPECT_EQ(MANIFEST_EMPTY, tester->error_code()); } @@ -248,8 +275,10 @@ EXPECT_FALSE(tester->manifest().IsEmpty()); EXPECT_FALSE(tester->manifest_url().is_empty()); - EXPECT_TRUE(tester->icon_url().is_empty()); - EXPECT_EQ(nullptr, tester->icon()); + EXPECT_TRUE(tester->primary_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_FALSE(tester->is_installable()); EXPECT_EQ(NO_ERROR_DETECTED, tester->error_code()); } @@ -270,8 +299,10 @@ EXPECT_FALSE(tester->manifest().IsEmpty()); EXPECT_FALSE(tester->manifest_url().is_empty()); - EXPECT_TRUE(tester->icon_url().is_empty()); - EXPECT_EQ(nullptr, tester->icon()); + EXPECT_TRUE(tester->primary_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_FALSE(tester->is_installable()); EXPECT_EQ(NO_ERROR_DETECTED, tester->error_code()); } @@ -293,35 +324,39 @@ EXPECT_FALSE(tester->manifest_url().is_empty()); EXPECT_TRUE(tester->manifest().prefer_related_applications); - EXPECT_TRUE(tester->icon_url().is_empty()); - EXPECT_EQ(nullptr, tester->icon()); + EXPECT_TRUE(tester->primary_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_FALSE(tester->is_installable()); EXPECT_EQ(NO_ERROR_DETECTED, tester->error_code()); } - // Ask for an icon (but don't navigate). This should fail with + // Ask for a primary icon (but don't navigate). This should fail with // NO_ACCEPTABLE_ICON. { base::RunLoop run_loop; std::unique_ptr<CallbackTester> tester( new CallbackTester(run_loop.QuitClosure())); - RunInstallableManager(tester.get(), GetIconParams()); + RunInstallableManager(tester.get(), GetPrimaryIconParams()); run_loop.Run(); EXPECT_FALSE(tester->manifest().IsEmpty()); EXPECT_FALSE(tester->manifest_url().is_empty()); EXPECT_TRUE(tester->manifest().prefer_related_applications); - EXPECT_TRUE(tester->icon_url().is_empty()); - EXPECT_EQ(nullptr, tester->icon()); + EXPECT_TRUE(tester->primary_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_FALSE(tester->is_installable()); EXPECT_EQ(NO_ACCEPTABLE_ICON, tester->error_code()); } - // Ask for everything. This should fail with NO_ACCEPTABLE_ICON - the icon - // fetch has already failed, so that cached error stops the installable check - // from being performed. + // Ask for everything except badge icon. This should fail with + // NO_ACCEPTABLE_ICON - the primary icon fetch has already failed, so that + // cached error stops the installable check from being performed. { base::RunLoop run_loop; std::unique_ptr<CallbackTester> tester( @@ -334,14 +369,16 @@ EXPECT_FALSE(tester->manifest_url().is_empty()); EXPECT_TRUE(tester->manifest().prefer_related_applications); - EXPECT_TRUE(tester->icon_url().is_empty()); - EXPECT_EQ(nullptr, tester->icon()); + EXPECT_TRUE(tester->primary_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_FALSE(tester->is_installable()); EXPECT_EQ(NO_ACCEPTABLE_ICON, tester->error_code()); } - // Ask for a different size icon. This should fail with START_URL_NOT_VALID - // since we won't have a cached icon error. + // Ask for a different size primary icon. This should fail with + // START_URL_NOT_VALID since we won't have a cached icon error. { base::RunLoop run_loop; std::unique_ptr<CallbackTester> tester( @@ -357,35 +394,84 @@ EXPECT_FALSE(tester->manifest_url().is_empty()); EXPECT_TRUE(tester->manifest().prefer_related_applications); - EXPECT_TRUE(tester->icon_url().is_empty()); - EXPECT_EQ(nullptr, tester->icon()); + EXPECT_TRUE(tester->primary_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_FALSE(tester->is_installable()); EXPECT_EQ(START_URL_NOT_VALID, tester->error_code()); } } IN_PROC_BROWSER_TEST_F(InstallableManagerBrowserTest, CheckManifestAndIcon) { - // Add to homescreen checks for manifest + icon. - base::RunLoop run_loop; - std::unique_ptr<CallbackTester> tester( - new CallbackTester(run_loop.QuitClosure())); + // Add to homescreen checks for manifest + primary icon. + { + base::RunLoop run_loop; + std::unique_ptr<CallbackTester> tester( + new CallbackTester(run_loop.QuitClosure())); - NavigateAndRunInstallableManager(tester.get(), GetIconParams(), - "/banners/manifest_test_page.html"); - run_loop.Run(); + NavigateAndRunInstallableManager(tester.get(), GetPrimaryIconParams(), + "/banners/manifest_test_page.html"); + run_loop.Run(); - EXPECT_FALSE(tester->manifest().IsEmpty()); - EXPECT_FALSE(tester->manifest_url().is_empty()); + EXPECT_FALSE(tester->manifest().IsEmpty()); + EXPECT_FALSE(tester->manifest_url().is_empty()); - EXPECT_FALSE(tester->icon_url().is_empty()); - EXPECT_NE(nullptr, tester->icon()); + EXPECT_FALSE(tester->primary_icon_url().is_empty()); + EXPECT_NE(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); + EXPECT_FALSE(tester->is_installable()); + EXPECT_EQ(NO_ERROR_DETECTED, tester->error_code()); + } - EXPECT_FALSE(tester->is_installable()); - EXPECT_EQ(NO_ERROR_DETECTED, tester->error_code()); + // Add to homescreen checks for manifest + primary icon + badge icon. + { + base::RunLoop run_loop; + std::unique_ptr<CallbackTester> tester( + new CallbackTester(run_loop.QuitClosure())); + + RunInstallableManager(tester.get(), GetPrimaryIconAndBadgeIconParams()); + run_loop.Run(); + + EXPECT_FALSE(tester->manifest().IsEmpty()); + EXPECT_FALSE(tester->manifest_url().is_empty()); + + EXPECT_FALSE(tester->primary_icon_url().is_empty()); + EXPECT_NE(nullptr, tester->primary_icon()); + EXPECT_FALSE(tester->badge_icon_url().is_empty()); + EXPECT_NE(nullptr, tester->badge_icon()); + EXPECT_FALSE(tester->is_installable()); + EXPECT_EQ(NO_ERROR_DETECTED, tester->error_code()); + } + + // Request an oversized badge icon. This should fetch only the manifest and + // the primary icon, and return no errors. + { + base::RunLoop run_loop; + std::unique_ptr<CallbackTester> tester( + new CallbackTester(run_loop.QuitClosure())); + + InstallableParams params = GetPrimaryIconAndBadgeIconParams(); + params.ideal_badge_icon_size_in_px = 2000; + params.minimum_badge_icon_size_in_px = 2000; + RunInstallableManager(tester.get(), params); + run_loop.Run(); + + EXPECT_FALSE(tester->manifest().IsEmpty()); + EXPECT_FALSE(tester->manifest_url().is_empty()); + + EXPECT_FALSE(tester->primary_icon_url().is_empty()); + EXPECT_NE(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); + EXPECT_FALSE(tester->is_installable()); + EXPECT_EQ(NO_ERROR_DETECTED, tester->error_code()); + } } IN_PROC_BROWSER_TEST_F(InstallableManagerBrowserTest, CheckWebapp) { - // Request everything. + // Request everything except badge icon. { base::RunLoop run_loop; std::unique_ptr<CallbackTester> tester( @@ -398,8 +484,10 @@ EXPECT_FALSE(tester->manifest().IsEmpty()); EXPECT_FALSE(tester->manifest_url().is_empty()); EXPECT_TRUE(tester->is_installable()); - EXPECT_FALSE(tester->icon_url().is_empty()); - EXPECT_NE(nullptr, tester->icon()); + EXPECT_FALSE(tester->primary_icon_url().is_empty()); + EXPECT_NE(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_EQ(NO_ERROR_DETECTED, tester->error_code()); // Verify that the returned state matches manager internal state. @@ -409,15 +497,16 @@ EXPECT_FALSE(manager->manifest_url().is_empty()); EXPECT_TRUE(manager->is_installable()); EXPECT_EQ(1u, manager->icons_.size()); - EXPECT_FALSE((manager->icon_url({144,144}).is_empty())); - EXPECT_NE(nullptr, (manager->icon({144,144}))); + EXPECT_FALSE((manager->icon_url(kPrimaryIconParams).is_empty())); + EXPECT_NE(nullptr, (manager->icon(kPrimaryIconParams))); EXPECT_EQ(NO_ERROR_DETECTED, manager->manifest_error()); EXPECT_EQ(NO_ERROR_DETECTED, manager->installable_error()); - EXPECT_EQ(NO_ERROR_DETECTED, (manager->icon_error({144,144}))); + EXPECT_EQ(NO_ERROR_DETECTED, (manager->icon_error(kPrimaryIconParams))); EXPECT_TRUE(manager->tasks_.empty()); } - // Request everything again without navigating away. This should work fine. + // Request everything except badge icon again without navigating away. This + // should work fine. { base::RunLoop run_loop; std::unique_ptr<CallbackTester> tester( @@ -429,8 +518,10 @@ EXPECT_FALSE(tester->manifest().IsEmpty()); EXPECT_FALSE(tester->manifest_url().is_empty()); EXPECT_TRUE(tester->is_installable()); - EXPECT_FALSE(tester->icon_url().is_empty()); - EXPECT_NE(nullptr, tester->icon()); + EXPECT_FALSE(tester->primary_icon_url().is_empty()); + EXPECT_NE(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_EQ(NO_ERROR_DETECTED, tester->error_code()); // Verify that the returned state matches manager internal state. @@ -440,11 +531,11 @@ EXPECT_FALSE(manager->manifest_url().is_empty()); EXPECT_TRUE(manager->is_installable()); EXPECT_EQ(1u, manager->icons_.size()); - EXPECT_FALSE((manager->icon_url({144,144}).is_empty())); - EXPECT_NE(nullptr, (manager->icon({144,144}))); + EXPECT_FALSE((manager->icon_url(kPrimaryIconParams).is_empty())); + EXPECT_NE(nullptr, (manager->icon(kPrimaryIconParams))); EXPECT_EQ(NO_ERROR_DETECTED, manager->manifest_error()); EXPECT_EQ(NO_ERROR_DETECTED, manager->installable_error()); - EXPECT_EQ(NO_ERROR_DETECTED, (manager->icon_error({144,144}))); + EXPECT_EQ(NO_ERROR_DETECTED, (manager->icon_error(kPrimaryIconParams))); EXPECT_TRUE(manager->tasks_.empty()); } @@ -476,8 +567,10 @@ // everything should be empty here. EXPECT_TRUE(tester->manifest().IsEmpty()); EXPECT_TRUE(tester->manifest_url().is_empty()); - EXPECT_TRUE(tester->icon_url().is_empty()); - EXPECT_EQ(nullptr, tester->icon()); + EXPECT_TRUE(tester->primary_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_FALSE(tester->is_installable()); EXPECT_EQ(NO_MANIFEST, tester->error_code()); } @@ -498,8 +591,10 @@ EXPECT_FALSE(tester->manifest().IsEmpty()); EXPECT_FALSE(tester->manifest_url().is_empty()); - EXPECT_TRUE(tester->icon_url().is_empty()); - EXPECT_EQ(nullptr, tester->icon()); + EXPECT_TRUE(tester->primary_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_FALSE(tester->is_installable()); EXPECT_EQ(NO_ERROR_DETECTED, tester->error_code()); } @@ -516,8 +611,10 @@ EXPECT_FALSE(tester->manifest().IsEmpty()); EXPECT_FALSE(tester->manifest_url().is_empty()); - EXPECT_TRUE(tester->icon_url().is_empty()); - EXPECT_EQ(nullptr, tester->icon()); + EXPECT_TRUE(tester->primary_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_FALSE(tester->is_installable()); EXPECT_EQ(NO_MATCHING_SERVICE_WORKER, tester->error_code()); } @@ -536,37 +633,43 @@ EXPECT_FALSE(tester->manifest().IsEmpty()); EXPECT_FALSE(tester->manifest_url().is_empty()); + + EXPECT_FALSE(tester->primary_icon_url().is_empty()); + EXPECT_NE(nullptr, tester->primary_icon()); + EXPECT_EQ(144, tester->primary_icon()->width()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_TRUE(tester->is_installable()); - EXPECT_FALSE(tester->icon_url().is_empty()); - ASSERT_NE(nullptr, tester->icon()); - EXPECT_EQ(144, tester->icon()->width()); EXPECT_EQ(NO_ERROR_DETECTED, tester->error_code()); } IN_PROC_BROWSER_TEST_F(InstallableManagerBrowserTest, CheckManifestCorruptedIcon) { - // Verify that the returned InstallableData::icon is null if the web manifest - // points to a corrupt icon. + // Verify that the returned InstallableData::primary_icon is null if the web + // manifest points to a corrupt primary icon. base::RunLoop run_loop; std::unique_ptr<CallbackTester> tester( new CallbackTester(run_loop.QuitClosure())); - NavigateAndRunInstallableManager(tester.get(), GetIconParams(), + NavigateAndRunInstallableManager(tester.get(), GetPrimaryIconParams(), GetURLOfPageWithServiceWorkerAndManifest( "/banners/manifest_bad_icon.json")); run_loop.Run(); EXPECT_FALSE(tester->manifest().IsEmpty()); EXPECT_FALSE(tester->manifest_url().is_empty()); - EXPECT_TRUE(tester->icon_url().is_empty()); - EXPECT_EQ(nullptr, tester->icon()); + EXPECT_TRUE(tester->primary_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_FALSE(tester->is_installable()); EXPECT_EQ(NO_ICON_AVAILABLE, tester->error_code()); } IN_PROC_BROWSER_TEST_F(InstallableManagerBrowserTest, CheckChangeInIconDimensions) { - // Verify that a follow-up request for an icon with a different size works. + // Verify that a follow-up request for a primary icon with a different size + // works. { base::RunLoop run_loop; std::unique_ptr<CallbackTester> tester( @@ -579,8 +682,10 @@ EXPECT_FALSE(tester->manifest_url().is_empty()); EXPECT_FALSE(tester->manifest().IsEmpty()); EXPECT_TRUE(tester->is_installable()); - EXPECT_FALSE(tester->icon_url().is_empty()); - EXPECT_NE(nullptr, tester->icon()); + EXPECT_FALSE(tester->primary_icon_url().is_empty()); + EXPECT_NE(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_EQ(NO_ERROR_DETECTED, tester->error_code()); } @@ -589,8 +694,8 @@ std::unique_ptr<CallbackTester> tester( new CallbackTester(run_loop.QuitClosure())); - // Dial up the icon size requirements to something that isn't available. - // This should now fail with NoIconMatchingRequirements. + // Dial up the primary icon size requirements to something that isn't + // available. This should now fail with NoIconMatchingRequirements. InstallableParams params = GetWebAppParams(); params.ideal_primary_icon_size_in_px = 2000; params.minimum_primary_icon_size_in_px = 2000; @@ -600,13 +705,15 @@ EXPECT_FALSE(tester->manifest_url().is_empty()); EXPECT_FALSE(tester->manifest().IsEmpty()); EXPECT_TRUE(tester->is_installable()); - EXPECT_TRUE(tester->icon_url().is_empty()); - EXPECT_EQ(nullptr, tester->icon()); + EXPECT_TRUE(tester->primary_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_EQ(NO_ACCEPTABLE_ICON, tester->error_code()); } - // Navigate and verify the reverse: an overly large icon requested first - // fails, but a smaller icon requested second passes. + // Navigate and verify the reverse: an overly large primary icon requested + // first fails, but a smaller primary icon requested second passes. { base::RunLoop run_loop; std::unique_ptr<CallbackTester> tester( @@ -623,8 +730,10 @@ EXPECT_FALSE(tester->manifest_url().is_empty()); EXPECT_FALSE(tester->manifest().IsEmpty()); EXPECT_TRUE(tester->is_installable()); - EXPECT_TRUE(tester->icon_url().is_empty()); - EXPECT_EQ(nullptr, tester->icon()); + EXPECT_TRUE(tester->primary_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_EQ(NO_ACCEPTABLE_ICON, tester->error_code()); } @@ -636,12 +745,14 @@ run_loop.Run(); - // The smaller icon requirements should allow this to pass. + // The smaller primary icon requirements should allow this to pass. EXPECT_FALSE(tester->manifest_url().is_empty()); EXPECT_FALSE(tester->manifest().IsEmpty()); EXPECT_TRUE(tester->is_installable()); - EXPECT_FALSE(tester->icon_url().is_empty()); - EXPECT_NE(nullptr, tester->icon()); + EXPECT_FALSE(tester->primary_icon_url().is_empty()); + EXPECT_NE(nullptr, tester->primary_icon()); + EXPECT_TRUE(tester->badge_icon_url().is_empty()); + EXPECT_EQ(nullptr, tester->badge_icon()); EXPECT_EQ(NO_ERROR_DETECTED, tester->error_code()); } }
diff --git a/chrome/browser/installable/installable_manager_unittest.cc b/chrome/browser/installable/installable_manager_unittest.cc index b7ec00c..cf934a48 100644 --- a/chrome/browser/installable/installable_manager_unittest.cc +++ b/chrome/browser/installable/installable_manager_unittest.cc
@@ -26,12 +26,14 @@ manifest.start_url = GURL("http://example.com"); manifest.display = blink::WebDisplayModeStandalone; - content::Manifest::Icon icon; - icon.type = base::ASCIIToUTF16("image/png"); - icon.sizes.push_back(gfx::Size(144, 144)); - icon.purpose.push_back(IconPurpose::ANY); - manifest.icons.push_back(icon); + content::Manifest::Icon primary_icon; + primary_icon.type = base::ASCIIToUTF16("image/png"); + primary_icon.sizes.push_back(gfx::Size(144, 144)); + primary_icon.purpose.push_back(IconPurpose::ANY); + manifest.icons.push_back(primary_icon); + // No need to include the optional badge icon as it does not affect the + // unit tests. return manifest; }
diff --git a/chrome/browser/invalidation/OWNERS b/chrome/browser/invalidation/OWNERS index 9b396653..7f08e5f 100644 --- a/chrome/browser/invalidation/OWNERS +++ b/chrome/browser/invalidation/OWNERS
@@ -1,3 +1,5 @@ dcheng@chromium.org nyquist@chromium.org pavely@chromium.org + +# COMPONENT: Services>Invalidation
diff --git a/chrome/browser/media/android/router/media_router_android.cc b/chrome/browser/media/android/router/media_router_android.cc index 62e132b..9fa7aa6 100644 --- a/chrome/browser/media/android/router/media_router_android.cc +++ b/chrome/browser/media/android/router/media_router_android.cc
@@ -75,12 +75,20 @@ void MediaRouterAndroid::CreateRoute( const MediaSource::Id& source_id, const MediaSink::Id& sink_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, bool incognito) { // TODO(avayvod): Implement timeouts (crbug.com/583036). + if (!origin.is_valid()) { + std::unique_ptr<RouteRequestResult> result = RouteRequestResult::FromError( + "Invalid origin", RouteRequestResult::INVALID_ORIGIN); + for (const MediaRouteResponseCallback& callback : callbacks) + callback.Run(*result); + return; + } + std::string presentation_id = MediaRouterBase::CreatePresentationId(); int tab_id = -1; @@ -103,10 +111,8 @@ base::android::ConvertUTF8ToJavaString(env, sink_id); ScopedJavaLocalRef<jstring> jpresentation_id = base::android::ConvertUTF8ToJavaString(env, presentation_id); - // TODO(crbug.com/685358): Unique origins should not be considered - // same-origin. ScopedJavaLocalRef<jstring> jorigin = - base::android::ConvertUTF8ToJavaString(env, origin.GetURL().spec()); + base::android::ConvertUTF8ToJavaString(env, origin.spec()); Java_ChromeMediaRouter_createRoute(env, java_media_router_, jsource_id, jsink_id, jpresentation_id, jorigin, @@ -116,7 +122,7 @@ void MediaRouterAndroid::ConnectRouteByRouteId( const MediaSource::Id& source, const MediaRoute::Id& route_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, @@ -127,12 +133,20 @@ void MediaRouterAndroid::JoinRoute( const MediaSource::Id& source_id, const std::string& presentation_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, bool incognito) { // TODO(avayvod): Implement timeouts (crbug.com/583036). + if (!origin.is_valid()) { + std::unique_ptr<RouteRequestResult> result = RouteRequestResult::FromError( + "Invalid origin", RouteRequestResult::INVALID_ORIGIN); + for (const MediaRouteResponseCallback& callback : callbacks) + callback.Run(*result); + return; + } + int tab_id = -1; TabAndroid* tab = web_contents ? TabAndroid::FromWebContents(web_contents) : nullptr; @@ -140,7 +154,7 @@ tab_id = tab->GetAndroidId(); DVLOG(2) << "JoinRoute: " << source_id << ", " << presentation_id << ", " - << origin.GetURL().spec() << ", " << tab_id; + << origin.spec() << ", " << tab_id; int request_id = route_requests_.Add(base::MakeUnique<MediaRouteRequest>( MediaSource(source_id), presentation_id, callbacks)); @@ -151,7 +165,7 @@ ScopedJavaLocalRef<jstring> jpresentation_id = base::android::ConvertUTF8ToJavaString(env, presentation_id); ScopedJavaLocalRef<jstring> jorigin = - base::android::ConvertUTF8ToJavaString(env, origin.GetURL().spec()); + base::android::ConvertUTF8ToJavaString(env, origin.spec()); Java_ChromeMediaRouter_joinRoute(env, java_media_router_, jsource_id, jpresentation_id, jorigin, tab_id, @@ -334,7 +348,7 @@ if (it != sinks_observers_.end()) { // TODO(imcheng): Pass origins to OnSinksUpdated (crbug.com/594858). for (auto& observer : *it->second) - observer.OnSinksUpdated(sinks_converted, std::vector<url::Origin>()); + observer.OnSinksUpdated(sinks_converted, std::vector<GURL>()); } }
diff --git a/chrome/browser/media/android/router/media_router_android.h b/chrome/browser/media/android/router/media_router_android.h index b30b4cc..592c953 100644 --- a/chrome/browser/media/android/router/media_router_android.h +++ b/chrome/browser/media/android/router/media_router_android.h
@@ -35,14 +35,14 @@ // MediaRouter implementation. void CreateRoute(const MediaSource::Id& source_id, const MediaSink::Id& sink_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, bool incognito) override; void JoinRoute(const MediaSource::Id& source, const std::string& presentation_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, @@ -50,7 +50,7 @@ void ConnectRouteByRouteId( const MediaSource::Id& source, const MediaRoute::Id& route_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout,
diff --git a/chrome/browser/media/android/router/media_router_dialog_controller_android.cc b/chrome/browser/media/android/router/media_router_dialog_controller_android.cc index 9da67346..44296df5 100644 --- a/chrome/browser/media/android/router/media_router_dialog_controller_android.cc +++ b/chrome/browser/media/android/router/media_router_dialog_controller_android.cc
@@ -53,7 +53,7 @@ // TODO(crbug.com/627655): Support multiple URLs. const MediaSource::Id source_id = presentation_request.GetMediaSources()[0].id(); - const auto& origin = presentation_request.frame_origin(); + const GURL origin = presentation_request.frame_url().GetOrigin(); std::vector<MediaRouteResponseCallback> route_response_callbacks; route_response_callbacks.push_back(
diff --git a/chrome/browser/media/router/BUILD.gn b/chrome/browser/media/router/BUILD.gn index a9c4bfb..5de0f25 100644 --- a/chrome/browser/media/router/BUILD.gn +++ b/chrome/browser/media/router/BUILD.gn
@@ -102,7 +102,6 @@ public_deps = [ "//mojo/common:common_custom_types", - "//url/mojo:url_mojom_origin", ] }
diff --git a/chrome/browser/media/router/create_presentation_connection_request.cc b/chrome/browser/media/router/create_presentation_connection_request.cc index 49eb3ed..9dd49c9 100644 --- a/chrome/browser/media/router/create_presentation_connection_request.cc +++ b/chrome/browser/media/router/create_presentation_connection_request.cc
@@ -6,7 +6,7 @@ #include "chrome/browser/media/router/media_source_helper.h" #include "chrome/browser/media/router/route_request_result.h" -#include "url/origin.h" +#include "url/gurl.h" using content::PresentationSessionInfo; using content::PresentationError; @@ -16,12 +16,10 @@ CreatePresentationConnectionRequest::CreatePresentationConnectionRequest( const RenderFrameHostId& render_frame_host_id, const std::vector<GURL>& presentation_urls, - const url::Origin& frame_origin, + const GURL& frame_url, const PresentationSessionSuccessCallback& success_cb, const PresentationSessionErrorCallback& error_cb) - : presentation_request_(render_frame_host_id, - presentation_urls, - frame_origin), + : presentation_request_(render_frame_host_id, presentation_urls, frame_url), success_cb_(success_cb), error_cb_(error_cb), cb_invoked_(false) {
diff --git a/chrome/browser/media/router/create_presentation_connection_request.h b/chrome/browser/media/router/create_presentation_connection_request.h index dc702af..41e5da49 100644 --- a/chrome/browser/media/router/create_presentation_connection_request.h +++ b/chrome/browser/media/router/create_presentation_connection_request.h
@@ -16,15 +16,13 @@ #include "chrome/browser/media/router/render_frame_host_id.h" #include "content/public/browser/presentation_service_delegate.h" +class GURL; + namespace content { struct PresentationError; struct PresentationSessionInfo; } // namespace content -namespace url { -class Origin; -} // namespace url - namespace media_router { class RouteRequestResult; @@ -44,14 +42,13 @@ content::PresentationSessionErrorCallback; // |presentation_url|: The presentation URL of the request. Must be a valid // URL. - // |frame_origin|: The origin of the frame that initiated the presentation - // request. + // |frame_url|: The URL of the frame that initiated the presentation request. // |success_cb|: Callback to invoke when the request succeeds. Must be valid. // |erorr_cb|: Callback to invoke when the request fails. Must be valid. CreatePresentationConnectionRequest( const RenderFrameHostId& render_frame_host_id, const std::vector<GURL>& presentation_urls, - const url::Origin& frame_origin, + const GURL& frame_url, const PresentationSessionSuccessCallback& success_cb, const PresentationSessionErrorCallback& error_cb); ~CreatePresentationConnectionRequest();
diff --git a/chrome/browser/media/router/create_presentation_connection_request_unittest.cc b/chrome/browser/media/router/create_presentation_connection_request_unittest.cc index 6c373b9f..8e71ecb4 100644 --- a/chrome/browser/media/router/create_presentation_connection_request_unittest.cc +++ b/chrome/browser/media/router/create_presentation_connection_request_unittest.cc
@@ -68,14 +68,14 @@ content::PresentationError error(content::PRESENTATION_ERROR_UNKNOWN, "Unknown error."); CreatePresentationConnectionRequest request( - render_frame_host_id_, presentation_urls_, url::Origin(GURL(kFrameUrl)), + render_frame_host_id_, presentation_urls_, GURL(kFrameUrl), base::Bind(&CreatePresentationConnectionRequestTest::FailOnSuccess, base::Unretained(this)), base::Bind(&CreatePresentationConnectionRequestTest::OnError, base::Unretained(this), error)); - PresentationRequest presentation_request( - render_frame_host_id_, presentation_urls_, url::Origin(GURL(kFrameUrl))); + PresentationRequest presentation_request(render_frame_host_id_, + presentation_urls_, GURL(kFrameUrl)); EXPECT_TRUE(request.presentation_request().Equals(presentation_request)); // Since we didn't explicitly call Invoke*, the error callback will be // invoked when |request| is destroyed. @@ -85,7 +85,7 @@ content::PresentationSessionInfo session_info(presentation_url_, kPresentationId); CreatePresentationConnectionRequest request( - render_frame_host_id_, {presentation_url_}, url::Origin(GURL(kFrameUrl)), + render_frame_host_id_, {presentation_url_}, GURL(kFrameUrl), base::Bind(&CreatePresentationConnectionRequestTest::OnSuccess, base::Unretained(this), session_info), base::Bind(&CreatePresentationConnectionRequestTest::FailOnError, @@ -101,7 +101,7 @@ content::PRESENTATION_ERROR_SESSION_REQUEST_CANCELLED, "This is an error message"); CreatePresentationConnectionRequest request( - render_frame_host_id_, presentation_urls_, url::Origin(GURL(kFrameUrl)), + render_frame_host_id_, presentation_urls_, GURL(kFrameUrl), base::Bind(&CreatePresentationConnectionRequestTest::FailOnSuccess, base::Unretained(this)), base::Bind(&CreatePresentationConnectionRequestTest::OnError,
diff --git a/chrome/browser/media/router/media_router.h b/chrome/browser/media/router/media_router.h index 0f8fd4b..92d6d068 100644 --- a/chrome/browser/media/router/media_router.h +++ b/chrome/browser/media/router/media_router.h
@@ -26,10 +26,6 @@ class WebContents; } -namespace url { -class Origin; -} // namespace url - namespace media_router { class IssuesObserver; @@ -82,7 +78,7 @@ virtual void CreateRoute( const MediaSource::Id& source_id, const MediaSink::Id& sink_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, @@ -104,7 +100,7 @@ virtual void ConnectRouteByRouteId( const MediaSource::Id& source_id, const MediaRoute::Id& route_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, @@ -124,7 +120,7 @@ virtual void JoinRoute( const MediaSource::Id& source, const std::string& presentation_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout,
diff --git a/chrome/browser/media/router/media_router_dialog_controller_unittest.cc b/chrome/browser/media/router/media_router_dialog_controller_unittest.cc index 1baa12e..a8f3d0e7 100644 --- a/chrome/browser/media/router/media_router_dialog_controller_unittest.cc +++ b/chrome/browser/media/router/media_router_dialog_controller_unittest.cc
@@ -70,7 +70,7 @@ new CreatePresentationConnectionRequest( RenderFrameHostId(1, 2), {GURL("http://example.com"), GURL("http://example2.com")}, - url::Origin(GURL("http://google.com")), + GURL("http://google.com"), base::Bind(&MediaRouterDialogControllerTest::RequestSuccess, base::Unretained(this)), base::Bind(&MediaRouterDialogControllerTest::RequestError,
diff --git a/chrome/browser/media/router/media_sinks_observer.cc b/chrome/browser/media/router/media_sinks_observer.cc index e7276fe5..61bb1096f 100644 --- a/chrome/browser/media/router/media_sinks_observer.cc +++ b/chrome/browser/media/router/media_sinks_observer.cc
@@ -16,7 +16,7 @@ MediaSinksObserver::MediaSinksObserver(MediaRouter* router, const MediaSource& source, - const url::Origin& origin) + const GURL& origin) : source_(source), origin_(origin), router_(router), initialized_(false) { DCHECK(router_); } @@ -38,9 +38,8 @@ return initialized_; } -void MediaSinksObserver::OnSinksUpdated( - const std::vector<MediaSink>& sinks, - const std::vector<url::Origin>& origins) { +void MediaSinksObserver::OnSinksUpdated(const std::vector<MediaSink>& sinks, + const std::vector<GURL>& origins) { #if DCHECK_IS_ON() base::AutoReset<bool> reset_in_on_sinks_updated(&in_on_sinks_updated_, true); #endif
diff --git a/chrome/browser/media/router/media_sinks_observer.h b/chrome/browser/media/router/media_sinks_observer.h index 91741ab..5a87f27 100644 --- a/chrome/browser/media/router/media_sinks_observer.h +++ b/chrome/browser/media/router/media_sinks_observer.h
@@ -10,7 +10,7 @@ #include "base/macros.h" #include "chrome/browser/media/router/media_sink.h" #include "chrome/browser/media/router/media_source.h" -#include "url/origin.h" +#include "url/gurl.h" namespace media_router { @@ -28,7 +28,7 @@ // with |source|. MediaSinksObserver(MediaRouter* router, const MediaSource& source, - const url::Origin& origin); + const GURL& origin); virtual ~MediaSinksObserver(); // Registers with MediaRouter to start observing. Must be called before the @@ -42,7 +42,7 @@ // will be invoked with |sinks|. Otherwise, it will be invoked with an empty // list. void OnSinksUpdated(const std::vector<MediaSink>& sinks, - const std::vector<url::Origin>& origins); + const std::vector<GURL>& origins); const MediaSource& source() const { return source_; } @@ -55,7 +55,7 @@ private: const MediaSource source_; - const url::Origin origin_; + const GURL origin_; MediaRouter* const router_; bool initialized_;
diff --git a/chrome/browser/media/router/media_sinks_observer_unittest.cc b/chrome/browser/media/router/media_sinks_observer_unittest.cc index cbcc83a..c5a340c 100644 --- a/chrome/browser/media/router/media_sinks_observer_unittest.cc +++ b/chrome/browser/media/router/media_sinks_observer_unittest.cc
@@ -14,8 +14,9 @@ MockMediaRouter router; MediaSource source( MediaSourceForPresentationUrl(GURL("https://presentation.com"))); - url::Origin origin{GURL("https://origin.com")}; - std::vector<url::Origin> origin_list({origin}); + GURL origin("https://origin.com"); + std::vector<GURL> origin_list; + origin_list.push_back(origin); std::vector<MediaSink> sink_list; sink_list.push_back(MediaSink("sinkId", "Sink", MediaSink::IconType::CAST)); MockMediaSinksObserver observer(&router, source, origin); @@ -24,9 +25,9 @@ observer.OnSinksUpdated(sink_list, origin_list); EXPECT_CALL(observer, OnSinksReceived(SequenceEquals(sink_list))); - observer.OnSinksUpdated(sink_list, std::vector<url::Origin>()); + observer.OnSinksUpdated(sink_list, std::vector<GURL>()); - url::Origin origin2{GURL("https://differentOrigin.com")}; + GURL origin2("https://differentOrigin.com"); origin_list.clear(); origin_list.push_back(origin2); EXPECT_CALL(observer, OnSinksReceived(testing::IsEmpty()));
diff --git a/chrome/browser/media/router/mock_media_router.h b/chrome/browser/media/router/mock_media_router.h index 5fe951b..f2d6ae4f 100644 --- a/chrome/browser/media/router/mock_media_router.h +++ b/chrome/browser/media/router/mock_media_router.h
@@ -16,7 +16,6 @@ #include "chrome/browser/media/router/media_sink.h" #include "chrome/browser/media/router/media_source.h" #include "testing/gmock/include/gmock/gmock.h" -#include "url/origin.h" namespace media_router { @@ -29,7 +28,7 @@ MOCK_METHOD7(CreateRoute, void(const MediaSource::Id& source, const MediaSink::Id& sink_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, @@ -37,7 +36,7 @@ MOCK_METHOD7(JoinRoute, void(const MediaSource::Id& source, const std::string& presentation_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, @@ -45,7 +44,7 @@ MOCK_METHOD7(ConnectRouteByRouteId, void(const MediaSource::Id& source, const MediaRoute::Id& route_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout,
diff --git a/chrome/browser/media/router/mojo/media_router.mojom b/chrome/browser/media/router/mojo/media_router.mojom index 37fc064..e26170d 100644 --- a/chrome/browser/media/router/mojo/media_router.mojom +++ b/chrome/browser/media/router/mojo/media_router.mojom
@@ -5,7 +5,6 @@ module media_router.mojom; import "mojo/common/time.mojom"; -import "url/mojo/origin.mojom"; // Represents an output sink to which media can be routed. struct MediaSink { @@ -171,7 +170,7 @@ CreateRoute(string media_source, string sink_id, string original_presentation_id, - url.mojom.Origin origin, + string origin, int32 tab_id, mojo.common.mojom.TimeDelta timeout, bool incognito) => @@ -199,7 +198,7 @@ // occurred. JoinRoute(string media_source, string presentation_id, - url.mojom.Origin origin, + string origin, int32 tab_id, mojo.common.mojom.TimeDelta timeout, bool incognito) => @@ -233,7 +232,7 @@ ConnectRouteByRouteId(string media_source, string route_id, string presentation_id, - url.mojom.Origin origin, + string origin, int32 tab_id, mojo.common.mojom.TimeDelta timeout, bool incognito) => @@ -364,7 +363,7 @@ // compatible with |media_source|. The result is only valid for |origins|. If // |origins| is empty, the result is valid for any origin. OnSinksReceived(string media_source, array<MediaSink> sinks, - array<url.mojom.Origin> origins); + array<string> origins); // Called when issues are reported for media routes. OnIssue(Issue issue);
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc index fc356db6..91c840d 100644 --- a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc +++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
@@ -176,7 +176,7 @@ void MediaRouterMojoImpl::OnSinksReceived( const std::string& media_source, std::vector<mojom::MediaSinkPtr> sinks, - const std::vector<url::Origin>& origins) { + const std::vector<std::string>& origins) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DVLOG_WITH_INSTANCE(1) << "OnSinksReceived"; auto it = sinks_queries_.find(media_source); @@ -185,6 +185,18 @@ return; } + std::vector<GURL> origin_list; + origin_list.reserve(origins.size()); + for (size_t i = 0; i < origins.size(); ++i) { + GURL origin(origins[i]); + if (!origin.is_valid()) { + LOG(WARNING) << "Received invalid origin: " << origin + << ". Dropping result."; + return; + } + origin_list.push_back(origin); + } + std::vector<MediaSink> sink_list; sink_list.reserve(sinks.size()); for (size_t i = 0; i < sinks.size(); ++i) @@ -192,7 +204,7 @@ auto* sinks_query = it->second.get(); sinks_query->has_cached_result = true; - sinks_query->origins = origins; + sinks_query->origins.swap(origin_list); sinks_query->cached_sink_list.swap(sink_list); if (!sinks_query->observers.might_have_observers()) { @@ -267,36 +279,55 @@ void MediaRouterMojoImpl::CreateRoute( const MediaSource::Id& source_id, const MediaSink::Id& sink_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, bool incognito) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + if (!origin.is_valid()) { + DVLOG_WITH_INSTANCE(1) << "Invalid origin: " << origin; + std::unique_ptr<RouteRequestResult> result = RouteRequestResult::FromError( + "Invalid origin", RouteRequestResult::INVALID_ORIGIN); + MediaRouterMojoMetrics::RecordCreateRouteResultCode(result->result_code()); + RunRouteRequestCallbacks(std::move(result), callbacks); + return; + } + SetWakeReason(MediaRouteProviderWakeReason::CREATE_ROUTE); int tab_id = SessionTabHelper::IdForTab(web_contents); RunOrDefer(base::Bind(&MediaRouterMojoImpl::DoCreateRoute, - base::Unretained(this), source_id, sink_id, origin, - tab_id, callbacks, timeout, incognito)); + base::Unretained(this), source_id, sink_id, + origin.is_empty() ? "" : origin.spec(), tab_id, + callbacks, timeout, incognito)); } void MediaRouterMojoImpl::JoinRoute( const MediaSource::Id& source_id, const std::string& presentation_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, bool incognito) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - if (!HasJoinableRoute()) { + std::unique_ptr<RouteRequestResult> error_result; + if (!origin.is_valid()) { + DVLOG_WITH_INSTANCE(1) << "Invalid origin: " << origin; + error_result = RouteRequestResult::FromError( + "Invalid origin", RouteRequestResult::INVALID_ORIGIN); + } else if (!HasJoinableRoute()) { DVLOG_WITH_INSTANCE(1) << "No joinable routes"; - std::unique_ptr<RouteRequestResult> result = RouteRequestResult::FromError( + error_result = RouteRequestResult::FromError( "Route not found", RouteRequestResult::ROUTE_NOT_FOUND); - MediaRouterMojoMetrics::RecordJoinRouteResultCode(result->result_code()); - RunRouteRequestCallbacks(std::move(result), callbacks); + } + + if (error_result) { + MediaRouterMojoMetrics::RecordJoinRouteResultCode( + error_result->result_code()); + RunRouteRequestCallbacks(std::move(error_result), callbacks); return; } @@ -304,24 +335,35 @@ int tab_id = SessionTabHelper::IdForTab(web_contents); RunOrDefer(base::Bind(&MediaRouterMojoImpl::DoJoinRoute, base::Unretained(this), source_id, presentation_id, - origin, tab_id, callbacks, timeout, incognito)); + origin.is_empty() ? "" : origin.spec(), tab_id, + callbacks, timeout, incognito)); } void MediaRouterMojoImpl::ConnectRouteByRouteId( const MediaSource::Id& source_id, const MediaRoute::Id& route_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, bool incognito) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + if (!origin.is_valid()) { + DVLOG_WITH_INSTANCE(1) << "Invalid origin: " << origin; + std::unique_ptr<RouteRequestResult> result = RouteRequestResult::FromError( + "Invalid origin", RouteRequestResult::INVALID_ORIGIN); + MediaRouterMojoMetrics::RecordJoinRouteResultCode(result->result_code()); + RunRouteRequestCallbacks(std::move(result), callbacks); + return; + } + SetWakeReason(MediaRouteProviderWakeReason::CONNECT_ROUTE_BY_ROUTE_ID); int tab_id = SessionTabHelper::IdForTab(web_contents); RunOrDefer(base::Bind(&MediaRouterMojoImpl::DoConnectRouteByRouteId, - base::Unretained(this), source_id, route_id, origin, - tab_id, callbacks, timeout, incognito)); + base::Unretained(this), source_id, route_id, + origin.is_empty() ? "" : origin.spec(), tab_id, + callbacks, timeout, incognito)); } void MediaRouterMojoImpl::TerminateRoute(const MediaRoute::Id& route_id) { @@ -417,8 +459,7 @@ // |observer| can be immediately notified with an empty list. sinks_query->observers.AddObserver(observer); if (availability_ == mojom::MediaRouter::SinkAvailability::UNAVAILABLE) { - observer->OnSinksUpdated(std::vector<MediaSink>(), - std::vector<url::Origin>()); + observer->OnSinksUpdated(std::vector<MediaSink>(), std::vector<GURL>()); } else { // Need to call MRPM to start observing sinks if the query is new. if (new_query) { @@ -561,7 +602,7 @@ void MediaRouterMojoImpl::DoCreateRoute( const MediaSource::Id& source_id, const MediaSink::Id& sink_id, - const url::Origin& origin, + const std::string& origin, int tab_id, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, @@ -569,6 +610,7 @@ std::string presentation_id = MediaRouterBase::CreatePresentationId(); DVLOG_WITH_INSTANCE(1) << "DoCreateRoute " << source_id << "=>" << sink_id << ", presentation ID: " << presentation_id; + media_route_provider_->CreateRoute( source_id, sink_id, presentation_id, origin, tab_id, timeout, incognito, base::Bind(&MediaRouterMojoImpl::RouteResponseReceived, @@ -579,7 +621,7 @@ void MediaRouterMojoImpl::DoJoinRoute( const MediaSource::Id& source_id, const std::string& presentation_id, - const url::Origin& origin, + const std::string& origin, int tab_id, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, @@ -597,7 +639,7 @@ void MediaRouterMojoImpl::DoConnectRouteByRouteId( const MediaSource::Id& source_id, const MediaRoute::Id& route_id, - const url::Origin& origin, + const std::string& origin, int tab_id, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout,
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl.h b/chrome/browser/media/router/mojo/media_router_mojo_impl.h index 0b38e048..4ee4caf 100644 --- a/chrome/browser/media/router/mojo/media_router_mojo_impl.h +++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
@@ -69,14 +69,14 @@ // enqueued for later use if the extension is temporarily suspended. void CreateRoute(const MediaSource::Id& source_id, const MediaSink::Id& sink_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, bool incognito) override; void JoinRoute(const MediaSource::Id& source_id, const std::string& presentation_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, @@ -84,7 +84,7 @@ void ConnectRouteByRouteId( const MediaSource::Id& source, const MediaRoute::Id& route_id, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, @@ -175,7 +175,7 @@ // Cached list of sinks for the query, if |has_cached_result| is true. // Empty otherwise. std::vector<MediaSink> cached_sink_list; - std::vector<url::Origin> origins; + std::vector<GURL> origins; base::ObserverList<MediaSinksObserver> observers; private: @@ -234,14 +234,14 @@ // These calls invoke methods in the component extension via Mojo. void DoCreateRoute(const MediaSource::Id& source_id, const MediaSink::Id& sink_id, - const url::Origin& origin, + const std::string& origin, int tab_id, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, bool incognito); void DoJoinRoute(const MediaSource::Id& source_id, const std::string& presentation_id, - const url::Origin& origin, + const std::string& origin, int tab_id, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, @@ -249,7 +249,7 @@ void DoConnectRouteByRouteId( const MediaSource::Id& source_id, const MediaRoute::Id& route_id, - const url::Origin& origin, + const std::string& origin, int tab_id, const std::vector<MediaRouteResponseCallback>& callbacks, base::TimeDelta timeout, @@ -286,7 +286,7 @@ void OnIssue(const IssueInfo& issue) override; void OnSinksReceived(const std::string& media_source, std::vector<mojom::MediaSinkPtr> sinks, - const std::vector<url::Origin>& origins) override; + const std::vector<std::string>& origins) override; void OnRoutesUpdated( std::vector<mojom::MediaRoutePtr> routes, const std::string& media_source,
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc b/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc index 70df1a6..e360552 100644 --- a/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc +++ b/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
@@ -195,11 +195,10 @@ // a limitation with GMock::Invoke that prevents it from using move-only types // in runnable parameter lists. EXPECT_CALL(mock_media_route_provider_, - CreateRoute(kSource, kSinkId, _, url::Origin(GURL(kOrigin)), - kInvalidTabId, _, _, _)) + CreateRoute(kSource, kSinkId, _, kOrigin, kInvalidTabId, _, _, _)) .WillOnce(Invoke( [](const std::string& source, const std::string& sink, - const std::string& presentation_id, const url::Origin& origin, + const std::string& presentation_id, const std::string& origin, int tab_id, base::TimeDelta timeout, bool incognito, const mojom::MediaRouteProvider::CreateRouteCallback& cb) { cb.Run(CreateMojoRoute(), std::string(), @@ -214,10 +213,9 @@ std::vector<MediaRouteResponseCallback> route_response_callbacks; route_response_callbacks.push_back(base::Bind( &RouteResponseCallbackHandler::Invoke, base::Unretained(&handler))); - router()->CreateRoute(kSource, kSinkId, url::Origin(GURL(kOrigin)), nullptr, - route_response_callbacks, - base::TimeDelta::FromMilliseconds(kTimeoutMillis), - false); + router()->CreateRoute( + kSource, kSinkId, GURL(kOrigin), nullptr, route_response_callbacks, + base::TimeDelta::FromMilliseconds(kTimeoutMillis), false); run_loop.Run(); ExpectResultBucketCount("CreateRoute", RouteRequestResult::ResultCode::OK, 1); } @@ -232,11 +230,10 @@ // a limitation with GMock::Invoke that prevents it from using move-only types // in runnable parameter lists. EXPECT_CALL(mock_media_route_provider_, - CreateRoute(kSource, kSinkId, _, url::Origin(GURL(kOrigin)), - kInvalidTabId, _, _, _)) + CreateRoute(kSource, kSinkId, _, kOrigin, kInvalidTabId, _, _, _)) .WillOnce(Invoke( [](const std::string& source, const std::string& sink, - const std::string& presentation_id, const url::Origin& origin, + const std::string& presentation_id, const std::string& origin, int tab_id, base::TimeDelta timeout, bool incognito, const mojom::MediaRouteProvider::CreateRouteCallback& cb) { mojom::MediaRoutePtr route = CreateMojoRoute(); @@ -255,10 +252,9 @@ std::vector<MediaRouteResponseCallback> route_response_callbacks; route_response_callbacks.push_back(base::Bind( &RouteResponseCallbackHandler::Invoke, base::Unretained(&handler))); - router()->CreateRoute(kSource, kSinkId, url::Origin(GURL(kOrigin)), nullptr, - route_response_callbacks, - base::TimeDelta::FromMilliseconds(kTimeoutMillis), - true); + router()->CreateRoute( + kSource, kSinkId, GURL(kOrigin), nullptr, route_response_callbacks, + base::TimeDelta::FromMilliseconds(kTimeoutMillis), true); run_loop.Run(); ExpectResultBucketCount("CreateRoute", RouteRequestResult::ResultCode::OK, 1); } @@ -266,12 +262,11 @@ TEST_F(MediaRouterMojoImplTest, CreateRouteFails) { EXPECT_CALL( mock_media_route_provider_, - CreateRoute(kSource, kSinkId, _, url::Origin(GURL(kOrigin)), - kInvalidTabId, + CreateRoute(kSource, kSinkId, _, kOrigin, kInvalidTabId, base::TimeDelta::FromMilliseconds(kTimeoutMillis), _, _)) .WillOnce(Invoke( [](const std::string& source, const std::string& sink, - const std::string& presentation_id, const url::Origin& origin, + const std::string& presentation_id, const std::string& origin, int tab_id, base::TimeDelta timeout, bool incognito, const mojom::MediaRouteProvider::CreateRouteCallback& cb) { cb.Run(mojom::MediaRoutePtr(), std::string(kError), @@ -286,24 +281,22 @@ std::vector<MediaRouteResponseCallback> route_response_callbacks; route_response_callbacks.push_back(base::Bind( &RouteResponseCallbackHandler::Invoke, base::Unretained(&handler))); - router()->CreateRoute(kSource, kSinkId, url::Origin(GURL(kOrigin)), nullptr, - route_response_callbacks, - base::TimeDelta::FromMilliseconds(kTimeoutMillis), - false); + router()->CreateRoute( + kSource, kSinkId, GURL(kOrigin), nullptr, route_response_callbacks, + base::TimeDelta::FromMilliseconds(kTimeoutMillis), false); run_loop.Run(); ExpectResultBucketCount("CreateRoute", RouteRequestResult::ResultCode::TIMED_OUT, 1); } TEST_F(MediaRouterMojoImplTest, CreateRouteIncognitoMismatchFails) { - EXPECT_CALL( - mock_media_route_provider_, - CreateRoute(kSource, kSinkId, _, url::Origin(GURL(kOrigin)), - kInvalidTabId, - base::TimeDelta::FromMilliseconds(kTimeoutMillis), true, _)) + EXPECT_CALL(mock_media_route_provider_, + CreateRoute(kSource, kSinkId, _, kOrigin, kInvalidTabId, + base::TimeDelta::FromMilliseconds(kTimeoutMillis), + true, _)) .WillOnce(Invoke( [](const std::string& source, const std::string& sink, - const std::string& presentation_id, const url::Origin& origin, + const std::string& presentation_id, const std::string& origin, int tab_id, base::TimeDelta timeout, bool incognito, const mojom::MediaRouteProvider::CreateRouteCallback& cb) { cb.Run(CreateMojoRoute(), std::string(), @@ -319,10 +312,9 @@ std::vector<MediaRouteResponseCallback> route_response_callbacks; route_response_callbacks.push_back(base::Bind( &RouteResponseCallbackHandler::Invoke, base::Unretained(&handler))); - router()->CreateRoute(kSource, kSinkId, url::Origin(GURL(kOrigin)), nullptr, - route_response_callbacks, - base::TimeDelta::FromMilliseconds(kTimeoutMillis), - true); + router()->CreateRoute( + kSource, kSinkId, GURL(kOrigin), nullptr, route_response_callbacks, + base::TimeDelta::FromMilliseconds(kTimeoutMillis), true); run_loop.Run(); ExpectResultBucketCount( "CreateRoute", RouteRequestResult::ResultCode::INCOGNITO_MISMATCH, 1); @@ -332,14 +324,13 @@ mojom::MediaRoutePtr route = CreateMojoRoute(); route->is_incognito = true; - EXPECT_CALL( - mock_media_route_provider_, - CreateRoute(kSource, kSinkId, _, url::Origin(GURL(kOrigin)), - kInvalidTabId, - base::TimeDelta::FromMilliseconds(kTimeoutMillis), true, _)) + EXPECT_CALL(mock_media_route_provider_, + CreateRoute(kSource, kSinkId, _, kOrigin, kInvalidTabId, + base::TimeDelta::FromMilliseconds(kTimeoutMillis), + true, _)) .WillOnce(Invoke( [](const std::string& source, const std::string& sink, - const std::string& presentation_id, const url::Origin& origin, + const std::string& presentation_id, const std::string& origin, int tab_id, base::TimeDelta timeout, bool incognito, const mojom::MediaRouteProvider::CreateRouteCallback& cb) { mojom::MediaRoutePtr route = CreateMojoRoute(); @@ -348,7 +339,7 @@ mojom::RouteRequestResultCode::OK); })); base::RunLoop run_loop; - router()->CreateRoute(kSource, kSinkId, url::Origin(GURL(kOrigin)), nullptr, + router()->CreateRoute(kSource, kSinkId, GURL(kOrigin), nullptr, std::vector<MediaRouteResponseCallback>(), base::TimeDelta::FromMilliseconds(kTimeoutMillis), true); @@ -392,12 +383,11 @@ // in runnable parameter lists. EXPECT_CALL( mock_media_route_provider_, - JoinRoute(kSource, kPresentationId, url::Origin(GURL(kOrigin)), - kInvalidTabId, + JoinRoute(kSource, kPresentationId, kOrigin, kInvalidTabId, base::TimeDelta::FromMilliseconds(kTimeoutMillis), _, _)) .WillOnce(Invoke([&route]( const std::string& source, const std::string& presentation_id, - const url::Origin& origin, int tab_id, base::TimeDelta timeout, + const std::string& origin, int tab_id, base::TimeDelta timeout, bool incognito, const mojom::MediaRouteProvider::JoinRouteCallback& cb) { cb.Run(std::move(route), std::string(), @@ -412,8 +402,8 @@ std::vector<MediaRouteResponseCallback> route_response_callbacks; route_response_callbacks.push_back(base::Bind( &RouteResponseCallbackHandler::Invoke, base::Unretained(&handler))); - router()->JoinRoute(kSource, kPresentationId, url::Origin(GURL(kOrigin)), - nullptr, route_response_callbacks, + router()->JoinRoute(kSource, kPresentationId, GURL(kOrigin), nullptr, + route_response_callbacks, base::TimeDelta::FromMilliseconds(kTimeoutMillis), false); run_loop.Run(); ExpectResultBucketCount("JoinRoute", RouteRequestResult::ResultCode::OK, 1); @@ -428,8 +418,8 @@ std::vector<MediaRouteResponseCallback> route_response_callbacks; route_response_callbacks.push_back(base::Bind( &RouteResponseCallbackHandler::Invoke, base::Unretained(&handler))); - router()->JoinRoute(kSource, kPresentationId, url::Origin(GURL(kOrigin)), - nullptr, route_response_callbacks, + router()->JoinRoute(kSource, kPresentationId, GURL(kOrigin), nullptr, + route_response_callbacks, base::TimeDelta::FromMilliseconds(kTimeoutMillis), false); run_loop.Run(); ExpectResultBucketCount("JoinRoute", @@ -447,12 +437,11 @@ EXPECT_CALL( mock_media_route_provider_, - JoinRoute(kSource, kPresentationId, url::Origin(GURL(kOrigin)), - kInvalidTabId, + JoinRoute(kSource, kPresentationId, kOrigin, kInvalidTabId, base::TimeDelta::FromMilliseconds(kTimeoutMillis), _, _)) .WillOnce(Invoke( [](const std::string& source, const std::string& presentation_id, - const url::Origin& origin, int tab_id, base::TimeDelta timeout, + const std::string& origin, int tab_id, base::TimeDelta timeout, bool incognito, const mojom::MediaRouteProvider::JoinRouteCallback& cb) { cb.Run(mojom::MediaRoutePtr(), std::string(kError), @@ -467,8 +456,8 @@ std::vector<MediaRouteResponseCallback> route_response_callbacks; route_response_callbacks.push_back(base::Bind( &RouteResponseCallbackHandler::Invoke, base::Unretained(&handler))); - router()->JoinRoute(kSource, kPresentationId, url::Origin(GURL(kOrigin)), - nullptr, route_response_callbacks, + router()->JoinRoute(kSource, kPresentationId, GURL(kOrigin), nullptr, + route_response_callbacks, base::TimeDelta::FromMilliseconds(kTimeoutMillis), false); run_loop.Run(); ExpectResultBucketCount("JoinRoute", @@ -491,12 +480,11 @@ // in runnable parameter lists. EXPECT_CALL( mock_media_route_provider_, - JoinRoute(kSource, kPresentationId, url::Origin(GURL(kOrigin)), - kInvalidTabId, + JoinRoute(kSource, kPresentationId, kOrigin, kInvalidTabId, base::TimeDelta::FromMilliseconds(kTimeoutMillis), true, _)) .WillOnce(Invoke([&route]( const std::string& source, const std::string& presentation_id, - const url::Origin& origin, int tab_id, base::TimeDelta timeout, + const std::string& origin, int tab_id, base::TimeDelta timeout, bool incognito, const mojom::MediaRouteProvider::JoinRouteCallback& cb) { cb.Run(std::move(route), std::string(), @@ -512,8 +500,8 @@ std::vector<MediaRouteResponseCallback> route_response_callbacks; route_response_callbacks.push_back(base::Bind( &RouteResponseCallbackHandler::Invoke, base::Unretained(&handler))); - router()->JoinRoute(kSource, kPresentationId, url::Origin(GURL(kOrigin)), - nullptr, route_response_callbacks, + router()->JoinRoute(kSource, kPresentationId, GURL(kOrigin), nullptr, + route_response_callbacks, base::TimeDelta::FromMilliseconds(kTimeoutMillis), true); run_loop.Run(); ExpectResultBucketCount( @@ -532,12 +520,12 @@ // in runnable parameter lists. EXPECT_CALL( mock_media_route_provider_, - ConnectRouteByRouteId( - kSource, kRouteId, _, url::Origin(GURL(kOrigin)), kInvalidTabId, - base::TimeDelta::FromMilliseconds(kTimeoutMillis), false, _)) + ConnectRouteByRouteId(kSource, kRouteId, _, kOrigin, kInvalidTabId, + base::TimeDelta::FromMilliseconds(kTimeoutMillis), + false, _)) .WillOnce(Invoke([&route]( const std::string& source, const std::string& route_id, - const std::string& presentation_id, const url::Origin& origin, + const std::string& presentation_id, const std::string& origin, int tab_id, base::TimeDelta timeout, bool incognito, const mojom::MediaRouteProvider::JoinRouteCallback& cb) { cb.Run(std::move(route), std::string(), @@ -553,8 +541,7 @@ route_response_callbacks.push_back(base::Bind( &RouteResponseCallbackHandler::Invoke, base::Unretained(&handler))); router()->ConnectRouteByRouteId( - kSource, kRouteId, url::Origin(GURL(kOrigin)), nullptr, - route_response_callbacks, + kSource, kRouteId, GURL(kOrigin), nullptr, route_response_callbacks, base::TimeDelta::FromMilliseconds(kTimeoutMillis), false); run_loop.Run(); ExpectResultBucketCount("JoinRoute", RouteRequestResult::ResultCode::OK, 1); @@ -563,12 +550,12 @@ TEST_F(MediaRouterMojoImplTest, ConnectRouteByRouteIdFails) { EXPECT_CALL( mock_media_route_provider_, - ConnectRouteByRouteId( - kSource, kRouteId, _, url::Origin(GURL(kOrigin)), kInvalidTabId, - base::TimeDelta::FromMilliseconds(kTimeoutMillis), true, _)) + ConnectRouteByRouteId(kSource, kRouteId, _, kOrigin, kInvalidTabId, + base::TimeDelta::FromMilliseconds(kTimeoutMillis), + true, _)) .WillOnce(Invoke( [](const std::string& source, const std::string& route_id, - const std::string& presentation_id, const url::Origin& origin, + const std::string& presentation_id, const std::string& origin, int tab_id, base::TimeDelta timeout, bool incognito, const mojom::MediaRouteProvider::JoinRouteCallback& cb) { cb.Run(mojom::MediaRoutePtr(), std::string(kError), @@ -584,8 +571,7 @@ route_response_callbacks.push_back(base::Bind( &RouteResponseCallbackHandler::Invoke, base::Unretained(&handler))); router()->ConnectRouteByRouteId( - kSource, kRouteId, url::Origin(GURL(kOrigin)), nullptr, - route_response_callbacks, + kSource, kRouteId, GURL(kOrigin), nullptr, route_response_callbacks, base::TimeDelta::FromMilliseconds(kTimeoutMillis), true); run_loop.Run(); ExpectResultBucketCount("JoinRoute", @@ -600,12 +586,12 @@ // in runnable parameter lists. EXPECT_CALL( mock_media_route_provider_, - ConnectRouteByRouteId( - kSource, kRouteId, _, url::Origin(GURL(kOrigin)), kInvalidTabId, - base::TimeDelta::FromMilliseconds(kTimeoutMillis), true, _)) + ConnectRouteByRouteId(kSource, kRouteId, _, kOrigin, kInvalidTabId, + base::TimeDelta::FromMilliseconds(kTimeoutMillis), + true, _)) .WillOnce(Invoke([&route]( const std::string& source, const std::string& route_id, - const std::string& presentation_id, const url::Origin& origin, + const std::string& presentation_id, const std::string& origin, int tab_id, base::TimeDelta timeout, bool incognito, const mojom::MediaRouteProvider::JoinRouteCallback& cb) { cb.Run(std::move(route), std::string(), @@ -622,8 +608,7 @@ route_response_callbacks.push_back(base::Bind( &RouteResponseCallbackHandler::Invoke, base::Unretained(&handler))); router()->ConnectRouteByRouteId( - kSource, kRouteId, url::Origin(GURL(kOrigin)), nullptr, - route_response_callbacks, + kSource, kRouteId, GURL(kOrigin), nullptr, route_response_callbacks, base::TimeDelta::FromMilliseconds(kTimeoutMillis), true); run_loop.Run(); ExpectResultBucketCount( @@ -711,6 +696,7 @@ router()->OnSinkAvailabilityUpdated( mojom::MediaRouter::SinkAvailability::AVAILABLE); MediaSource media_source(kSource); + GURL origin("https://google.com"); // These should only be called once even if there is more than one observer // for a given source. @@ -718,16 +704,13 @@ EXPECT_CALL(mock_media_route_provider_, StartObservingMediaSinks(kSource2)); std::unique_ptr<MockMediaSinksObserver> sinks_observer( - new MockMediaSinksObserver(router(), media_source, - url::Origin(GURL(kOrigin)))); + new MockMediaSinksObserver(router(), media_source, origin)); EXPECT_TRUE(sinks_observer->Init()); std::unique_ptr<MockMediaSinksObserver> extra_sinks_observer( - new MockMediaSinksObserver(router(), media_source, - url::Origin(GURL(kOrigin)))); + new MockMediaSinksObserver(router(), media_source, origin)); EXPECT_TRUE(extra_sinks_observer->Init()); std::unique_ptr<MockMediaSinksObserver> unrelated_sinks_observer( - new MockMediaSinksObserver(router(), MediaSource(kSource2), - url::Origin(GURL(kOrigin)))); + new MockMediaSinksObserver(router(), MediaSource(kSource2), origin)); EXPECT_TRUE(unrelated_sinks_observer->Init()); ProcessEventLoop(); @@ -756,15 +739,14 @@ .WillOnce(InvokeWithoutArgs([&run_loop]() { run_loop.Quit(); })); media_router_proxy_->OnSinksReceived( media_source.id(), std::move(mojo_sinks), - std::vector<url::Origin>(1, url::Origin(GURL(kOrigin)))); + std::vector<std::string>(1, origin.spec())); run_loop.Run(); // Since the MediaRouterMojoImpl has already received results for // |media_source|, return cached results to observers that are subsequently // registered. std::unique_ptr<MockMediaSinksObserver> cached_sinks_observer( - new MockMediaSinksObserver(router(), media_source, - url::Origin(GURL(kOrigin)))); + new MockMediaSinksObserver(router(), media_source, origin)); EXPECT_CALL(*cached_sinks_observer, OnSinksReceived(SequenceEquals(expected_sinks))); EXPECT_TRUE(cached_sinks_observer->Init()); @@ -772,7 +754,7 @@ // Different origin from cached result. Empty list will be returned. std::unique_ptr<MockMediaSinksObserver> cached_sinks_observer2( new MockMediaSinksObserver(router(), media_source, - url::Origin(GURL("https://youtube.com")))); + GURL("https://youtube.com"))); EXPECT_CALL(*cached_sinks_observer2, OnSinksReceived(IsEmpty())); EXPECT_TRUE(cached_sinks_observer2->Init()); @@ -790,20 +772,19 @@ TEST_F(MediaRouterMojoImplTest, RegisterMediaSinksObserverWithAvailabilityChange) { + GURL origin("https://google.com"); // When availability is UNAVAILABLE, no calls should be made to MRPM. router()->OnSinkAvailabilityUpdated( mojom::MediaRouter::SinkAvailability::UNAVAILABLE); MediaSource media_source(kSource); std::unique_ptr<MockMediaSinksObserver> sinks_observer( - new MockMediaSinksObserver(router(), media_source, - url::Origin(GURL(kOrigin)))); + new MockMediaSinksObserver(router(), media_source, origin)); EXPECT_CALL(*sinks_observer, OnSinksReceived(IsEmpty())); EXPECT_TRUE(sinks_observer->Init()); MediaSource media_source2(kSource2); std::unique_ptr<MockMediaSinksObserver> sinks_observer2( - new MockMediaSinksObserver(router(), media_source2, - url::Origin(GURL(kOrigin)))); + new MockMediaSinksObserver(router(), media_source2, origin)); EXPECT_CALL(*sinks_observer2, OnSinksReceived(IsEmpty())); EXPECT_TRUE(sinks_observer2->Init()); EXPECT_CALL(mock_media_route_provider_, StartObservingMediaSinks(kSource))
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_test.h b/chrome/browser/media/router/mojo/media_router_mojo_test.h index b978c6d..72609c8 100644 --- a/chrome/browser/media/router/mojo/media_router_mojo_test.h +++ b/chrome/browser/media/router/mojo/media_router_mojo_test.h
@@ -34,7 +34,7 @@ void(const std::string& source_urn, const std::string& sink_id, const std::string& presentation_id, - const url::Origin& origin, + const std::string& origin, int tab_id, base::TimeDelta timeout, bool incognito, @@ -42,7 +42,7 @@ MOCK_METHOD7(JoinRoute, void(const std::string& source_urn, const std::string& presentation_id, - const url::Origin& origin, + const std::string& origin, int tab_id, base::TimeDelta timeout, bool incognito, @@ -51,7 +51,7 @@ void(const std::string& source_urn, const std::string& route_id, const std::string& presentation_id, - const url::Origin& origin, + const std::string& origin, int tab_id, base::TimeDelta timeout, bool incognito,
diff --git a/chrome/browser/media/router/presentation_media_sinks_observer.cc b/chrome/browser/media/router/presentation_media_sinks_observer.cc index 5a8d6281..5bc1429 100644 --- a/chrome/browser/media/router/presentation_media_sinks_observer.cc +++ b/chrome/browser/media/router/presentation_media_sinks_observer.cc
@@ -14,7 +14,7 @@ MediaRouter* router, content::PresentationScreenAvailabilityListener* listener, const MediaSource& source, - const url::Origin& origin) + const GURL& origin) : MediaSinksObserver(router, source, origin), listener_(listener), previous_availablity_(UNKNOWN) {
diff --git a/chrome/browser/media/router/presentation_media_sinks_observer.h b/chrome/browser/media/router/presentation_media_sinks_observer.h index b8960027..ce13d9b 100644 --- a/chrome/browser/media/router/presentation_media_sinks_observer.h +++ b/chrome/browser/media/router/presentation_media_sinks_observer.h
@@ -35,7 +35,7 @@ MediaRouter* router, content::PresentationScreenAvailabilityListener* listener, const MediaSource& source, - const url::Origin& origin); + const GURL& origin); ~PresentationMediaSinksObserver() override; // MediaSinksObserver implementation.
diff --git a/chrome/browser/media/router/presentation_media_sinks_observer_unittest.cc b/chrome/browser/media/router/presentation_media_sinks_observer_unittest.cc index 7e9cc6b..96166a8 100644 --- a/chrome/browser/media/router/presentation_media_sinks_observer_unittest.cc +++ b/chrome/browser/media/router/presentation_media_sinks_observer_unittest.cc
@@ -20,10 +20,6 @@ namespace media_router { -namespace { -constexpr char kOrigin[] = "https://google.com"; -} // namespace - class PresentationMediaSinksObserverTest : public ::testing::Test { public: PresentationMediaSinksObserverTest() @@ -35,7 +31,7 @@ observer_.reset(new PresentationMediaSinksObserver( &router_, &listener_, MediaSourceForPresentationUrl( GURL("http://example.com/presentation.html")), - url::Origin(GURL(kOrigin)))); + GURL("https://google.com"))); EXPECT_TRUE(observer_->Init()); }
diff --git a/chrome/browser/media/router/presentation_request.cc b/chrome/browser/media/router/presentation_request.cc index 3952d0a..89f7b4fb 100644 --- a/chrome/browser/media/router/presentation_request.cc +++ b/chrome/browser/media/router/presentation_request.cc
@@ -11,10 +11,10 @@ PresentationRequest::PresentationRequest( const RenderFrameHostId& render_frame_host_id, const std::vector<GURL>& presentation_urls, - const url::Origin& frame_origin) + const GURL& frame_url) : render_frame_host_id_(render_frame_host_id), presentation_urls_(presentation_urls), - frame_origin_(frame_origin) { + frame_url_(frame_url) { DCHECK(!presentation_urls_.empty()); } @@ -26,8 +26,7 @@ bool PresentationRequest::Equals(const PresentationRequest& other) const { return render_frame_host_id_ == other.render_frame_host_id_ && presentation_urls_ == other.presentation_urls_ && - ((frame_origin_.unique() && other.frame_origin_.unique()) || - (frame_origin_ == other.frame_origin_)); + frame_url_ == other.frame_url_; } std::vector<MediaSource> PresentationRequest::GetMediaSources() const {
diff --git a/chrome/browser/media/router/presentation_request.h b/chrome/browser/media/router/presentation_request.h index e305673..1879ec1 100644 --- a/chrome/browser/media/router/presentation_request.h +++ b/chrome/browser/media/router/presentation_request.h
@@ -10,7 +10,7 @@ #include "chrome/browser/media/router/media_source.h" #include "chrome/browser/media/router/render_frame_host_id.h" -#include "url/origin.h" +#include "url/gurl.h" namespace media_router { @@ -20,7 +20,7 @@ public: PresentationRequest(const RenderFrameHostId& render_frame_host_id, const std::vector<GURL>& presentation_urls, - const url::Origin& frame_origin); + const GURL& frame_url); PresentationRequest(const PresentationRequest& other); ~PresentationRequest(); @@ -35,7 +35,7 @@ const std::vector<GURL>& presentation_urls() const { return presentation_urls_; } - const url::Origin& frame_origin() const { return frame_origin_; } + const GURL& frame_url() const { return frame_url_; } private: // ID of RenderFrameHost that initiated the request. @@ -44,8 +44,10 @@ // URLs of presentation. const std::vector<GURL> presentation_urls_; - // Origin of frame from which the request was initiated. - const url::Origin frame_origin_; + // URL of frame from which the request was initiated. + // TODO(crbug.com/632623): Convert this to url::Origin as only the origin or + // hostname is used. + const GURL frame_url_; }; } // namespace media_router
diff --git a/chrome/browser/media/router/presentation_request_unittest.cc b/chrome/browser/media/router/presentation_request_unittest.cc index 8144d73..165b5d0 100644 --- a/chrome/browser/media/router/presentation_request_unittest.cc +++ b/chrome/browser/media/router/presentation_request_unittest.cc
@@ -8,17 +8,17 @@ namespace media_router { TEST(PresentationRequestTest, Equals) { - url::Origin frame_origin(GURL("http://www.site.com/")); + GURL frame_url("http://www.site.com/"); std::vector<GURL> presentation_urls = { GURL("http://www.example.com/presentation.html"), GURL("http://www.example.net/alternate.html")}; PresentationRequest request1(RenderFrameHostId(1, 2), presentation_urls, - frame_origin); + frame_url); // Frame IDs are different. PresentationRequest request2(RenderFrameHostId(3, 4), presentation_urls, - frame_origin); + frame_url); EXPECT_FALSE(request1.Equals(request2)); // Presentation URLs are different. @@ -26,19 +26,19 @@ RenderFrameHostId(1, 2), {GURL("http://www.example.net/presentation.html"), GURL("http://www.example.com/presentation.html")}, - frame_origin); + frame_url); EXPECT_FALSE(request1.Equals(request3)); // Frame URLs are different. PresentationRequest request4(RenderFrameHostId(1, 2), presentation_urls, - url::Origin(GURL("http://www.site.net/"))); + GURL("http://www.site.net/")); EXPECT_FALSE(request1.Equals(request4)); PresentationRequest request5( RenderFrameHostId(1, 2), {GURL("http://www.example.com/presentation.html"), GURL("http://www.example.net/alternate.html")}, - url::Origin(GURL("http://www.site.com/"))); + GURL("http://www.site.com/")); EXPECT_TRUE(request1.Equals(request5)); }
diff --git a/chrome/browser/media/router/presentation_service_delegate_impl.cc b/chrome/browser/media/router/presentation_service_delegate_impl.cc index 78f9a4a..e938d75 100644 --- a/chrome/browser/media/router/presentation_service_delegate_impl.cc +++ b/chrome/browser/media/router/presentation_service_delegate_impl.cc
@@ -60,12 +60,14 @@ // Gets the last committed URL for the render frame specified by // |render_frame_host_id|. -url::Origin GetLastCommittedURLForFrame( - RenderFrameHostId render_frame_host_id) { +GURL GetLastCommittedURLForFrame(RenderFrameHostId render_frame_host_id) { RenderFrameHost* render_frame_host = RenderFrameHost::FromID( render_frame_host_id.first, render_frame_host_id.second); - DCHECK(render_frame_host); - return render_frame_host->GetLastCommittedOrigin(); + if (!render_frame_host) + return GURL(); + + // TODO(crbug.com/632623): Use url::Origin in place of GURL for origins + return render_frame_host->GetLastCommittedOrigin().GetURL(); } // Observes messages originating from the MediaSink connected to a MediaRoute @@ -229,7 +231,7 @@ sinks_observer.reset(new PresentationMediaSinksObserver( router_, listener, source, - GetLastCommittedURLForFrame(render_frame_host_id_))); + GetLastCommittedURLForFrame(render_frame_host_id_).GetOrigin())); if (!sinks_observer->Init()) { url_to_sinks_observer_.erase(source.id()); @@ -548,10 +550,9 @@ ClearDefaultPresentationRequest(); } else { DCHECK(!callback.is_null()); - const auto& frame_origin = - GetLastCommittedURLForFrame(render_frame_host_id); + GURL frame_url(GetLastCommittedURLForFrame(render_frame_host_id)); PresentationRequest request(render_frame_host_id, default_presentation_urls, - frame_origin); + frame_url); default_presentation_started_callback_ = callback; SetDefaultPresentationRequest(request); } @@ -804,8 +805,8 @@ return; } - const url::Origin& origin = GetLastCommittedURLForFrame( - RenderFrameHostId(render_process_id, render_frame_id)); + const url::Origin& origin = url::Origin(GetLastCommittedURLForFrame( + RenderFrameHostId(render_process_id, render_frame_id))); #if !defined(OS_ANDROID) if (IsAutoJoinPresentationId(presentation_id) && @@ -826,7 +827,7 @@ weak_factory_.GetWeakPtr(), render_process_id, render_frame_id, presentation_url, presentation_id, success_cb, error_cb)); router_->JoinRoute(MediaSourceForPresentationUrl(presentation_url).id(), - presentation_id, origin, web_contents_, + presentation_id, origin.GetURL(), web_contents_, route_response_callbacks, base::TimeDelta(), incognito); }
diff --git a/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc b/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc index b8f6170..d4543441 100644 --- a/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc +++ b/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc
@@ -151,9 +151,8 @@ EXPECT_TRUE(Mock::VerifyAndClearExpectations(this)); // Should not trigger callback since request doesn't match. - PresentationRequest different_request(RenderFrameHostId(100, 200), - {presentation_url2_}, - url::Origin(GURL(kFrameUrl))); + PresentationRequest different_request( + RenderFrameHostId(100, 200), {presentation_url2_}, GURL(kFrameUrl)); MediaRoute* media_route = new MediaRoute("differentRouteId", source2_, "mediaSinkId", "", true, "", true); media_route->set_incognito(incognito); @@ -322,7 +321,7 @@ EXPECT_EQ(presentation_url1_, request1.presentation_urls()[0]); EXPECT_EQ(RenderFrameHostId(main_frame_process_id_, main_frame_routing_id_), request1.render_frame_host_id()); - EXPECT_EQ(url::Origin(frame_url), request1.frame_origin()); + EXPECT_EQ(frame_url, request1.frame_url()); // Set to a new default presentation URL std::vector<GURL> new_urls = {presentation_url2_}; @@ -334,7 +333,7 @@ EXPECT_EQ(presentation_url2_, request2.presentation_urls()[0]); EXPECT_EQ(RenderFrameHostId(main_frame_process_id_, main_frame_routing_id_), request2.render_frame_host_id()); - EXPECT_EQ(url::Origin(frame_url), request2.frame_origin()); + EXPECT_EQ(frame_url, request2.frame_url()); // Remove default presentation URL. delegate_impl_->SetDefaultPresentationUrls(main_frame_process_id_, @@ -368,7 +367,7 @@ std::vector<GURL> request1_urls = {presentation_url1_}; PresentationRequest observed_request1( RenderFrameHostId(main_frame_process_id_, main_frame_routing_id_), - request1_urls, url::Origin(frame_url)); + request1_urls, frame_url); EXPECT_CALL(observer, OnDefaultPresentationChanged(Equals(observed_request1))) .Times(1); delegate_impl_->SetDefaultPresentationUrls( @@ -384,7 +383,7 @@ std::vector<GURL> request2_urls = {presentation_url2_}; PresentationRequest observed_request2( RenderFrameHostId(main_frame_process_id_, main_frame_routing_id_), - request2_urls, url::Origin(frame_url)); + request2_urls, frame_url); EXPECT_CALL(observer, OnDefaultPresentationChanged(Equals(observed_request2))) .Times(1); delegate_impl_->SetDefaultPresentationUrls(
diff --git a/chrome/browser/media/router/presentation_service_delegate_observers.cc b/chrome/browser/media/router/presentation_service_delegate_observers.cc index 48595382..4875794b 100644 --- a/chrome/browser/media/router/presentation_service_delegate_observers.cc +++ b/chrome/browser/media/router/presentation_service_delegate_observers.cc
@@ -1,8 +1,11 @@ // Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + #include "chrome/browser/media/router/presentation_service_delegate_observers.h" +#include "base/stl_util.h" + namespace media_router { PresentationServiceDelegateObservers::PresentationServiceDelegateObservers() {}
diff --git a/chrome/browser/media/router/test_helper.cc b/chrome/browser/media/router/test_helper.cc index 5d98680..8d38dd65 100644 --- a/chrome/browser/media/router/test_helper.cc +++ b/chrome/browser/media/router/test_helper.cc
@@ -14,7 +14,7 @@ MockMediaSinksObserver::MockMediaSinksObserver(MediaRouter* router, const MediaSource& source, - const url::Origin& origin) + const GURL& origin) : MediaSinksObserver(router, source, origin) {} MockMediaSinksObserver::~MockMediaSinksObserver() { }
diff --git a/chrome/browser/media/router/test_helper.h b/chrome/browser/media/router/test_helper.h index 80e2ee4..84c1001 100644 --- a/chrome/browser/media/router/test_helper.h +++ b/chrome/browser/media/router/test_helper.h
@@ -62,7 +62,7 @@ public: MockMediaSinksObserver(MediaRouter* router, const MediaSource& source, - const url::Origin& origin); + const GURL& origin); ~MockMediaSinksObserver() override; MOCK_METHOD1(OnSinksReceived, void(const std::vector<MediaSink>& sinks));
diff --git a/chrome/browser/pdf/pdf_extension_test.cc b/chrome/browser/pdf/pdf_extension_test.cc index b63a7bb..f352d9c 100644 --- a/chrome/browser/pdf/pdf_extension_test.cc +++ b/chrome/browser/pdf/pdf_extension_test.cc
@@ -659,6 +659,21 @@ ASSERT_MULTILINE_STREQ(kExpectedPDFAXTree, ax_tree_dump); } +#if defined(GOOGLE_CHROME_BUILD) +// Test a particular PDF encountered in the wild that triggered a crash +// when accessibility is enabled. (http://crbug.com/648981) +IN_PROC_BROWSER_TEST_F(PDFExtensionTest, PdfAccessibilityCharCountCrash) { + content::BrowserAccessibilityState::GetInstance()->EnableAccessibility(); + GURL test_pdf_url(embedded_test_server()->GetURL( + "/pdf_private/accessibility_crash_1.pdf")); + + content::WebContents* guest_contents = LoadPdfGetGuestContents(test_pdf_url); + ASSERT_TRUE(guest_contents); + + WaitForAccessibilityTreeToContainNodeWithName(guest_contents, "Page 1"); +} +#endif + IN_PROC_BROWSER_TEST_F(PDFExtensionTest, PdfAccessibilityEnableLater) { // In this test, load the PDF file first, with accessibility off. GURL test_pdf_url(embedded_test_server()->GetURL("/pdf/test-bookmarks.pdf"));
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc index f8dd499f..2fbbb3d 100644 --- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc +++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -401,6 +401,9 @@ { key::kForceEphemeralProfiles, prefs::kForceEphemeralProfiles, base::Value::Type::BOOLEAN }, + { key::kSSLVersionMax, + ssl_config::prefs::kSSLVersionMax, + base::Value::Type::STRING }, { key::kNTPContentSuggestionsEnabled, ntp_snippets::prefs::kEnableSnippets, base::Value::Type::BOOLEAN },
diff --git a/chrome/browser/prefs/chrome_command_line_pref_store_ssl_manager_unittest.cc b/chrome/browser/prefs/chrome_command_line_pref_store_ssl_manager_unittest.cc index 9ef75a2..15de0a8 100644 --- a/chrome/browser/prefs/chrome_command_line_pref_store_ssl_manager_unittest.cc +++ b/chrome/browser/prefs/chrome_command_line_pref_store_ssl_manager_unittest.cc
@@ -36,7 +36,7 @@ base::CommandLine command_line(base::CommandLine::NO_PROGRAM); command_line.AppendSwitchASCII(switches::kSSLVersionMin, "tls1.1"); - command_line.AppendSwitchASCII(switches::kSSLVersionMax, "tls1"); + command_line.AppendSwitchASCII(switches::kSSLVersionMax, "tls1.3"); sync_preferences::PrefServiceMockFactory factory; factory.set_user_prefs(local_state_store); @@ -57,7 +57,7 @@ config_service->GetSSLConfig(&ssl_config); // Command-line flags should be respected. EXPECT_EQ(net::SSL_PROTOCOL_VERSION_TLS1_1, ssl_config.version_min); - EXPECT_EQ(net::SSL_PROTOCOL_VERSION_TLS1, ssl_config.version_max); + EXPECT_EQ(net::SSL_PROTOCOL_VERSION_TLS1_3, ssl_config.version_max); // Explicitly double-check the settings are not in the preference store. const PrefService::Preference* version_min_pref = @@ -75,4 +75,3 @@ EXPECT_FALSE(local_state_store->GetString(ssl_config::prefs::kSSLVersionMax, &version_max_str)); } -
diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browser/prefs/chrome_pref_service_factory.cc index 66fd6b2..d2e0d02 100644 --- a/chrome/browser/prefs/chrome_pref_service_factory.cc +++ b/chrome/browser/prefs/chrome_pref_service_factory.cc
@@ -389,6 +389,9 @@ // As part of improving pref metrics on other platforms we may want to find // ways to defer preference loading until the device ID can be used. rlz_lib::GetMachineId(&legacy_device_id); + + UMA_HISTOGRAM_BOOLEAN("Settings.LegacyMachineIdGenerationSuccess", + !legacy_device_id.empty()); #endif std::string seed; #if defined(GOOGLE_CHROME_BUILD)
diff --git a/chrome/browser/prerender/prerender_test_utils.cc b/chrome/browser/prerender/prerender_test_utils.cc index 73a22726..0a844c8 100644 --- a/chrome/browser/prerender/prerender_test_utils.cc +++ b/chrome/browser/prerender/prerender_test_utils.cc
@@ -224,8 +224,8 @@ return nullptr; } - ExternalProtocolHandler::BlockState GetBlockState(const std::string& scheme, - Profile* profile) override { + ExternalProtocolHandler::BlockState GetBlockState( + const std::string& scheme) override { // Block everything and fail the test. ADD_FAILURE(); return ExternalProtocolHandler::BLOCK;
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc index ebd15b2..e92d4853 100644 --- a/chrome/browser/profiles/off_the_record_profile_io_data.cc +++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -339,7 +339,7 @@ new net::HttpNetworkSession(network_params)); // Use a separate in-memory cache for the app. - std::unique_ptr<net::HttpCache> app_http_cache = CreateHttpFactory( + std::unique_ptr<net::HttpCache> app_http_cache = CreateMainHttpFactory( http_network_session.get(), net::HttpCache::DefaultBackend::InMemory(0)); context->SetChannelIDService(std::move(channel_id_service));
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc index d32c584..c8f14b2 100644 --- a/chrome/browser/profiles/profile.cc +++ b/chrome/browser/profiles/profile.cc
@@ -176,8 +176,6 @@ #if defined(OS_CHROMEOS) registry->RegisterBooleanPref(prefs::kAllowScreenLock, true); #endif - - registry->RegisterDictionaryPref(prefs::kExcludedSchemes); } std::string Profile::GetDebugName() {
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc index db44df0e..1ed4fe1 100644 --- a/chrome/browser/profiles/profile_impl_io_data.cc +++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -695,7 +695,7 @@ std::unique_ptr<net::HttpNetworkSession> http_network_session( new net::HttpNetworkSession(network_params)); std::unique_ptr<net::HttpCache> app_http_cache = - CreateHttpFactory(http_network_session.get(), std::move(app_backend)); + CreateMainHttpFactory(http_network_session.get(), std::move(app_backend)); // Transfer ownership of the ChannelIDStore and the HttpNetworkSession to the // AppRequestContext.
diff --git a/chrome/browser/resources/.clang-format b/chrome/browser/resources/.clang-format deleted file mode 100644 index d455a85..0000000 --- a/chrome/browser/resources/.clang-format +++ /dev/null
@@ -1,8 +0,0 @@ -# Please keep this file the same as ui/webui/resources/.clang-format. -BasedOnStyle: Chromium - -# Renaming quotes in <include> and <if> break things. -# For normal JS code, please prefer ' to ". -JavaScriptQuotes: Leave - -AllowShortFunctionsOnASingleLine: Empty
diff --git a/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_ml.xtb b/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_ml.xtb index 99692d7..e639e00d 100644 --- a/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_ml.xtb +++ b/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_ml.xtb
@@ -508,7 +508,7 @@ <translation id="5623842676595125836">ലോഗ്</translation> <translation id="5628125749885014029">h4</translation> <translation id="5637871198229500030">മുൻ പട്ടിക ഒന്നുമില്ല.</translation> -<translation id="5653397561111110475">Chromebook ടച്ച് സ്ക്രീൻ പ്രവേശനക്ഷമതാ ഫീച്ചറുകൾ ഉപയോഗിക്കുക</translation> +<translation id="5653397561111110475">Chromebook ടച്ച് സ്ക്രീൻ ഉപയോഗസഹായി ഫീച്ചറുകൾ ഉപയോഗിക്കുക</translation> <translation id="5655682562155942719">കമാൻഡുകൾ ഒഴിവാക്കുക</translation> <translation id="56637627897541303">വാചക ഏരിയ</translation> <translation id="5678161956734658133">mled</translation>
diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui.css b/chrome/browser/resources/vr_shell/vr_shell_ui.css index 243f8e4..ef64681 100644 --- a/chrome/browser/resources/vr_shell/vr_shell_ui.css +++ b/chrome/browser/resources/vr_shell/vr_shell_ui.css
@@ -113,7 +113,9 @@ } #reload-ui-button { - background-color: #555; + --tranX: 0; + --tranY: -1.2; + --tranZ: -1.2; color: white; font-size: 24px; padding: 12px; @@ -189,3 +191,46 @@ color: #868686; } +#omnibox-ui-element { + --tranX: 0; + --tranY: -0.2; + --tranZ: -1.0; + font-family: arial; +} + +#omnibox-url-divider { + background-color: black; + height: 1px; +} + +#omnibox-url-element { + background-color: white; + display: flex; + padding: 5px; + width: 100%; +} + +.omnibox-suggestion { + background-color: white; + height: 22px; + overflow: hidden; + padding-left: 5px; + padding-right: 5px; + white-space: nowrap; + width: 100%; +} + +#omnibox-input-field { + border: none; + font-size: 16px; + margin: 3px; + overflow: hidden; + padding: 0; + white-space: nowrap; + width: 280px; +} + +#omnibox-clear-button { + background: url(../../../../ui/webui/resources/images/x-hover.png) no-repeat center center; + width: 15px; +}
diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui.html b/chrome/browser/resources/vr_shell/vr_shell_ui.html index 7c492ff..d351bcfd 100644 --- a/chrome/browser/resources/vr_shell/vr_shell_ui.html +++ b/chrome/browser/resources/vr_shell/vr_shell_ui.html
@@ -46,6 +46,20 @@ </div> </div> </div> + <div id="omnibox-ui-element" class="ui-element"> + <div id="suggestions"> + <div id="suggestion-4" class="omnibox-suggestion"></div> + <div id="suggestion-3" class="omnibox-suggestion"></div> + <div id="suggestion-2" class="omnibox-suggestion"></div> + <div id="suggestion-1" class="omnibox-suggestion"></div> + <div id="suggestion-0" class="omnibox-suggestion"></div> + </div> + <div id="omnibox-url-divider"></div> + <div id="omnibox-url-element"> + <input id="omnibox-input-field" type="url"></input> + <div id="omnibox-clear-button"></div> + </div> + </div> <div id="back" class="round-button ui-element"> <div class="button"></div> <div class="caption">$i18n{back}</div>
diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui.js b/chrome/browser/resources/vr_shell/vr_shell_ui.js index ce1b792f..df4c561 100644 --- a/chrome/browser/resources/vr_shell/vr_shell_ui.js +++ b/chrome/browser/resources/vr_shell/vr_shell_ui.js
@@ -47,6 +47,12 @@ ui.updateElement(this.elementId, update); } + setOpacity(opacity) { + let update = new api.UiElementUpdate(); + update.setOpacity(opacity); + ui.updateElement(this.elementId, update); + } + setFullscreen(enabled) { let anim = new api.Animation(this.elementId, ANIM_DURATION); if (enabled) { @@ -129,26 +135,25 @@ class Controls { constructor(contentQuadId) { this.enabled = false; - this.reloadUiEnabled = false; this.buttons = []; let descriptors = [ [ '#back', function() { - api.doAction(api.Action.HISTORY_BACK); + api.doAction(api.Action.HISTORY_BACK, {}); } ], [ '#reload', function() { - api.doAction(api.Action.RELOAD); + api.doAction(api.Action.RELOAD, {}); } ], [ '#forward', function() { - api.doAction(api.Action.HISTORY_FORWARD); + api.doAction(api.Action.HISTORY_FORWARD, {}); } ], ]; @@ -173,20 +178,6 @@ update.setVisible(false); ui.updateElement(element.uiElementId, update); } - - this.reloadUiButton = new DomUiElement('#reload-ui-button'); - this.reloadUiButton.domElement.addEventListener('click', function() { - ui.purge(); - api.doAction(api.Action.RELOAD_UI); - }); - - let update = new api.UiElementUpdate(); - update.setParentId(contentQuadId); - update.setVisible(false); - update.setScale(2.2, 2.2, 1); - update.setTranslation(0, -0.6, 0.3); - update.setAnchoring(api.XAnchoring.XNONE, api.YAnchoring.YBOTTOM); - ui.updateElement(this.reloadUiButton.uiElementId, update); } setEnabled(enabled) { @@ -194,20 +185,48 @@ this.configure(); } - setReloadUiEnabled(enabled) { - this.reloadUiEnabled = enabled; - this.configure(); - } - configure() { for (let i = 0; i < this.buttons.length; i++) { let update = new api.UiElementUpdate(); update.setVisible(this.enabled); ui.updateElement(this.buttons[i].uiElementId, update); } + } + }; + + /** + * A button to trigger a reload of the HTML UI for development purposes. + */ + class ReloadUiButton { + constructor() { + this.enabled = false; + this.devMode = false; + + this.uiElement = new DomUiElement('#reload-ui-button'); + this.uiElement.domElement.addEventListener('click', function() { + ui.purge(); + api.doAction(api.Action.RELOAD_UI, {}); + }); + let update = new api.UiElementUpdate(); - update.setVisible(this.enabled && this.reloadUiEnabled); - ui.updateElement(this.reloadUiButton.uiElementId, update); + update.setVisible(false); + ui.updateElement(this.uiElement.uiElementId, update); + } + + setEnabled(enabled) { + this.enabled = enabled; + this.updateState(); + } + + setDevMode(enabled) { + this.devMode = enabled; + this.updateState(); + } + + updateState() { + let update = new api.UiElementUpdate(); + update.setVisible(this.enabled && this.devMode); + ui.updateElement(this.uiElement.uiElementId, update); } }; @@ -355,8 +374,8 @@ setURL(host, path) { let indicator = this.domUiElement.domElement; - indicator.querySelector('#domain').innerHTML = host; - indicator.querySelector('#path').innerHTML = path; + indicator.querySelector('#domain').textContent = host; + indicator.querySelector('#path').textContent = path; this.resetVisibilityTimer(); this.updateState(); } @@ -454,6 +473,80 @@ } }; + class Omnibox { + constructor() { + this.enabled = false; + + this.domUiElement = new DomUiElement('#omnibox-ui-element'); + let root = this.domUiElement.domElement; + this.inputField = root.querySelector('#omnibox-input-field'); + + // Initially invisible. + let update = new api.UiElementUpdate(); + update.setVisible(true); + ui.updateElement(this.domUiElement.uiElementId, update); + + // Field-clearing button. + let clearButton = root.querySelector('#omnibox-clear-button'); + clearButton.addEventListener('click', function() { + this.inputField.value = ''; + api.doAction(api.Action.OMNIBOX_CONTENT, {'text': ''}); + }.bind(this)); + + // Watch for the enter key to trigger navigation. + this.inputField.addEventListener('keypress', function(e) { + if (e.keyCode == 13) { + api.doAction( + // TODO(crbug.com/683344): Properly choose prefix. + api.Action.LOAD_URL, {'url': 'http://' + e.target.value}); + } + }); + + // Watch for field input to generate suggestions. + this.inputField.addEventListener('input', function(e) { + api.doAction(api.Action.OMNIBOX_CONTENT, {'text': e.target.value}); + }); + + // Clicking on suggestions triggers navigation. + let elements = root.querySelectorAll('.omnibox-suggestion'); + this.maxSuggestions = elements.length; + for (var i = 0; i < elements.length; i++) { + elements[i].addEventListener('click', function(index, e) { + if (e.target.url) { + api.doAction(api.Action.LOAD_URL, {'url': e.target.url}); + } + }.bind(this, i)); + } + } + + setEnabled(enabled) { + this.enabled = enabled; + + let update = new api.UiElementUpdate(); + update.setVisible(enabled); + ui.updateElement(this.domUiElement.uiElementId, update); + } + + setURL(url) { + this.inputField.value = url; + } + + setSuggestions(suggestions) { + for (var i = 0; i < this.maxSuggestions; i++) { + let element = document.querySelector('#suggestion-' + i); + if (i >= suggestions.length) { + element.textContent = ''; + element.style.visibility = 'hidden'; + element.url = null; + } else { + element.textContent = suggestions[i].description; + element.style.visibility = 'visible'; + element.url = suggestions[i].url; + } + } + } + }; + class UiManager { constructor() { this.mode = api.Mode.UNKNOWN; @@ -466,6 +559,8 @@ this.controls = new Controls(contentId); this.secureOriginWarnings = new SecureOriginWarnings(); this.urlIndicator = new UrlIndicator(); + this.omnibox = new Omnibox(); + this.reloadUiButton = new ReloadUiButton(); } setMode(mode, menuMode, fullscreen) { @@ -475,6 +570,7 @@ this.menuMode = menuMode; this.fullscreen = fullscreen; + this.reloadUiButton.setEnabled(mode == api.Mode.STANDARD); this.contentQuad.setEnabled(mode == api.Mode.STANDARD && !menuMode); this.contentQuad.setFullscreen(fullscreen); // TODO(crbug/643815): Set aspect ratio on content quad when available. @@ -486,6 +582,7 @@ mode == api.Mode.STANDARD && !menuMode ? 0 : URL_INDICATOR_VISIBILITY_TIMEOUT_MS); + this.omnibox.setEnabled(false); this.secureOriginWarnings.setEnabled(mode == api.Mode.WEB_VR); api.setUiCssSize( @@ -499,10 +596,6 @@ setWebVRSecureOrigin(secure) { this.secureOriginWarnings.setSecure(secure); } - - setReloadUiEnabled(enabled) { - this.controls.setReloadUiEnabled(enabled); - } }; function initialize() { @@ -523,11 +616,12 @@ uiManager.setWebVRSecureOrigin(dict['webVRSecureOrigin']); } if ('enableReloadUi' in dict) { - uiManager.setReloadUiEnabled(dict['enableReloadUi']); + uiManager.reloadUiButton.setDevMode(dict['enableReloadUi']); } if ('url' in dict) { let url = dict['url']; uiManager.urlIndicator.setURL(url['host'], url['path']); + uiManager.omnibox.setURL(url['host'] + url['path']); } if ('loading' in dict) { uiManager.urlIndicator.setLoading(dict['loading']); @@ -535,6 +629,9 @@ if ('loadProgress' in dict) { uiManager.urlIndicator.setLoadProgress(dict['loadProgress']); } + if ('suggestions' in dict) { + uiManager.omnibox.setSuggestions(dict['suggestions']); + } ui.flush(); }
diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui_api.js b/chrome/browser/resources/vr_shell/vr_shell_ui_api.js index bc1709c..5424ca723 100644 --- a/chrome/browser/resources/vr_shell/vr_shell_ui_api.js +++ b/chrome/browser/resources/vr_shell/vr_shell_ui_api.js
@@ -66,6 +66,8 @@ 'ZOOM_OUT': 3, 'ZOOM_IN': 4, 'RELOAD_UI': 5, + 'LOAD_URL': 6, + 'OMNIBOX_CONTENT': 7, }; /** @@ -82,9 +84,10 @@ /** * Triggers an Action. * @param {api.Action} action + * @param {Object} parameters */ -api.doAction = function(action) { - chrome.send('doAction', [action]); +api.doAction = function(action, parameters) { + chrome.send('doAction', [action, parameters]); }; /**
diff --git a/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.cc b/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.cc index 4df76ba..584a8ec9 100644 --- a/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.cc +++ b/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.cc
@@ -9,11 +9,11 @@ #include "components/certificate_reporting/error_report.h" #include "content/public/browser/browser_thread.h" #include "content/public/test/test_utils.h" -#include "crypto/curve25519.h" #include "net/base/upload_bytes_element_reader.h" #include "net/base/upload_data_stream.h" #include "net/url_request/url_request_filter.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/boringssl/src/include/openssl/curve25519.h" namespace { @@ -376,7 +376,7 @@ CertificateReportingServiceTestHelper::CertificateReportingServiceTestHelper() { memset(server_private_key_, 1, sizeof(server_private_key_)); - crypto::curve25519::ScalarBaseMult(server_private_key_, server_public_key_); + X25519_public_from_private(server_public_key_, server_private_key_); } CertificateReportingServiceTestHelper::
diff --git a/chrome/browser/safe_browsing/settings_reset_prompt/mock_settings_reset_prompt_config.cc b/chrome/browser/safe_browsing/settings_reset_prompt/mock_settings_reset_prompt_config.cc deleted file mode 100644 index 5d81a97..0000000 --- a/chrome/browser/safe_browsing/settings_reset_prompt/mock_settings_reset_prompt_config.cc +++ /dev/null
@@ -1,19 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/safe_browsing/settings_reset_prompt/mock_settings_reset_prompt_config.h" - -using testing::_; -using testing::Return; - -namespace safe_browsing { - -MockSettingsResetPromptConfig::MockSettingsResetPromptConfig() { - // Define a default return value of -1 for |UrlToResetDomainId()|. - EXPECT_CALL(*this, UrlToResetDomainId(_)).WillRepeatedly(Return(-1)); -} - -MockSettingsResetPromptConfig::~MockSettingsResetPromptConfig() {} - -} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/settings_reset_prompt/mock_settings_reset_prompt_config.h b/chrome/browser/safe_browsing/settings_reset_prompt/mock_settings_reset_prompt_config.h deleted file mode 100644 index 99bc2cf..0000000 --- a/chrome/browser/safe_browsing/settings_reset_prompt/mock_settings_reset_prompt_config.h +++ /dev/null
@@ -1,25 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_SAFE_BROWSING_SETTINGS_RESET_PROMPT_MOCK_SETTINGS_RESET_PROMPT_CONFIG_H_ -#define CHROME_BROWSER_SAFE_BROWSING_SETTINGS_RESET_PROMPT_MOCK_SETTINGS_RESET_PROMPT_CONFIG_H_ - -#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_config.h" -#include "testing/gmock/include/gmock/gmock.h" -#include "testing/gtest/include/gtest/gtest.h" -#include "url/gurl.h" - -namespace safe_browsing { - -class MockSettingsResetPromptConfig : public SettingsResetPromptConfig { - public: - MockSettingsResetPromptConfig(); - ~MockSettingsResetPromptConfig() override; - - MOCK_CONST_METHOD1(UrlToResetDomainId, int(const GURL& URL)); -}; - -} // namespace safe_browsing - -#endif // CHROME_BROWSER_SAFE_BROWSING_SETTINGS_RESET_PROMPT_MOCK_SETTINGS_RESET_PROMPT_CONFIG_H_
diff --git a/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model_browsertest.cc b/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model_browsertest.cc index 2b5f43db..26734ac 100644 --- a/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model_browsertest.cc +++ b/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model_browsertest.cc
@@ -16,7 +16,7 @@ #include "chrome/browser/extensions/test_extension_dir.h" #include "chrome/browser/profile_resetter/resettable_settings_snapshot.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/safe_browsing/settings_reset_prompt/mock_settings_reset_prompt_config.h" +#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/search_test_utils.h" @@ -89,7 +89,7 @@ class SettingsResetPromptModelBrowserTest : public ExtensionBrowserTest { protected: - using Model = std::unique_ptr<SettingsResetPromptModel>; + using ModelPointer = std::unique_ptr<SettingsResetPromptModel>; void SetUpOnMainThread() override { ExtensionBrowserTest::SetUpOnMainThread(); @@ -148,47 +148,32 @@ ASSERT_TRUE(*out_extension); } + // Returns a model with a mock config that will return negative IDs for every + // URL. + ModelPointer CreateModel() { + return CreateModelForTesting(profile(), std::unordered_set<std::string>()); + } + // Returns a model with a mock config that will return positive IDs for each - // URL in |reset_urls_|. - Model CreateModel() { - auto config = base::MakeUnique<NiceMock<MockSettingsResetPromptConfig>>(); - - int id = 0; - for (const std::string& reset_url : reset_urls_) { - EXPECT_CALL(*config, UrlToResetDomainId(GURL(reset_url))) - .WillRepeatedly(Return(id)); - ++id; - } - - return base::MakeUnique<SettingsResetPromptModel>( - profile(), std::move(config), - base::MakeUnique<ResettableSettingsSnapshot>(profile())); + // URL in |reset_urls|. + ModelPointer CreateModel(std::unordered_set<std::string> reset_urls) { + return CreateModelForTesting(profile(), reset_urls); } - - void AddResetUrl(const std::string& reset_url) { - reset_urls_.insert(reset_url); - } - - void ClearResetUrls() { reset_urls_.clear(); } - - // URLs for which |MockSettingsResetPromptConfig|s should return positive IDs. - std::unordered_set<std::string> reset_urls_; }; IN_PROC_BROWSER_TEST_F(SettingsResetPromptModelBrowserTest, ExtensionsToDisable_Homepage) { // Homepage does not require reset to start with. { - Model model = CreateModel(); + ModelPointer model = CreateModel(); EXPECT_EQ(model->homepage_reset_state(), SettingsResetPromptModel::DISABLED_DUE_TO_DOMAIN_NOT_MATCHED); EXPECT_THAT(model->extensions_to_disable(), IsEmpty()); } // Let homepage require reset, no extensions need to be disable. - AddResetUrl(kDefaultHomepage); { - Model model = CreateModel(); + ModelPointer model = CreateModel({kDefaultHomepage}); EXPECT_EQ(model->homepage_reset_state(), SettingsResetPromptModel::ENABLED); EXPECT_THAT(model->extensions_to_disable(), IsEmpty()); } @@ -198,7 +183,7 @@ const Extension* safe_extension = nullptr; LoadManifest(kManifestNoOverride, &safe_extension); { - Model model = CreateModel(); + ModelPointer model = CreateModel({kDefaultHomepage}); EXPECT_EQ(model->homepage_reset_state(), SettingsResetPromptModel::ENABLED); EXPECT_THAT(model->extensions_to_disable(), IsEmpty()); } @@ -215,7 +200,7 @@ const Extension* homepage_extension1 = nullptr; LoadHomepageExtension(kHomepage1, &homepage_extension1); { - Model model = CreateModel(); + ModelPointer model = CreateModel({kDefaultHomepage}); EXPECT_EQ(model->homepage_reset_state(), SettingsResetPromptModel::DISABLED_DUE_TO_DOMAIN_NOT_MATCHED); EXPECT_THAT(model->extensions_to_disable(), IsEmpty()); @@ -223,9 +208,8 @@ // Let the domain used by the extension require reset. Homepage now needs to // be reset, one extension needs to be disabled. - AddResetUrl(kHomepage1); { - Model model = CreateModel(); + ModelPointer model = CreateModel({kDefaultHomepage, kHomepage1}); EXPECT_EQ(model->homepage_reset_state(), SettingsResetPromptModel::ENABLED); EXPECT_THAT(model->extensions_to_disable(), ElementsAre(Pair(homepage_extension1->id(), _))); @@ -236,7 +220,7 @@ const Extension* homepage_extension2 = nullptr; LoadHomepageExtension(kHomepage2, &homepage_extension2); { - Model model = CreateModel(); + ModelPointer model = CreateModel({kDefaultHomepage, kHomepage1}); EXPECT_EQ(model->homepage_reset_state(), SettingsResetPromptModel::DISABLED_DUE_TO_DOMAIN_NOT_MATCHED); EXPECT_THAT(model->extensions_to_disable(), IsEmpty()); @@ -244,9 +228,9 @@ // Let the domain used by the second extension require reset. Homepage needs // to be reset again, and both extensions need to be disabled. - AddResetUrl(kHomepage2); { - Model model = CreateModel(); + ModelPointer model = + CreateModel({kDefaultHomepage, kHomepage1, kHomepage2}); EXPECT_EQ(model->homepage_reset_state(), SettingsResetPromptModel::ENABLED); EXPECT_THAT(model->extensions_to_disable(), UnorderedElementsAre(Pair(homepage_extension1->id(), _), @@ -255,10 +239,8 @@ // Let only the domain for the second extension require reset. Homepage still // needs to be reset, and both extensions need to be disabled. - ClearResetUrls(); - AddResetUrl(kHomepage2); { - Model model = CreateModel(); + ModelPointer model = CreateModel({kHomepage2}); EXPECT_EQ(model->homepage_reset_state(), SettingsResetPromptModel::ENABLED); EXPECT_THAT(model->extensions_to_disable(), UnorderedElementsAre(Pair(homepage_extension1->id(), _), @@ -271,7 +253,7 @@ ExtensionsToDisable_DefaultSearch) { // Search does not need to be reset to start with. { - Model model = CreateModel(); + ModelPointer model = CreateModel(); EXPECT_EQ(model->default_search_reset_state(), SettingsResetPromptModel::DISABLED_DUE_TO_DOMAIN_NOT_MATCHED); EXPECT_THAT(model->extensions_to_disable(), IsEmpty()); @@ -279,9 +261,8 @@ // Let the default search domain require reset, no extensions need to be // disabled. - AddResetUrl(kDefaultSearchUrl); { - Model model = CreateModel(); + ModelPointer model = CreateModel({kDefaultSearchUrl}); EXPECT_EQ(model->default_search_reset_state(), SettingsResetPromptModel::ENABLED); EXPECT_THAT(model->extensions_to_disable(), IsEmpty()); @@ -292,7 +273,7 @@ const Extension* safe_extension = nullptr; LoadManifest(kManifestNoOverride, &safe_extension); { - Model model = CreateModel(); + ModelPointer model = CreateModel({kDefaultSearchUrl}); EXPECT_EQ(model->default_search_reset_state(), SettingsResetPromptModel::ENABLED); EXPECT_THAT(model->extensions_to_disable(), IsEmpty()); @@ -309,7 +290,7 @@ const Extension* search_extension1 = nullptr; LoadSearchExtension(kSearchUrl1, &search_extension1); { - Model model = CreateModel(); + ModelPointer model = CreateModel({kDefaultSearchUrl}); EXPECT_EQ(model->default_search_reset_state(), SettingsResetPromptModel::DISABLED_DUE_TO_DOMAIN_NOT_MATCHED); EXPECT_THAT(model->extensions_to_disable(), IsEmpty()); @@ -317,9 +298,8 @@ // Let the domain used by the extension require reset. Search now needs to be // reset, one extension needs to be disabled. - AddResetUrl(kSearchUrl1); { - Model model = CreateModel(); + ModelPointer model = CreateModel({kDefaultSearchUrl, kSearchUrl1}); EXPECT_EQ(model->default_search_reset_state(), SettingsResetPromptModel::ENABLED); EXPECT_THAT(model->extensions_to_disable(), @@ -331,7 +311,7 @@ const Extension* search_extension2 = nullptr; LoadSearchExtension(kSearchUrl2, &search_extension2); { - Model model = CreateModel(); + ModelPointer model = CreateModel({kDefaultSearchUrl, kSearchUrl1}); EXPECT_EQ(model->default_search_reset_state(), SettingsResetPromptModel::DISABLED_DUE_TO_DOMAIN_NOT_MATCHED); EXPECT_THAT(model->extensions_to_disable(), IsEmpty()); @@ -339,9 +319,9 @@ // Let the domain used by the second extension require reset. Search needs to // be reset again, and both extensions need to be disabled. - AddResetUrl(kSearchUrl2); { - Model model = CreateModel(); + ModelPointer model = + CreateModel({kDefaultSearchUrl, kSearchUrl1, kSearchUrl2}); EXPECT_EQ(model->default_search_reset_state(), SettingsResetPromptModel::ENABLED); EXPECT_THAT(model->extensions_to_disable(), @@ -351,10 +331,8 @@ // let only the domain for the second extension require reset. Search still // needs to be reset, and both extensions need to be disabled. - ClearResetUrls(); - AddResetUrl(kSearchUrl2); { - Model model = CreateModel(); + ModelPointer model = CreateModel({kSearchUrl2}); EXPECT_EQ(model->default_search_reset_state(), SettingsResetPromptModel::ENABLED); EXPECT_THAT(model->extensions_to_disable(),
diff --git a/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model_unittest.cc b/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model_unittest.cc index 69e8aca2..8357f362 100644 --- a/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model_unittest.cc +++ b/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model_unittest.cc
@@ -6,6 +6,7 @@ #include <memory> #include <string> +#include <unordered_set> #include <utility> #include "base/callback_forward.h" @@ -14,7 +15,7 @@ #include "chrome/browser/extensions/extension_service_test_base.h" #include "chrome/browser/profile_resetter/resettable_settings_snapshot.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/safe_browsing/settings_reset_prompt/mock_settings_reset_prompt_config.h" +#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" #include "chrome/browser/web_data_service_factory.h" @@ -66,6 +67,8 @@ class SettingsResetPromptModelTest : public extensions::ExtensionServiceTestBase { protected: + using ModelPointer = std::unique_ptr<SettingsResetPromptModel>; + void SetUp() override { extensions::ExtensionServiceTestBase::SetUp(); InitializeEmptyExtensionService(); @@ -104,6 +107,18 @@ template_url_service->SetUserSelectedDefaultSearchProvider(template_url); } + // Returns a model with a mock config that will return negative IDs for every + // URL. positive IDs for each URL in |reset_urls_|. + ModelPointer CreateModel() { + return CreateModelForTesting(profile(), std::unordered_set<std::string>()); + } + + // Returns a model with a mock config that will return positive IDs for each + // URL in |reset_urls|. + ModelPointer CreateModel(std::unordered_set<std::string> reset_urls) { + return CreateModelForTesting(profile(), reset_urls); + } + PrefService* prefs_; }; @@ -134,13 +149,8 @@ TEST_F(SettingsResetPromptModelTest, Homepage) { SetHomepage(kHomepage); - auto snapshot = base::MakeUnique<ResettableSettingsSnapshot>(profile()); - ASSERT_EQ(snapshot->homepage(), std::string(kHomepage)); - - SettingsResetPromptModel model( - profile(), base::MakeUnique<NiceMock<MockSettingsResetPromptConfig>>(), - std::move(snapshot)); - EXPECT_EQ(model.homepage(), kHomepage); + ModelPointer model = CreateModel(); + EXPECT_EQ(model->homepage(), kHomepage); } TEST_F(SettingsResetPromptModelTest, HomepageResetState) { @@ -153,15 +163,8 @@ // Should return |DISABLED_DUE_TO_DOMAIN_NOT_MATCHED| when // |UrlToResetDomainId()| returns a negative integer. { - auto config = - base::MakeUnique<NiceMock<MockSettingsResetPromptConfig>>(); - EXPECT_CALL(*config, UrlToResetDomainId(GURL(kHomepage))) - .WillRepeatedly(Return(-7)); - - SettingsResetPromptModel model( - profile(), std::move(config), - base::MakeUnique<ResettableSettingsSnapshot>(profile())); - EXPECT_EQ(model.homepage_reset_state(), + ModelPointer model = CreateModel(); + EXPECT_EQ(model->homepage_reset_state(), SettingsResetPromptModel::DISABLED_DUE_TO_DOMAIN_NOT_MATCHED); } @@ -169,16 +172,9 @@ // integer and the home button is visible and homepage is not set to the // New Tab page, and |DISABLED_DUE_TO_DOMAIN_NOT_MATCHED| otherwise. { - auto config = - base::MakeUnique<NiceMock<MockSettingsResetPromptConfig>>(); - EXPECT_CALL(*config, UrlToResetDomainId(GURL(kHomepage))) - .WillRepeatedly(Return(5)); - - SettingsResetPromptModel model( - profile(), std::move(config), - base::MakeUnique<ResettableSettingsSnapshot>(profile())); + ModelPointer model = CreateModel({kHomepage}); EXPECT_EQ( - model.homepage_reset_state(), + model->homepage_reset_state(), show_home_button && !homepage_is_ntp ? SettingsResetPromptModel::ENABLED : SettingsResetPromptModel::DISABLED_DUE_TO_DOMAIN_NOT_MATCHED); @@ -189,64 +185,43 @@ TEST_F(SettingsResetPromptModelTest, DefaultSearch) { SetDefaultSearch(kDefaultSearch); - auto snapshot = base::MakeUnique<ResettableSettingsSnapshot>(profile()); - ASSERT_EQ(snapshot->dse_url(), std::string(kDefaultSearch)); - - SettingsResetPromptModel model( - profile(), base::MakeUnique<NiceMock<MockSettingsResetPromptConfig>>(), - std::move(snapshot)); - EXPECT_EQ(model.default_search(), kDefaultSearch); + ModelPointer model = CreateModel(); + EXPECT_EQ(model->default_search(), kDefaultSearch); } TEST_F(SettingsResetPromptModelTest, DefaultSearchResetState) { SetDefaultSearch(kDefaultSearch); - auto snapshot = base::MakeUnique<ResettableSettingsSnapshot>(profile()); - ASSERT_EQ(snapshot->dse_url(), std::string(kDefaultSearch)); // Should return |DISABLED_DUE_TO_DOMAIN_NOT_MATCHED| when // |UrlToResetDomainId()| is negative. { - auto config = base::MakeUnique<NiceMock<MockSettingsResetPromptConfig>>(); - SettingsResetPromptModel model( - profile(), std::move(config), - base::MakeUnique<ResettableSettingsSnapshot>(profile())); - EXPECT_EQ(model.default_search_reset_state(), + ModelPointer model = CreateModel(); + EXPECT_EQ(model->default_search_reset_state(), SettingsResetPromptModel::DISABLED_DUE_TO_DOMAIN_NOT_MATCHED); } // Should return |ENABLED| when |UrlToResetDomainId()| is non-negative. { - auto config = base::MakeUnique<NiceMock<MockSettingsResetPromptConfig>>(); - EXPECT_CALL(*config, UrlToResetDomainId(GURL(kDefaultSearch))) - .WillRepeatedly(Return(8)); - SettingsResetPromptModel model( - profile(), std::move(config), - base::MakeUnique<ResettableSettingsSnapshot>(profile())); - EXPECT_EQ(model.default_search_reset_state(), + ModelPointer model = CreateModel({kDefaultSearch}); + EXPECT_EQ(model->default_search_reset_state(), SettingsResetPromptModel::ENABLED); } } TEST_P(ResetStatesTest, ShouldPromptForReset) { - auto config = base::MakeUnique<NiceMock<MockSettingsResetPromptConfig>>(); - if (homepage_reset_enabled_) { - EXPECT_CALL(*config, UrlToResetDomainId(GURL(kHomepage))) - .WillRepeatedly(Return(1)); - } - if (default_search_reset_enabled_) { - EXPECT_CALL(*config, UrlToResetDomainId(GURL(kDefaultSearch))) - .WillRepeatedly(Return(2)); - } + std::unordered_set<std::string> reset_urls; + if (homepage_reset_enabled_) + reset_urls.insert(kHomepage); + if (default_search_reset_enabled_) + reset_urls.insert(kDefaultSearch); - SettingsResetPromptModel model( - profile(), std::move(config), - base::MakeUnique<ResettableSettingsSnapshot>(profile())); - ASSERT_EQ(model.homepage_reset_state() == SettingsResetPromptModel::ENABLED, + ModelPointer model = CreateModel(reset_urls); + ASSERT_EQ(model->homepage_reset_state() == SettingsResetPromptModel::ENABLED, homepage_reset_enabled_); ASSERT_EQ( - model.default_search_reset_state() == SettingsResetPromptModel::ENABLED, + model->default_search_reset_state() == SettingsResetPromptModel::ENABLED, default_search_reset_enabled_); - EXPECT_EQ(model.ShouldPromptForReset(), should_prompt_); + EXPECT_EQ(model->ShouldPromptForReset(), should_prompt_); } INSTANTIATE_TEST_CASE_P(SettingsResetPromptModel,
diff --git a/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.cc b/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.cc new file mode 100644 index 0000000..56695f0 --- /dev/null +++ b/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.cc
@@ -0,0 +1,44 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.h" + +#include <utility> + +#include "base/memory/ptr_util.h" +#include "chrome/browser/profile_resetter/resettable_settings_snapshot.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model.h" + +namespace safe_browsing { + +using testing::_; +using testing::NiceMock; +using testing::Return; + +MockSettingsResetPromptConfig::MockSettingsResetPromptConfig() { + // Define a default return value of -1 for |UrlToResetDomainId()|. + EXPECT_CALL(*this, UrlToResetDomainId(_)).WillRepeatedly(Return(-1)); +} + +MockSettingsResetPromptConfig::~MockSettingsResetPromptConfig() {} + +std::unique_ptr<SettingsResetPromptModel> CreateModelForTesting( + Profile* profile, + const std::unordered_set<std::string>& reset_urls) { + auto config = base::MakeUnique<NiceMock<MockSettingsResetPromptConfig>>(); + + int id = 1; + for (const std::string& reset_url : reset_urls) { + EXPECT_CALL(*config, UrlToResetDomainId(GURL(reset_url))) + .WillRepeatedly(Return(id)); + ++id; + } + + return base::MakeUnique<SettingsResetPromptModel>( + profile, std::move(config), + base::MakeUnique<ResettableSettingsSnapshot>(profile)); +} + +} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.h b/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.h new file mode 100644 index 0000000..7b21010 --- /dev/null +++ b/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.h
@@ -0,0 +1,40 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_SAFE_BROWSING_SETTINGS_RESET_PROMPT_SETTINGS_RESET_PROMPT_TEST_UTILS_H_ +#define CHROME_BROWSER_SAFE_BROWSING_SETTINGS_RESET_PROMPT_SETTINGS_RESET_PROMPT_TEST_UTILS_H_ + +#include <memory> +#include <string> +#include <unordered_set> + +#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_config.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "url/gurl.h" + +class Profile; + +namespace safe_browsing { + +class SettingsResetPromptModel; + +class MockSettingsResetPromptConfig : public SettingsResetPromptConfig { + public: + MockSettingsResetPromptConfig(); + ~MockSettingsResetPromptConfig() override; + + MOCK_CONST_METHOD1(UrlToResetDomainId, int(const GURL& URL)); +}; + +// Returns a |SettingsResetPromptModel| with a mock |SettingsResetPromptConfig| +// that will return positive reset domain IDs for each URL in |reset_urls| and +// negative IDs otherwise. +std::unique_ptr<SettingsResetPromptModel> CreateModelForTesting( + Profile* profile, + const std::unordered_set<std::string>& reset_urls); + +} // namespace safe_browsing + +#endif // CHROME_BROWSER_SAFE_BROWSING_SETTINGS_RESET_PROMPT_SETTINGS_RESET_PROMPT_TEST_UTILS_H_
diff --git a/chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc b/chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc index 0980bba..886c2a4 100644 --- a/chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc +++ b/chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc
@@ -48,17 +48,6 @@ namespace { -const char kFoo1[] = "http://foo1/"; -const char kFoo2[] = "http://foo2/"; -const char kBar1[] = "http://bar1/"; -const char kBar2[] = "http://bar2/"; -const char kBaz1[] = "http://baz1/"; -const char kBaz2[] = "http://baz2/"; - -std::string TabNodeIdToTag(const std::string& machine_tag, int tab_node_id) { - return base::StringPrintf("%s %d", machine_tag.c_str(), tab_node_id); -} - class SessionNotificationObserver { public: SessionNotificationObserver() @@ -139,7 +128,7 @@ std::map<int, SyncedTabDelegate*> tab_overrides_; std::map<int, SessionID::id_type> tab_id_overrides_; const SyncedWindowDelegate* const wrapped_; - SessionID::id_type session_id_override_ = TabNodePool::kInvalidTabID; + SessionID::id_type session_id_override_ = -1; }; class TestSyncedWindowDelegatesGetter : public SyncedWindowDelegatesGetter { @@ -410,10 +399,6 @@ return sessions_client_shim_.get(); } - TabNodePool* GetTabPool() { - return &manager()->session_tracker_.local_tab_pool_; - } - syncer::SyncPrefs* sync_prefs() { return sync_prefs_.get(); } SyncedWindowDelegatesGetter* get_synced_window_getter() { @@ -517,32 +502,40 @@ namespace { -// A SyncedTabDelegate fake for testing. It simulates a normal -// SyncedTabDelegate with a proper WebContents. For a SyncedTabDelegate without -// a WebContents, see PlaceholderTabDelegate below. class SyncedTabDelegateFake : public SyncedTabDelegate { public: - SyncedTabDelegateFake() {} + SyncedTabDelegateFake() + : current_entry_index_(0), is_supervised_(false), sync_id_(-1) {} ~SyncedTabDelegateFake() override {} - // SyncedTabDelegate overrides. bool IsInitialBlankNavigation() const override { // This differs from NavigationControllerImpl, which has an initial blank // NavigationEntry. return GetEntryCount() == 0; } int GetCurrentEntryIndex() const override { return current_entry_index_; } + void set_current_entry_index(int i) { + current_entry_index_ = i; + } + + void AppendEntry(std::unique_ptr<content::NavigationEntry> entry) { + entries_.push_back(std::move(entry)); + } + GURL GetVirtualURLAtIndex(int i) const override { if (static_cast<size_t>(i) >= entries_.size()) return GURL(); return entries_[i]->GetVirtualURL(); } + GURL GetFaviconURLAtIndex(int i) const override { return GURL(); } + ui::PageTransition GetTransitionAtIndex(int i) const override { if (static_cast<size_t>(i) >= entries_.size()) return ui::PAGE_TRANSITION_LINK; return entries_[i]->GetTransitionType(); } + void GetSerializedNavigationAtIndex( int i, sessions::SerializedNavigationEntry* serialized_entry) const override { @@ -552,9 +545,17 @@ sessions::ContentSerializedNavigationBuilder::FromNavigationEntry( i, *entries_[i]); } + int GetEntryCount() const override { return entries_.size(); } - SessionID::id_type GetWindowId() const override { return window_id_; } - SessionID::id_type GetSessionId() const override { return tab_id_; } + + SessionID::id_type GetWindowId() const override { + return SessionID::id_type(); + } + + SessionID::id_type GetSessionId() const override { + return SessionID::id_type(); + } + bool IsBeingDestroyed() const override { return false; } std::string GetExtensionAppId() const override { return std::string(); } bool ProfileIsSupervised() const override { return is_supervised_; } @@ -563,23 +564,6 @@ GetBlockedNavigations() const override { return &blocked_navigations_; } - bool IsPlaceholderTab() const override { return false; } - int GetSyncId() const override { return sync_id_; } - void SetSyncId(int sync_id) override { sync_id_ = sync_id; } - bool ShouldSync(SyncSessionsClient* sessions_client) override { - return false; - } - - void AppendEntry(std::unique_ptr<content::NavigationEntry> entry) { - entries_.push_back(std::move(entry)); - } - - void set_current_entry_index(int i) { current_entry_index_ = i; } - - void SetWindowId(SessionID::id_type window_id) { window_id_ = window_id; } - - void SetSessionId(SessionID::id_type id) { tab_id_ = id; } - void set_blocked_navigations( std::vector<const content::NavigationEntry*>* navs) { for (auto* entry : *navs) { @@ -590,101 +574,31 @@ blocked_navigations_.push_back(std::move(serialized_entry)); } } + bool IsPlaceholderTab() const override { return true; } + + // Session sync related methods. + int GetSyncId() const override { return sync_id_; } + void SetSyncId(int sync_id) override { sync_id_ = sync_id; } + + bool ShouldSync(SyncSessionsClient* sessions_client) override { + return false; + } void reset() { current_entry_index_ = 0; - sync_id_ = TabNodePool::kInvalidTabNodeID; + sync_id_ = -1; entries_.clear(); } private: - int current_entry_index_ = 0; - bool is_supervised_ = false; - int sync_id_ = -1; - SessionID::id_type tab_id_ = 0; - SessionID::id_type window_id_ = 0; + int current_entry_index_; + bool is_supervised_; + int sync_id_; std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>> blocked_navigations_; std::vector<std::unique_ptr<content::NavigationEntry>> entries_; }; -// A placeholder delegate. These delegates have no WebContents, simulating a tab -// that has been restored without bringing its state fully into memory (for -// example on Android), or where the tab's contents have been evicted from -// memory. See SyncedTabDelegate::IsPlaceHolderTab for more info. -class PlaceholderTabDelegate : public SyncedTabDelegate { - public: - PlaceholderTabDelegate(SessionID::id_type session_id, int sync_id) - : session_id_(session_id), sync_id_(sync_id) {} - ~PlaceholderTabDelegate() override {} - - // SyncedTabDelegate overrides. - SessionID::id_type GetSessionId() const override { return session_id_; } - int GetSyncId() const override { return sync_id_; } - void SetSyncId(int sync_id) override { sync_id_ = sync_id; } - bool IsPlaceholderTab() const override { return true; } - - // Everything else is invalid to invoke as it depends on a valid WebContents. - SessionID::id_type GetWindowId() const override { - NOTREACHED(); - return 0; - } - bool IsBeingDestroyed() const override { - NOTREACHED(); - return false; - } - std::string GetExtensionAppId() const override { - NOTREACHED(); - return ""; - } - bool IsInitialBlankNavigation() const override { - NOTREACHED(); - return false; - } - int GetCurrentEntryIndex() const override { - NOTREACHED(); - return 0; - } - int GetEntryCount() const override { - NOTREACHED(); - return 0; - } - GURL GetVirtualURLAtIndex(int i) const override { - NOTREACHED(); - return GURL(); - } - GURL GetFaviconURLAtIndex(int i) const override { - NOTREACHED(); - return GURL(); - } - ui::PageTransition GetTransitionAtIndex(int i) const override { - NOTREACHED(); - return ui::PageTransition(); - } - void GetSerializedNavigationAtIndex( - int i, - sessions::SerializedNavigationEntry* serialized_entry) const override { - NOTREACHED(); - } - bool ProfileIsSupervised() const override { - NOTREACHED(); - return false; - } - const std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>* - GetBlockedNavigations() const override { - NOTREACHED(); - return nullptr; - } - bool ShouldSync(SyncSessionsClient* sessions_client) override { - NOTREACHED(); - return false; - } - - private: - SessionID::id_type session_id_; - int sync_id_; -}; - } // namespace static const base::Time kTime0 = base::Time::FromInternalValue(100); @@ -1039,31 +953,29 @@ // Ensure model association associates the pre-existing tabs. TEST_F(SessionsSyncManagerTest, SwappedOutOnRestore) { + AddTab(browser(), GURL("http://foo1")); + NavigateAndCommitActiveTab(GURL("http://foo2")); + AddTab(browser(), GURL("http://bar1")); + NavigateAndCommitActiveTab(GURL("http://bar2")); + AddTab(browser(), GURL("http://baz1")); + NavigateAndCommitActiveTab(GURL("http://baz2")); const int kRestoredTabId = 1337; const int kNewTabId = 2468; - // AddTab inserts at index 0, so go in reverse order (tab 3 -> tab 1). - AddTab(browser(), GURL(kBaz1)); - NavigateAndCommitActiveTab(GURL(kBaz2)); - AddTab(browser(), GURL(kBar1)); - NavigateAndCommitActiveTab(GURL(kBar2)); - AddTab(browser(), GURL(kFoo1)); - NavigateAndCommitActiveTab(GURL(kFoo2)); - syncer::SyncDataList in; syncer::SyncChangeList out; InitWithSyncDataTakeOutput(in, &out); - // Should be one header add, 3 tab adds, one header update. - ASSERT_EQ(5U, out.size()); + // Should be one header add, 3 tab add/update pairs, one header update. + ASSERT_EQ(8U, out.size()); // For input, we set up: // * one "normal" fully loaded tab - // * one placeholder tab with no WebContents and a tab_id change - // * one placeholder tab with no WebContents and no tab_id change - sync_pb::EntitySpecifics t0_entity = out[1].sync_data().GetSpecifics(); - sync_pb::EntitySpecifics t1_entity = out[2].sync_data().GetSpecifics(); - sync_pb::EntitySpecifics t2_entity = out[3].sync_data().GetSpecifics(); + // * one "frozen" tab with no WebContents and a tab_id change + // * one "frozen" tab with no WebContents and no tab_id change + sync_pb::EntitySpecifics t0_entity = out[2].sync_data().GetSpecifics(); + sync_pb::EntitySpecifics t1_entity = out[4].sync_data().GetSpecifics(); + sync_pb::EntitySpecifics t2_entity = out[6].sync_data().GetSpecifics(); t1_entity.mutable_session()->mutable_tab()->set_tab_id(kRestoredTabId); in.push_back(CreateRemoteData(t0_entity)); in.push_back(CreateRemoteData(t1_entity)); @@ -1074,8 +986,9 @@ const std::set<const SyncedWindowDelegate*>& windows = manager()->synced_window_delegates_getter()->GetSyncedWindowDelegates(); ASSERT_EQ(1U, windows.size()); - PlaceholderTabDelegate t1_override(kNewTabId, 1); - PlaceholderTabDelegate t2_override(t2_entity.session().tab().tab_id(), 2); + SyncedTabDelegateFake t1_override, t2_override; + t1_override.SetSyncId(1); // No WebContents by default. + t2_override.SetSyncId(2); // No WebContents by default. SyncedWindowDelegateOverride window_override(*windows.begin()); window_override.OverrideTabAt(1, &t1_override, kNewTabId); window_override.OverrideTabAt(2, &t2_override, @@ -1092,39 +1005,26 @@ std::unique_ptr<syncer::SyncErrorFactory>( new syncer::SyncErrorFactoryMock())); - // There should be three changes, one for the fully associated tab, and - // one each for the tab_id updates to t1 and t2. - ASSERT_EQ(3U, FilterOutLocalHeaderChanges(&out)->size()); + // There should be two changes, one for the fully associated tab, and + // one for the tab_id update to t1. t2 shouldn't need to be updated. + ASSERT_EQ(2U, FilterOutLocalHeaderChanges(&out)->size()); EXPECT_EQ(SyncChange::ACTION_UPDATE, out[0].change_type()); - EXPECT_EQ(kFoo2, out[0] - .sync_data() - .GetSpecifics() - .session() - .tab() - .navigation(1) - .virtual_url()); - EXPECT_EQ(SyncChange::ACTION_UPDATE, out[1].change_type()); EXPECT_EQ(kNewTabId, out[1].sync_data().GetSpecifics().session().tab().tab_id()); - EXPECT_EQ(kBar2, out[1] - .sync_data() - .GetSpecifics() - .session() - .tab() - .navigation(1) - .virtual_url()); - EXPECT_EQ(SyncChange::ACTION_UPDATE, out[2].change_type()); - EXPECT_EQ(t2_entity.session().tab().tab_id(), - out[2].sync_data().GetSpecifics().session().tab().tab_id()); - EXPECT_EQ(kBaz2, out[2] - .sync_data() - .GetSpecifics() - .session() - .tab() - .navigation(1) - .virtual_url()); + // Verify TabLinks. + SessionsSyncManager::TabLinksMap tab_map = manager()->local_tab_map_; + ASSERT_EQ(3U, tab_map.size()); + int t2_tab_id = t2_entity.session().tab().tab_id(); + EXPECT_EQ(2, tab_map.find(t2_tab_id)->second->tab_node_id()); + EXPECT_EQ(1, tab_map.find(kNewTabId)->second->tab_node_id()); + int t0_tab_id = out[0].sync_data().GetSpecifics().session().tab().tab_id(); + EXPECT_EQ(0, tab_map.find(t0_tab_id)->second->tab_node_id()); + // TODO(tim): Once bug 337057 is fixed, we can issue an OnLocalTabModified + // from here (using an override similar to above) to return a new tab id + // and verify that we don't see any node creations in the SyncChangeProcessor + // (similar to how SessionsSyncManagerTest.OnLocalTabModified works.) } // Ensure model association updates the window ID for tabs whose window's ID has @@ -1135,22 +1035,21 @@ syncer::SyncChangeList out; // Set up one tab and start sync with it. - AddTab(browser(), GURL(kFoo1)); - NavigateAndCommitActiveTab(GURL(kFoo2)); + AddTab(browser(), GURL("http://foo1")); + NavigateAndCommitActiveTab(GURL("http://foo2")); InitWithSyncDataTakeOutput(in, &out); - // Should be one header add, 1 tab add, and one header update. - ASSERT_EQ(3U, out.size()); - const sync_pb::EntitySpecifics t0_entity = out[1].sync_data().GetSpecifics(); - ASSERT_TRUE(t0_entity.session().has_tab()); + // Should be one header add, 1 tab add/update pair, and one header update. + ASSERT_EQ(4U, out.size()); + const sync_pb::EntitySpecifics t0_entity = out[2].sync_data().GetSpecifics(); in.push_back(CreateRemoteData(t0_entity)); out.clear(); manager()->StopSyncing(syncer::SESSIONS); - // Override the tab with a placeholder tab delegate. - PlaceholderTabDelegate t0_override(t0_entity.session().tab().tab_id(), - t0_entity.session().tab_node_id()); + // SyncedTabDelegateFake is a placeholder (no WebContents) by default. + SyncedTabDelegateFake t0_override; + t0_override.SetSyncId(t0_entity.session().tab_node_id()); // Set up the window override with the new window ID and placeholder tab. const std::set<const SyncedWindowDelegate*>& windows = @@ -1179,64 +1078,6 @@ EXPECT_EQ(SyncChange::ACTION_UPDATE, out[0].change_type()); EXPECT_EQ(kNewWindowId, out[0].sync_data().GetSpecifics().session().tab().window_id()); - EXPECT_EQ(kFoo2, out[0] - .sync_data() - .GetSpecifics() - .session() - .tab() - .navigation(1) - .virtual_url()); -} - -// Ensure that the manager properly ignores a restored placeholder that refers -// to a tab node that doesn't exist -TEST_F(SessionsSyncManagerTest, RestoredPlacholderTabNodeDeleted) { - const int kNewWindowId = 1337; - syncer::SyncDataList in; - syncer::SyncChangeList out; - - // Set up one tab and start sync with it. - AddTab(browser(), GURL(kFoo1)); - NavigateAndCommitActiveTab(GURL(kFoo2)); - InitWithSyncDataTakeOutput(in, &out); - - // Should be one header add, 1 tab add, and one header update. - ASSERT_EQ(3U, out.size()); - const sync_pb::EntitySpecifics t0_entity = out[1].sync_data().GetSpecifics(); - ASSERT_TRUE(t0_entity.session().has_tab()); - - out.clear(); - manager()->StopSyncing(syncer::SESSIONS); - - // Override the tab with a placeholder tab delegate. - PlaceholderTabDelegate t0_override(t0_entity.session().tab().tab_id(), - t0_entity.session().tab_node_id()); - - // Set up the window override with the new window ID and placeholder tab. - const std::set<const SyncedWindowDelegate*>& windows = - get_synced_window_getter()->GetSyncedWindowDelegates(); - ASSERT_EQ(1U, windows.size()); - SyncedWindowDelegateOverride window_override(*windows.begin()); - window_override.OverrideSessionId(kNewWindowId); - window_override.OverrideTabAt(0, &t0_override, - t0_entity.session().tab().tab_id()); - - // Inject the window override. - std::set<const SyncedWindowDelegate*> delegates; - delegates.insert(&window_override); - std::unique_ptr<TestSyncedWindowDelegatesGetter> getter( - new TestSyncedWindowDelegatesGetter(delegates)); - set_synced_window_getter(getter.get()); - - syncer::SyncMergeResult result = manager()->MergeDataAndStartSyncing( - syncer::SESSIONS, in, std::unique_ptr<syncer::SyncChangeProcessor>( - new TestSyncProcessorStub(&out)), - std::unique_ptr<syncer::SyncErrorFactory>( - new syncer::SyncErrorFactoryMock())); - - // Because no entities were passed in at associate time, there should be no - // tab changes. - ASSERT_EQ(0U, FilterOutLocalHeaderChanges(&out)->size()); } // Tests MergeDataAndStartSyncing with sync data but no local data. @@ -1299,8 +1140,7 @@ syncer::SyncChangeList output; InitWithSyncDataTakeOutput(foreign_data, &output); - // Should be one header add, 1 tab add, and one header update. - ASSERT_EQ(3U, output.size()); + ASSERT_EQ(4U, output.size()); // Verify the local header. EXPECT_TRUE(output[0].IsValid()); @@ -1328,12 +1168,12 @@ } EXPECT_EQ(SyncChange::ACTION_ADD, output[1].change_type()); EXPECT_EQ(SyncChange::ACTION_UPDATE, output[2].change_type()); - EXPECT_TRUE(output[1].sync_data().GetSpecifics().session().has_tab()); + EXPECT_TRUE(output[2].sync_data().GetSpecifics().session().has_tab()); // Verify the header was updated to reflect window state. - EXPECT_TRUE(output[2].IsValid()); - EXPECT_EQ(SyncChange::ACTION_UPDATE, output[2].change_type()); - const SyncData data_2(output[2].sync_data()); + EXPECT_TRUE(output[3].IsValid()); + EXPECT_EQ(SyncChange::ACTION_UPDATE, output[3].change_type()); + const SyncData data_2(output[3].sync_data()); EXPECT_EQ(manager()->current_machine_tag(), syncer::SyncDataLocal(data_2).GetTag()); const sync_pb::SessionSpecifics& specifics2(data_2.GetSpecifics().session()); @@ -1376,9 +1216,7 @@ syncer::SyncChangeList output1; InitWithSyncDataTakeOutput(foreign_data1, &output1); - - // 1 header add, one tab add, one header update. - ASSERT_EQ(3U, output1.size()); + ASSERT_EQ(4U, output1.size()); // Add a second window to the foreign session. // TODO(tim): Bug 98892. Add local window too when observers are hooked up. @@ -1469,10 +1307,10 @@ tag, tab_nums1, &tabs)); // Update associator with the session's meta node, window, and tabs. - manager()->UpdateTrackerWithSpecifics(meta, base::Time()); + manager()->UpdateTrackerWithForeignSession(meta, base::Time()); for (std::vector<sync_pb::SessionSpecifics>::iterator iter = tabs.begin(); iter != tabs.end(); ++iter) { - manager()->UpdateTrackerWithSpecifics(*iter, base::Time()); + manager()->UpdateTrackerWithForeignSession(*iter, base::Time()); } ASSERT_TRUE(manager()->GetAllForeignSessions(&foreign_sessions)); ASSERT_EQ(1U, foreign_sessions.size()); @@ -1484,7 +1322,7 @@ EXPECT_EQ(5U, changes.size()); std::set<std::string> expected_tags(&tag, &tag + 1); for (int i = 0; i < 5; i++) - expected_tags.insert(TabNodeIdToTag(tag, i)); + expected_tags.insert(TabNodePool::TabIdToTag(tag, i)); for (int i = 0; i < 5; i++) { SCOPED_TRACE(changes[i].ToString()); @@ -1607,31 +1445,40 @@ // committing the NavigationEntry. The first notification results in a tab // we don't associate although we do update the header node. The second // notification triggers association of the tab, and the subsequent window - // update. So we should see 3 changes at the SyncChangeProcessor. - ASSERT_EQ(3U, out.size()); + // update. So we should see 4 changes at the SyncChangeProcessor. + ASSERT_EQ(4U, out.size()); EXPECT_EQ(SyncChange::ACTION_UPDATE, out[0].change_type()); ASSERT_TRUE(out[0].sync_data().GetSpecifics().session().has_header()); EXPECT_EQ(SyncChange::ACTION_ADD, out[1].change_type()); int tab_node_id = out[1].sync_data().GetSpecifics().session().tab_node_id(); - EXPECT_EQ(TabNodeIdToTag(manager()->current_machine_tag(), tab_node_id), + EXPECT_EQ(TabNodePool::TabIdToTag( + manager()->current_machine_tag(), tab_node_id), syncer::SyncDataLocal(out[1].sync_data()).GetTag()); EXPECT_EQ(SyncChange::ACTION_UPDATE, out[2].change_type()); - ASSERT_TRUE(out[2].sync_data().GetSpecifics().session().has_header()); + ASSERT_TRUE(out[2].sync_data().GetSpecifics().session().has_tab()); + EXPECT_EQ(SyncChange::ACTION_UPDATE, out[3].change_type()); + ASSERT_TRUE(out[3].sync_data().GetSpecifics().session().has_header()); // Verify the actual content. const sync_pb::SessionHeader& session_header = - out[2].sync_data().GetSpecifics().session().header(); + out[3].sync_data().GetSpecifics().session().header(); ASSERT_EQ(1, session_header.window_size()); EXPECT_EQ(1, session_header.window(0).tab_size()); const sync_pb::SessionTab& tab1 = - out[1].sync_data().GetSpecifics().session().tab(); + out[2].sync_data().GetSpecifics().session().tab(); ASSERT_EQ(1, tab1.navigation_size()); EXPECT_EQ(foo1.spec(), tab1.navigation(0).virtual_url()); // Verify TabNodePool integrity. - EXPECT_EQ(1U, GetTabPool()->Capacity()); - EXPECT_TRUE(GetTabPool()->Empty()); + EXPECT_EQ(1U, manager()->local_tab_pool_.Capacity()); + EXPECT_TRUE(manager()->local_tab_pool_.Empty()); + + // Verify TabLinks. + SessionsSyncManager::TabLinksMap tab_map = manager()->local_tab_map_; + ASSERT_EQ(1U, tab_map.size()); + int tab_id = out[2].sync_data().GetSpecifics().session().tab().tab_id(); + EXPECT_EQ(tab_node_id, tab_map.find(tab_id)->second->tab_node_id()); } // Test that receiving a session delete from sync removes the session @@ -1775,8 +1622,7 @@ manager()->session_tracker_.LookupSessionTab(session_tag, 2, &tab)); std::set<int> tab_node_ids; - manager()->session_tracker_.LookupForeignTabNodeIds(session_tag, - &tab_node_ids); + manager()->session_tracker_.LookupTabNodeIds(session_tag, &tab_node_ids); EXPECT_EQ(6U, tab_node_ids.size()); EXPECT_TRUE(tab_node_ids.find(tab1A.tab_node_id()) != tab_node_ids.end()); EXPECT_TRUE(tab_node_ids.find(tab1B.tab_node_id()) != tab_node_ids.end()); @@ -1792,8 +1638,7 @@ manager()->ProcessSyncChanges(FROM_HERE, changes); tab_node_ids.clear(); - manager()->session_tracker_.LookupForeignTabNodeIds(session_tag, - &tab_node_ids); + manager()->session_tracker_.LookupTabNodeIds(session_tag, &tab_node_ids); EXPECT_EQ(3U, tab_node_ids.size()); EXPECT_TRUE(tab_node_ids.find(tab1C.tab_node_id()) != tab_node_ids.end()); EXPECT_TRUE(tab_node_ids.find(tab2A.tab_node_id()) != tab_node_ids.end()); @@ -1831,8 +1676,7 @@ output.clear(); std::set<int> tab_node_ids; - manager()->session_tracker_.LookupForeignTabNodeIds(session_tag, - &tab_node_ids); + manager()->session_tracker_.LookupTabNodeIds(session_tag, &tab_node_ids); EXPECT_EQ(2U, tab_node_ids.size()); EXPECT_TRUE(tab_node_ids.find(tab_node_id_shared) != tab_node_ids.end()); EXPECT_TRUE(tab_node_ids.find(tab_node_id_unique) != tab_node_ids.end()); @@ -1842,8 +1686,7 @@ manager()->ProcessSyncChanges(FROM_HERE, changes); tab_node_ids.clear(); - manager()->session_tracker_.LookupForeignTabNodeIds(session_tag, - &tab_node_ids); + manager()->session_tracker_.LookupTabNodeIds(session_tag, &tab_node_ids); EXPECT_EQ(1U, tab_node_ids.size()); EXPECT_TRUE(tab_node_ids.find(tab_node_id_unique) != tab_node_ids.end()); @@ -1851,45 +1694,34 @@ EXPECT_EQ(1U, output.size()); } -TEST_F(SessionsSyncManagerTest, AssociationReusesNodes) { +// TODO(shashishekhar): "Move this to TabNodePool unittests." +TEST_F(SessionsSyncManagerTest, SaveUnassociatedNodesForReassociation) { syncer::SyncChangeList changes; - AddTab(browser(), GURL("http://foo1")); - InitWithSyncDataTakeOutput(syncer::SyncDataList(), &changes); - ASSERT_EQ(3U, changes.size()); // Header add, tab add, header update. - ASSERT_TRUE(changes[1].sync_data().GetSpecifics().session().has_tab()); - int tab_node_id = - changes[1].sync_data().GetSpecifics().session().tab_node_id(); + InitWithNoSyncData(); - // Pass back the previous tab and header nodes at association, along with a - // second tab node (with a rewritten tab node id). - syncer::SyncDataList in; - in.push_back( - CreateRemoteData(changes[2].sync_data().GetSpecifics())); // Header node. - sync_pb::SessionSpecifics new_tab( - changes[1].sync_data().GetSpecifics().session()); - new_tab.set_tab_node_id(tab_node_id + 1); - in.push_back(CreateRemoteData(new_tab)); // New tab node. - in.push_back(CreateRemoteData( - changes[1].sync_data().GetSpecifics())); // Old tab node. + std::string local_tag = manager()->current_machine_tag(); + // Create a free node and then dissassociate sessions so that it ends up + // unassociated. + manager()->local_tab_pool_.GetFreeTabNode(&changes); + + // Update the tab_id of the node, so that it is considered a valid + // unassociated node otherwise it will be mistaken for a corrupted node and + // will be deleted before being added to the tab node pool. + sync_pb::EntitySpecifics entity(changes[0].sync_data().GetSpecifics()); + entity.mutable_session()->mutable_tab()->set_tab_id(1); + SyncData d = CreateRemoteData(entity); + syncer::SyncDataList in(&d, &d + 1); changes.clear(); - - // Reassociate (with the same single tab/window open). - manager()->StopSyncing(syncer::SESSIONS); - syncer::SyncMergeResult result = manager()->MergeDataAndStartSyncing( + SessionsSyncManager manager2(GetSyncSessionsClient(), sync_prefs(), + local_device(), NewDummyRouter(), + base::Closure(), base::Closure()); + syncer::SyncMergeResult result = manager2.MergeDataAndStartSyncing( syncer::SESSIONS, in, std::unique_ptr<syncer::SyncChangeProcessor>( new TestSyncProcessorStub(&changes)), std::unique_ptr<syncer::SyncErrorFactory>( new syncer::SyncErrorFactoryMock())); ASSERT_FALSE(result.error().IsSet()); - - // No tab entities should be deleted. The original (lower) tab node id should - // be reused for association. - FilterOutLocalHeaderChanges(&changes); - ASSERT_EQ(1U, changes.size()); - EXPECT_EQ(SyncChange::ACTION_UPDATE, changes[0].change_type()); - EXPECT_TRUE(changes[0].sync_data().GetSpecifics().session().has_tab()); - EXPECT_EQ(tab_node_id, - changes[0].sync_data().GetSpecifics().session().tab_node_id()); + EXPECT_TRUE(FilterOutLocalHeaderChanges(&changes)->empty()); } TEST_F(SessionsSyncManagerTest, MergeDeletesCorruptNode) { @@ -1897,19 +1729,16 @@ InitWithNoSyncData(); std::string local_tag = manager()->current_machine_tag(); - int tab_node_id = TabNodePool::kInvalidTabNodeID; - GetTabPool()->GetTabNodeForTab(0, &tab_node_id); - sync_pb::SessionSpecifics specifics; - specifics.set_session_tag(local_tag); - specifics.set_tab_node_id(tab_node_id); - SyncData d = CreateRemoteData(specifics); + int tab_node_id = manager()->local_tab_pool_.GetFreeTabNode(&changes); + SyncData d = CreateRemoteData(changes[0].sync_data().GetSpecifics()); syncer::SyncDataList in(&d, &d + 1); + changes.clear(); TearDown(); SetUp(); InitWithSyncDataTakeOutput(in, &changes); EXPECT_EQ(1U, FilterOutLocalHeaderChanges(&changes)->size()); EXPECT_EQ(SyncChange::ACTION_DELETE, changes[0].change_type()); - EXPECT_EQ(TabNodeIdToTag(local_tag, tab_node_id), + EXPECT_EQ(TabNodePool::TabIdToTag(local_tag, tab_node_id), syncer::SyncDataLocal(changes[0].sync_data()).GetTag()); } @@ -1978,7 +1807,7 @@ // Go to a sync-interesting URL. NavigateAndCommitActiveTab(GURL("http://foo2")); - EXPECT_EQ(2U, out.size()); // Tab add and header update. + EXPECT_EQ(3U, out.size()); // Tab add, update, and header update. EXPECT_TRUE( base::StartsWith(syncer::SyncDataLocal(out[0].sync_data()).GetTag(), @@ -1988,9 +1817,18 @@ out[0].sync_data().GetSpecifics().session().session_tag()); EXPECT_EQ(SyncChange::ACTION_ADD, out[0].change_type()); - EXPECT_TRUE(out[1].IsValid()); + EXPECT_TRUE( + base::StartsWith(syncer::SyncDataLocal(out[1].sync_data()).GetTag(), + manager()->current_machine_tag(), + base::CompareCase::SENSITIVE)); + EXPECT_EQ(manager()->current_machine_tag(), + out[1].sync_data().GetSpecifics().session().session_tag()); + EXPECT_TRUE(out[1].sync_data().GetSpecifics().session().has_tab()); EXPECT_EQ(SyncChange::ACTION_UPDATE, out[1].change_type()); - const SyncData data(out[1].sync_data()); + + EXPECT_TRUE(out[2].IsValid()); + EXPECT_EQ(SyncChange::ACTION_UPDATE, out[2].change_type()); + const SyncData data(out[2].sync_data()); EXPECT_EQ(manager()->current_machine_tag(), syncer::SyncDataLocal(data).GetTag()); const sync_pb::SessionSpecifics& specifics(data.GetSpecifics().session()); @@ -2022,17 +1860,17 @@ AddTab(browser(), bar1); NavigateAndCommitActiveTab(bar2); - // Change type breakdown: - const size_t kChangesPerTabCreation = 3; // 1 tab add + 2 header updates. - const size_t kChangesPerTabNav = 2; // 1 tab update + 1 header update. - const size_t kChangesPerTab = kChangesPerTabNav + kChangesPerTabCreation; - const size_t kNumTabs = 2; - const size_t kTotalUpdates = kChangesPerTab * kNumTabs; - ASSERT_EQ(kTotalUpdates, out.size()); + // One add, one update for each AddTab. + // One update for each NavigateAndCommit. + // = 6 total tab updates. + // One header update corresponding to each of those. + // = 6 total header updates. + // 12 total updates. + ASSERT_EQ(12U, out.size()); // Verify the tab node creations and updates to ensure the SyncProcessor // sees the right operations. - for (size_t i = 0; i < kTotalUpdates; i++) { + for (int i = 0; i < 12; i++) { SCOPED_TRACE(i); EXPECT_TRUE(out[i].IsValid()); const SyncData data(out[i].sync_data()); @@ -2041,30 +1879,40 @@ base::CompareCase::SENSITIVE)); const sync_pb::SessionSpecifics& specifics(data.GetSpecifics().session()); EXPECT_EQ(manager()->current_machine_tag(), specifics.session_tag()); - if (i % kChangesPerTab == 0) { + if (i % 6 == 0) { // First thing on an AddTab is a no-op header update for parented tab. EXPECT_EQ(header.SerializeAsString(), data.GetSpecifics().SerializeAsString()); EXPECT_EQ(manager()->current_machine_tag(), syncer::SyncDataLocal(data).GetTag()); - } else if (i % kChangesPerTab == 1) { - // Next, the tab should be added. + } else if (i % 6 == 1) { + // Next, the TabNodePool should create the tab node. EXPECT_EQ(SyncChange::ACTION_ADD, out[i].change_type()); - EXPECT_EQ(TabNodeIdToTag(manager()->current_machine_tag(), - data.GetSpecifics().session().tab_node_id()), + EXPECT_EQ(TabNodePool::TabIdToTag( + manager()->current_machine_tag(), + data.GetSpecifics().session().tab_node_id()), syncer::SyncDataLocal(data).GetTag()); - } else if (i % kChangesPerTab == 2) { + } else if (i % 6 == 2) { + // Then we see the tab update to the URL. + EXPECT_EQ(SyncChange::ACTION_UPDATE, out[i].change_type()); + EXPECT_EQ(TabNodePool::TabIdToTag( + manager()->current_machine_tag(), + data.GetSpecifics().session().tab_node_id()), + syncer::SyncDataLocal(data).GetTag()); + ASSERT_TRUE(specifics.has_tab()); + } else if (i % 6 == 3) { // The header needs to be updated to reflect the new window state. EXPECT_EQ(SyncChange::ACTION_UPDATE, out[i].change_type()); EXPECT_TRUE(specifics.has_header()); - } else if (i % kChangesPerTab == 3) { + } else if (i % 6 == 4) { // Now we move on to NavigateAndCommit. Update the tab. EXPECT_EQ(SyncChange::ACTION_UPDATE, out[i].change_type()); - EXPECT_EQ(TabNodeIdToTag(manager()->current_machine_tag(), - data.GetSpecifics().session().tab_node_id()), + EXPECT_EQ(TabNodePool::TabIdToTag( + manager()->current_machine_tag(), + data.GetSpecifics().session().tab_node_id()), syncer::SyncDataLocal(data).GetTag()); ASSERT_TRUE(specifics.has_tab()); - } else if (i % kChangesPerTab == 4) { + } else if (i % 6 == 5) { // The header needs to be updated to reflect the new window state. EXPECT_EQ(SyncChange::ACTION_UPDATE, out[i].change_type()); ASSERT_TRUE(specifics.has_header()); @@ -2081,33 +1929,25 @@ // ASSERT_TRUEs above allow us to dive in freely here. // Verify first tab. const sync_pb::SessionTab& tab1_1 = - out[1].sync_data().GetSpecifics().session().tab(); + out[2].sync_data().GetSpecifics().session().tab(); ASSERT_EQ(1, tab1_1.navigation_size()); EXPECT_EQ(foo1.spec(), tab1_1.navigation(0).virtual_url()); const sync_pb::SessionTab& tab1_2 = - out[3].sync_data().GetSpecifics().session().tab(); + out[4].sync_data().GetSpecifics().session().tab(); ASSERT_EQ(2, tab1_2.navigation_size()); EXPECT_EQ(foo1.spec(), tab1_2.navigation(0).virtual_url()); EXPECT_EQ(foo2.spec(), tab1_2.navigation(1).virtual_url()); // Verify second tab. const sync_pb::SessionTab& tab2_1 = - out[6].sync_data().GetSpecifics().session().tab(); + out[8].sync_data().GetSpecifics().session().tab(); ASSERT_EQ(1, tab2_1.navigation_size()); EXPECT_EQ(bar1.spec(), tab2_1.navigation(0).virtual_url()); const sync_pb::SessionTab& tab2_2 = - out[8].sync_data().GetSpecifics().session().tab(); + out[10].sync_data().GetSpecifics().session().tab(); ASSERT_EQ(2, tab2_2.navigation_size()); EXPECT_EQ(bar1.spec(), tab2_2.navigation(0).virtual_url()); EXPECT_EQ(bar2.spec(), tab2_2.navigation(1).virtual_url()); - - // Verify tab delegates have Sync ids. - std::set<const SyncedWindowDelegate*> window_delegates = - get_synced_window_getter()->GetSyncedWindowDelegates(); - // Sync ids are in reverse order because tabs are inserted at the beginning - // of the tab list. - EXPECT_EQ(1, (*window_delegates.begin())->GetTabAt(0)->GetSyncId()); - EXPECT_EQ(0, (*window_delegates.begin())->GetTabAt(1)->GetSyncId()); } // Check that if a tab becomes uninteresting (for example no syncable URLs), @@ -2125,21 +1965,21 @@ // Add an interesting tab. AddTab(browser(), kValidUrl); - // No-op header update, tab creation, header update. - ASSERT_EQ(3U, out.size()); + // No-op header update, tab creation, tab update, header update. + ASSERT_EQ(4U, out.size()); // The last two are the interesting updates. - ASSERT_TRUE(out[1].sync_data().GetSpecifics().session().has_tab()); - EXPECT_EQ(kValidUrl.spec(), out[1] + ASSERT_TRUE(out[2].sync_data().GetSpecifics().session().has_tab()); + EXPECT_EQ(kValidUrl.spec(), out[2] .sync_data() .GetSpecifics() .session() .tab() .navigation(0) .virtual_url()); - ASSERT_TRUE(out[2].sync_data().GetSpecifics().session().has_header()); + ASSERT_TRUE(out[3].sync_data().GetSpecifics().session().has_header()); ASSERT_EQ(1, - out[2].sync_data().GetSpecifics().session().header().window_size()); - ASSERT_EQ(1, out[2] + out[3].sync_data().GetSpecifics().session().header().window_size()); + ASSERT_EQ(1, out[3] .sync_data() .GetSpecifics() .session() @@ -2175,7 +2015,7 @@ syncer::SyncChangeList out; InitWithSyncDataTakeOutput(syncer::SyncDataList(), &out); - ASSERT_EQ(4U, out.size()); // Header creation, add two tabs, header update + ASSERT_EQ(6U, out.size()); // Check that this machine's data is not included in the foreign windows. std::vector<const SyncedSession*> foreign_sessions; @@ -2196,7 +2036,7 @@ EXPECT_EQ(0, header_s.window_size()); // Verify the tab node creations and updates with content. - for (int i = 1; i < 3; i++) { + for (int i = 1; i < 5; i++) { EXPECT_TRUE(out[i].IsValid()); const SyncData data(out[i].sync_data()); EXPECT_TRUE(base::StartsWith(syncer::SyncDataLocal(data).GetTag(), @@ -2204,13 +2044,18 @@ base::CompareCase::SENSITIVE)); const sync_pb::SessionSpecifics& specifics(data.GetSpecifics().session()); EXPECT_EQ(manager()->current_machine_tag(), specifics.session_tag()); - EXPECT_EQ(SyncChange::ACTION_ADD, out[i].change_type()); + if (i % 2 == 1) { + EXPECT_EQ(SyncChange::ACTION_ADD, out[i].change_type()); + } else { + EXPECT_EQ(SyncChange::ACTION_UPDATE, out[i].change_type()); + EXPECT_TRUE(specifics.has_tab()); + } } // Verify the header was updated to reflect new window state. - EXPECT_TRUE(out[3].IsValid()); - EXPECT_EQ(SyncChange::ACTION_UPDATE, out[3].change_type()); - const SyncData data_2(out[3].sync_data()); + EXPECT_TRUE(out[5].IsValid()); + EXPECT_EQ(SyncChange::ACTION_UPDATE, out[5].change_type()); + const SyncData data_2(out[5].sync_data()); EXPECT_EQ(manager()->current_machine_tag(), syncer::SyncDataLocal(data_2).GetTag()); const sync_pb::SessionSpecifics& specifics2(data_2.GetSpecifics().session()); @@ -2219,13 +2064,19 @@ const sync_pb::SessionHeader& header_s2 = specifics2.header(); EXPECT_EQ(1, header_s2.window_size()); - // Verify tab delegates have Sync ids. - std::set<const SyncedWindowDelegate*> window_delegates = - get_synced_window_getter()->GetSyncedWindowDelegates(); - // Sync ids are in same order as tabs because the association happens after - // the tabs are opened (and therefore iterates through same order). - EXPECT_EQ(0, (*window_delegates.begin())->GetTabAt(0)->GetSyncId()); - EXPECT_EQ(1, (*window_delegates.begin())->GetTabAt(1)->GetSyncId()); + // Verify TabLinks. + SessionsSyncManager::TabLinksMap tab_map = manager()->local_tab_map_; + ASSERT_EQ(2U, tab_map.size()); + // Tabs are ordered by sessionid in tab_map, so should be able to traverse + // the tree based on order of tabs created + SessionsSyncManager::TabLinksMap::iterator iter = tab_map.begin(); + ASSERT_EQ(2, iter->second->tab()->GetEntryCount()); + EXPECT_EQ(GURL("http://foo1"), iter->second->tab()->GetVirtualURLAtIndex(0)); + EXPECT_EQ(GURL("http://foo2"), iter->second->tab()->GetVirtualURLAtIndex(1)); + iter++; + ASSERT_EQ(2, iter->second->tab()->GetEntryCount()); + EXPECT_EQ(GURL("http://bar1"), iter->second->tab()->GetVirtualURLAtIndex(0)); + EXPECT_EQ(GURL("http://bar2"), iter->second->tab()->GetVirtualURLAtIndex(1)); } TEST_F(SessionsSyncManagerTest, ForeignSessionModifiedTime) { @@ -2328,7 +2179,8 @@ for (int i = 1; i < 5; i++) { EXPECT_EQ(SyncChange::ACTION_DELETE, output[i].change_type()); const SyncData data(output[i].sync_data()); - EXPECT_EQ(TabNodeIdToTag(tag1, i), syncer::SyncDataLocal(data).GetTag()); + EXPECT_EQ(TabNodePool::TabIdToTag(tag1, i), + syncer::SyncDataLocal(data).GetTag()); } ASSERT_TRUE(manager()->GetAllForeignSessions(&foreign_sessions)); @@ -2451,8 +2303,7 @@ syncer::SyncChangeList out; InitWithSyncDataTakeOutput(syncer::SyncDataList(), &out); - ASSERT_EQ(3U, out.size()); // Header ADD, tab ADD, header UPDATE. - out.clear(); + ASSERT_EQ(4U, out.size()); // Header, tab ADD, tab UPDATE, header UPDATE. // To simulate WebContents swap during prerendering, create new WebContents // and swap with old WebContents. @@ -2473,28 +2324,24 @@ old_web_contents.get()); browser()->tab_strip_model()->ReplaceWebContentsAt(index, new_web_contents); - ASSERT_EQ(4U, out.size()); - EXPECT_EQ(SyncChange::ACTION_ADD, out[0].change_type()); - out.clear(); + ASSERT_EQ(9U, out.size()); + EXPECT_EQ(SyncChange::ACTION_ADD, out[4].change_type()); + EXPECT_EQ(SyncChange::ACTION_UPDATE, out[5].change_type()); - // Navigate away. +1 tab updates, 1 header update. + // Navigate away. NavigateAndCommitActiveTab(GURL("http://bar2")); // Delete old WebContents. This should not crash. - // +1 no-op header update. old_web_contents.reset(); // Try more navigations and verify output size. This can also reveal // bugs (leaks) on memcheck bots if the SessionSyncManager // didn't properly clean up the tab pool or session tracker. - // +1 tab updates, 1 header update. NavigateAndCommitActiveTab(GURL("http://bar3")); - // +1 no-op header update, tab add, header update. AddTab(browser(), GURL("http://bar4")); - // +1 tab update, header update. NavigateAndCommitActiveTab(GURL("http://bar5")); - ASSERT_EQ(10U, out.size()); + ASSERT_EQ(19U, out.size()); } // Test that NOTIFICATION_FOREIGN_SESSION_UPDATED is sent when processing
diff --git a/chrome/browser/ui/ash/cast_config_client_media_router.cc b/chrome/browser/ui/ash/cast_config_client_media_router.cc index 26e7847..333ca46 100644 --- a/chrome/browser/ui/ash/cast_config_client_media_router.cc +++ b/chrome/browser/ui/ash/cast_config_client_media_router.cc
@@ -95,7 +95,7 @@ : MediaRoutesObserver(GetMediaRouter()), MediaSinksObserver(GetMediaRouter(), media_router::MediaSourceForDesktop(), - url::Origin(GURL(chrome::kChromeUIMediaRouterURL))), + GURL(chrome::kChromeUIMediaRouterURL)), cast_config_client_(cast_config_client) {} CastDeviceCache::~CastDeviceCache() {} @@ -226,7 +226,7 @@ // TODO(imcheng): Pass in tab casting timeout. GetMediaRouter()->CreateRoute( media_router::MediaSourceForDesktop().id(), sink->id, - url::Origin(GURL("http://cros-cast-origin/")), nullptr, + GURL("http://cros-cast-origin/"), nullptr, std::vector<media_router::MediaRouteResponseCallback>(), base::TimeDelta(), false); }
diff --git a/chrome/browser/ui/ash/system_tray_tray_cast_browsertest_media_router_chromeos.cc b/chrome/browser/ui/ash/system_tray_tray_cast_browsertest_media_router_chromeos.cc index eb20ef7..bd4f50e5 100644 --- a/chrome/browser/ui/ash/system_tray_tray_cast_browsertest_media_router_chromeos.cc +++ b/chrome/browser/ui/ash/system_tray_tray_cast_browsertest_media_router_chromeos.cc
@@ -118,25 +118,23 @@ // The tray should be hidden when there are no sinks. EXPECT_FALSE(test_api.IsTrayVisible()); - media_sinks_observer()->OnSinksUpdated(zero_sinks, - std::vector<url::Origin>()); + media_sinks_observer()->OnSinksUpdated(zero_sinks, std::vector<GURL>()); // Flush mojo messages from the chrome object to the ash object. content::RunAllPendingInMessageLoop(); EXPECT_FALSE(test_api.IsTrayVisible()); EXPECT_FALSE(test_api.IsTraySelectViewVisible()); // The tray should be visible with any more than zero sinks. - media_sinks_observer()->OnSinksUpdated(one_sink, std::vector<url::Origin>()); + media_sinks_observer()->OnSinksUpdated(one_sink, std::vector<GURL>()); content::RunAllPendingInMessageLoop(); EXPECT_TRUE(test_api.IsTrayVisible()); - media_sinks_observer()->OnSinksUpdated(two_sinks, std::vector<url::Origin>()); + media_sinks_observer()->OnSinksUpdated(two_sinks, std::vector<GURL>()); content::RunAllPendingInMessageLoop(); EXPECT_TRUE(test_api.IsTrayVisible()); EXPECT_TRUE(test_api.IsTraySelectViewVisible()); // And if all of the sinks go away, it should be hidden again. - media_sinks_observer()->OnSinksUpdated(zero_sinks, - std::vector<url::Origin>()); + media_sinks_observer()->OnSinksUpdated(zero_sinks, std::vector<GURL>()); content::RunAllPendingInMessageLoop(); EXPECT_FALSE(test_api.IsTrayVisible()); EXPECT_FALSE(test_api.IsTraySelectViewVisible()); @@ -154,7 +152,7 @@ // Setup the sinks. const std::vector<media_router::MediaSink> sinks = { MakeSink("remote_sink", "name"), MakeSink("local_sink", "name")}; - media_sinks_observer()->OnSinksUpdated(sinks, std::vector<url::Origin>()); + media_sinks_observer()->OnSinksUpdated(sinks, std::vector<GURL>()); content::RunAllPendingInMessageLoop(); // Create route combinations. More details below.
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm index 3b1bfa8f..e6461dd 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -1639,8 +1639,9 @@ // the browser profile's name unless the browser is incognito. NSView* view; if ([self shouldUseNewAvatarButton]) { - avatarButtonController_.reset( - [[AvatarButtonController alloc] initWithBrowser:browser_.get()]); + avatarButtonController_.reset([[AvatarButtonController alloc] + initWithBrowser:browser_.get() + window:[self window]]); } else { avatarButtonController_.reset( [[AvatarIconController alloc] initWithBrowser:browser_.get()]);
diff --git a/chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm b/chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm index 6951e76b..a53e065 100644 --- a/chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm +++ b/chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm
@@ -7,7 +7,6 @@ #include "base/message_loop/message_loop.h" #include "base/metrics/histogram_macros.h" #include "chrome/browser/external_protocol/external_protocol_handler.h" -#include "chrome/browser/profiles/profile.h" #include "chrome/browser/shell_integration.h" #include "chrome/browser/tab_contents/tab_util.h" #include "chrome/grit/chromium_strings.h" @@ -95,15 +94,9 @@ NOTREACHED(); } - content::WebContents* web_contents = - tab_util::GetWebContentsByID(render_process_host_id_, routing_id_); - // Set the "don't warn me again" info. if ([[alert_ suppressionButton] state] == NSOnState) { - Profile* profile = - Profile::FromBrowserContext(web_contents->GetBrowserContext()); - - ExternalProtocolHandler::SetBlockState(url_.scheme(), blockState, profile); + ExternalProtocolHandler::SetBlockState(url_.scheme(), blockState); ExternalProtocolHandler::RecordMetrics(true); } else { ExternalProtocolHandler::RecordMetrics(false); @@ -113,6 +106,9 @@ UMA_HISTOGRAM_LONG_TIMES("clickjacking.launch_url", base::Time::Now() - creation_time_); + content::WebContents* web_contents = + tab_util::GetWebContentsByID(render_process_host_id_, routing_id_); + ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(url_, web_contents); }
diff --git a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.h b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.h index 51a349ef..062c135 100644 --- a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.h +++ b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.h
@@ -20,9 +20,16 @@ // Whether the signed in profile has an authentication error. Used to // display an error icon next to the button text. BOOL hasError_; + + // The window associated with the avatar button. Weak. + NSWindow* window_; } -// Designated initializer. -- (id)initWithBrowser:(Browser*)browser; +// Designated initializer. The parameter |window| is required because +// browser->window() might be null when the initalizer is called. +- (id)initWithBrowser:(Browser*)browser window:(NSWindow*)window; + +// Returns YES if the browser window's frame color is dark. +- (BOOL)isFrameColorDark; // Overridden so that we can change the active state of the avatar button. - (void)showAvatarBubbleAnchoredAt:(NSView*)anchor
diff --git a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm index 7bc7e0d..c868408 100644 --- a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm +++ b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
@@ -49,6 +49,10 @@ // Kern value for the avatar button title. const CGFloat kTitleKern = 0.25; +// Upper and lower bounds for determining if the frame's theme color is a +// "dark" theme. This value is determined by trial and error. +const CGFloat kFrameColorDarkUpperBound = 0.33; + } // namespace // Button cell with a custom border given by a set of nine-patch image grids. @@ -151,11 +155,14 @@ - (void)setErrorStatus:(BOOL)hasError; - (void)dealloc; - (void)themeDidChangeNotification:(NSNotification*)aNotification; + +// Called right after |window_| became/resigned the main window. +- (void)mainWindowDidChangeNotification:(NSNotification*)aNotification; @end @implementation AvatarButtonController -- (id)initWithBrowser:(Browser*)browser { +- (id)initWithBrowser:(Browser*)browser window:(NSWindow*)window { if ((self = [super initWithBrowser:browser])) { ThemeService* themeService = ThemeServiceFactory::GetForProfile(browser->profile()); @@ -192,11 +199,22 @@ hasError_ = profileObserver_->HasAvatarError(); [self updateAvatarButtonAndLayoutParent:NO]; + window_ = window; + NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; [center addObserver:self selector:@selector(themeDidChangeNotification:) name:kBrowserThemeDidChangeNotification object:nil]; + + [center addObserver:self + selector:@selector(mainWindowDidChangeNotification:) + name:NSWindowDidBecomeMainNotification + object:window]; + [center addObserver:self + selector:@selector(mainWindowDidChangeNotification:) + name:NSWindowDidResignMainNotification + object:window]; } return self; } @@ -215,15 +233,16 @@ [self updateAvatarButtonAndLayoutParent:YES]; } +- (void)mainWindowDidChangeNotification:(NSNotification*)aNotification { + [self updateAvatarButtonAndLayoutParent:NO]; +} + - (void)updateAvatarButtonAndLayoutParent:(BOOL)layoutParent { // The button text has a black foreground and a white drop shadow for regular // windows, and a light text with a dark drop shadow for guest windows // which are themed with a dark background. - NSColor* foregroundColor; - const ui::ThemeProvider* theme = - &ThemeService::GetThemeProviderForProfile(browser_->profile()); - foregroundColor = theme ? theme->GetNSColor(ThemeProperties::COLOR_TAB_TEXT) - : [NSColor blackColor]; + NSColor* foregroundColor = + [self isFrameColorDark] ? [NSColor whiteColor] : [NSColor blackColor]; ProfileAttributesStorage& storage = g_browser_process->profile_manager()->GetProfileAttributesStorage(); @@ -294,6 +313,23 @@ [self updateAvatarButtonAndLayoutParent:YES]; } +- (BOOL)isFrameColorDark { + const ui::ThemeProvider* themeProvider = + &ThemeService::GetThemeProviderForProfile(browser_->profile()); + const int propertyId = [window_ isMainWindow] + ? ThemeProperties::COLOR_FRAME + : ThemeProperties::COLOR_FRAME_INACTIVE; + if (themeProvider && themeProvider->HasCustomColor(propertyId)) { + NSColor* frameColor = themeProvider->GetNSColor(propertyId); + frameColor = + [frameColor colorUsingColorSpaceName:NSCalibratedWhiteColorSpace]; + return frameColor && + [frameColor whiteComponent] < kFrameColorDarkUpperBound; + } + + return false; +} + - (void)showAvatarBubbleAnchoredAt:(NSView*)anchor withMode:(BrowserWindow::AvatarBubbleMode)mode withServiceType:(signin::GAIAServiceType)serviceType @@ -310,6 +346,7 @@ - (void)bubbleWillClose:(NSNotification*)notif { AvatarButton* button = base::mac::ObjCCastStrict<AvatarButton>(button_); [button setIsActive:NO]; + [self updateAvatarButtonAndLayoutParent:NO]; [super bubbleWillClose:notif]; }
diff --git a/chrome/browser/ui/cocoa/profiles/avatar_button_controller_unittest.mm b/chrome/browser/ui/cocoa/profiles/avatar_button_controller_unittest.mm index 8e7d6d3..08baac5 100644 --- a/chrome/browser/ui/cocoa/profiles/avatar_button_controller_unittest.mm +++ b/chrome/browser/ui/cocoa/profiles/avatar_button_controller_unittest.mm
@@ -27,6 +27,30 @@ // Defined in the AvatarButtonController implementation. @interface AvatarButtonController (ExposedForTesting) - (void)setErrorStatus:(BOOL)hasError; +- (void)updateAvatarButtonAndLayoutParent:(BOOL)layoutParent; +@end + +// Mocks the AvatarButtonController class so that we can mock its browser +// window's frame color. +@interface MockAvatarButtonController : AvatarButtonController { + // True if the frame color is dark. + BOOL isFrameDark_; +} + +- (void)setIsFrameDark:(BOOL)isDark; + +@end + +@implementation MockAvatarButtonController + +- (void)setIsFrameDark:(BOOL)isDark { + isFrameDark_ = isDark; +} + +- (BOOL)isFrameColorDark { + return isFrameDark_; +} + @end class AvatarButtonControllerTest : public CocoaProfileTest { @@ -37,8 +61,9 @@ CocoaProfileTest::SetUp(); ASSERT_TRUE(browser()); - controller_.reset( - [[AvatarButtonController alloc] initWithBrowser:browser()]); + controller_.reset([[MockAvatarButtonController alloc] + initWithBrowser:browser() + window:nil]); } void TearDown() override { @@ -50,10 +75,10 @@ NSView* view() { return [controller_ view]; } - AvatarButtonController* controller() { return controller_.get(); } + MockAvatarButtonController* controller() { return controller_.get(); } private: - base::scoped_nsobject<AvatarButtonController> controller_; + base::scoped_nsobject<MockAvatarButtonController> controller_; }; TEST_F(AvatarButtonControllerTest, GenericButtonShown) { @@ -104,3 +129,27 @@ [menu close]; EXPECT_FALSE([controller() menuController]); } + +TEST_F(AvatarButtonControllerTest, TitleColor) { + // Create a second profile, to force the button to display the profile name. + testing_profile_manager()->CreateTestingProfile("batman"); + + // Set the frame color to be not dark. The button's title color should be + // black. + [controller() setIsFrameDark:NO]; + [controller() updateAvatarButtonAndLayoutParent:NO]; + NSColor* titleColor = + [[button() attributedTitle] attribute:NSForegroundColorAttributeName + atIndex:0 + effectiveRange:nil]; + DCHECK_EQ(titleColor, [NSColor blackColor]); + + // Set the frame color to be dark. The button's title color should be white. + [controller() setIsFrameDark:YES]; + [controller() updateAvatarButtonAndLayoutParent:NO]; + titleColor = + [[button() attributedTitle] attribute:NSForegroundColorAttributeName + atIndex:0 + effectiveRange:nil]; + DCHECK_EQ(titleColor, [NSColor whiteColor]); +}
diff --git a/chrome/browser/ui/external_protocol_dialog_delegate.cc b/chrome/browser/ui/external_protocol_dialog_delegate.cc index 925c834..20c662f 100644 --- a/chrome/browser/ui/external_protocol_dialog_delegate.cc +++ b/chrome/browser/ui/external_protocol_dialog_delegate.cc
@@ -5,7 +5,6 @@ #include "chrome/browser/ui/external_protocol_dialog_delegate.h" #include "chrome/browser/external_protocol/external_protocol_handler.h" -#include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_util.h" #include "chrome/grit/chromium_strings.h" #include "chrome/grit/generated_resources.h" @@ -62,29 +61,21 @@ void ExternalProtocolDialogDelegate::DoAccept(const GURL& url, bool dont_block) const { + if (dont_block) { + ExternalProtocolHandler::SetBlockState(url.scheme(), + ExternalProtocolHandler::DONT_BLOCK); + } + content::WebContents* web_contents = tab_util::GetWebContentsByID( render_process_host_id_, render_view_routing_id_); - if (dont_block) { - Profile* profile = - Profile::FromBrowserContext(web_contents->GetBrowserContext()); - - ExternalProtocolHandler::SetBlockState( - url.scheme(), ExternalProtocolHandler::DONT_BLOCK, profile); - } - ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(url, web_contents); } void ExternalProtocolDialogDelegate::DoCancel(const GURL& url, bool dont_block) const { if (dont_block) { - content::WebContents* web_contents = tab_util::GetWebContentsByID( - render_process_host_id_, render_view_routing_id_); - Profile* profile = - Profile::FromBrowserContext(web_contents->GetBrowserContext()); - - ExternalProtocolHandler::SetBlockState( - url.scheme(), ExternalProtocolHandler::BLOCK, profile); + ExternalProtocolHandler::SetBlockState(url.scheme(), + ExternalProtocolHandler::BLOCK); } }
diff --git a/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl_unittest.cc b/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl_unittest.cc index 0414c9c..4ed40ad 100644 --- a/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl_unittest.cc +++ b/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl_unittest.cc
@@ -258,7 +258,7 @@ new CreatePresentationConnectionRequest( RenderFrameHostId(1, 2), {GURL("http://test.com"), GURL("http://test2.com")}, - url::Origin(GURL("http://example.com")), + GURL("http://example.com"), base::Bind(&MediaRouterDialogControllerImplTest:: PresentationSuccessCallback, base::Unretained(this)),
diff --git a/chrome/browser/ui/webui/media_router/media_router_ui.cc b/chrome/browser/ui/webui/media_router/media_router_ui.cc index 8e8e9740..1c99d01 100644 --- a/chrome/browser/ui/webui/media_router/media_router_ui.cc +++ b/chrome/browser/ui/webui/media_router/media_router_ui.cc
@@ -277,7 +277,7 @@ query_result_manager_->AddObserver(this); // Use a placeholder URL as origin for mirroring. - url::Origin origin{GURL(chrome::kChromeUIMediaRouterURL)}; + GURL origin(chrome::kChromeUIMediaRouterURL); // Desktop mirror mode is always available. query_result_manager_->SetSourcesForCastMode( @@ -318,7 +318,8 @@ std::vector<MediaSource> sources = presentation_request.GetMediaSources(); presentation_request_.reset(new PresentationRequest(presentation_request)); query_result_manager_->SetSourcesForCastMode( - MediaCastMode::DEFAULT, sources, presentation_request_->frame_origin()); + MediaCastMode::DEFAULT, sources, + presentation_request_->frame_url().GetOrigin()); // Register for MediaRoute updates. NOTE(mfoltz): If there are multiple // sources that can be connected to via the dialog, this will break. We will // need to observe multiple sources (keyed by sinks) in that case. As this is @@ -390,7 +391,7 @@ bool MediaRouterUI::CreateRoute(const MediaSink::Id& sink_id, MediaCastMode cast_mode) { MediaSource::Id source_id; - url::Origin origin; + GURL origin; std::vector<MediaRouteResponseCallback> route_response_callbacks; base::TimeDelta timeout; bool incognito; @@ -408,7 +409,7 @@ const MediaSink::Id& sink_id, MediaCastMode cast_mode, MediaSource::Id* source_id, - url::Origin* origin, + GURL* origin, std::vector<MediaRouteResponseCallback>* route_response_callbacks, base::TimeDelta* timeout, bool* incognito) { @@ -438,9 +439,8 @@ } current_route_request_id_ = ++route_request_counter_; - *origin = for_default_source - ? presentation_request_->frame_origin() - : url::Origin(GURL(chrome::kChromeUIMediaRouterURL)); + *origin = for_default_source ? presentation_request_->frame_url().GetOrigin() + : GURL(chrome::kChromeUIMediaRouterURL); DVLOG(1) << "DoCreateRoute: origin: " << *origin; // There are 3 cases. In cases (1) and (3) the MediaRouterUI will need to be @@ -486,7 +486,7 @@ bool MediaRouterUI::ConnectRoute(const MediaSink::Id& sink_id, const MediaRoute::Id& route_id) { MediaSource::Id source_id; - url::Origin origin; + GURL origin; std::vector<MediaRouteResponseCallback> route_response_callbacks; base::TimeDelta timeout; bool incognito; @@ -652,7 +652,7 @@ handler_->ReturnSearchResult(found_sink_id); MediaSource::Id source_id; - url::Origin origin; + GURL origin; std::vector<MediaRouteResponseCallback> route_response_callbacks; base::TimeDelta timeout; bool incognito; @@ -707,8 +707,7 @@ } GURL MediaRouterUI::GetFrameURL() const { - return presentation_request_ ? presentation_request_->frame_origin().GetURL() - : GURL(); + return presentation_request_ ? presentation_request_->frame_url() : GURL(); } std::string MediaRouterUI::GetPresentationRequestSourceName() const {
diff --git a/chrome/browser/ui/webui/media_router/media_router_ui.h b/chrome/browser/ui/webui/media_router/media_router_ui.h index c2d1dca..6e4f2b0 100644 --- a/chrome/browser/ui/webui/media_router/media_router_ui.h +++ b/chrome/browser/ui/webui/media_router/media_router_ui.h
@@ -270,7 +270,7 @@ const MediaSink::Id& sink_id, MediaCastMode cast_mode, MediaSource::Id* source_id, - url::Origin* origin, + GURL* origin, std::vector<MediaRouteResponseCallback>* route_response_callbacks, base::TimeDelta* timeout, bool* incognito);
diff --git a/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc b/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc index c62cad7..b2cc643 100644 --- a/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc +++ b/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc
@@ -114,7 +114,7 @@ MediaSink CreateSinkCompatibleWithAllSources() { MediaSink sink("sinkId", "sinkName", MediaSink::GENERIC); for (auto* observer : media_sinks_observers_) - observer->OnSinksUpdated({sink}, std::vector<url::Origin>()); + observer->OnSinksUpdated({sink}, std::vector<GURL>()); return sink; } @@ -170,7 +170,7 @@ CreateMediaRouterUI(profile()); PresentationRequest presentation_request( RenderFrameHostId(0, 0), {GURL("https://presentationurl.com")}, - url::Origin(GURL("https://frameurl.fakeurl"))); + GURL("https://frameurl.fakeurl")); media_router_ui_->OnDefaultPresentationChanged(presentation_request); std::vector<MediaRouteResponseCallback> callbacks; EXPECT_CALL( @@ -208,9 +208,9 @@ TEST_F(MediaRouterUITest, RouteRequestFromIncognito) { CreateMediaRouterUI(profile()->GetOffTheRecordProfile()); - PresentationRequest presentation_request( - RenderFrameHostId(0, 0), {GURL("https://foo.url.com/")}, - url::Origin(GURL("https://frameUrl"))); + PresentationRequest presentation_request(RenderFrameHostId(0, 0), + {GURL("https://foo.url.com/")}, + GURL("https://frameUrl")); media_router_ui_->OnDefaultPresentationChanged(presentation_request); EXPECT_CALL( @@ -477,7 +477,7 @@ create_session_request_.reset(new CreatePresentationConnectionRequest( RenderFrameHostId(0, 0), {GURL("http://google.com/presentation"), GURL("http://google.com/presentation2")}, - url::Origin(GURL("http://google.com")), + GURL("http://google.com"), base::Bind(&PresentationRequestCallbacks::Success, base::Unretained(&request_callbacks)), base::Bind(&PresentationRequestCallbacks::Error, @@ -495,8 +495,7 @@ PresentationRequestCallbacks request_callbacks(expected_error); GURL presentation_url("http://google.com/presentation"); create_session_request_.reset(new CreatePresentationConnectionRequest( - RenderFrameHostId(0, 0), {presentation_url}, - url::Origin(GURL("http://google.com")), + RenderFrameHostId(0, 0), {presentation_url}, GURL("http://google.com"), base::Bind(&PresentationRequestCallbacks::Success, base::Unretained(&request_callbacks)), base::Bind(&PresentationRequestCallbacks::Error, @@ -507,7 +506,7 @@ // presentation url to cause a NotFoundError. std::vector<MediaSink> sinks; sinks.emplace_back("sink id", "sink name", MediaSink::GENERIC); - std::vector<url::Origin> origins; + std::vector<GURL> origins; for (auto* observer : media_sinks_observers_) { if (observer->source().id() != presentation_url.spec()) { observer->OnSinksUpdated(sinks, origins); @@ -526,8 +525,7 @@ PresentationRequestCallbacks request_callbacks(expected_error); GURL presentation_url("http://google.com/presentation"); create_session_request_.reset(new CreatePresentationConnectionRequest( - RenderFrameHostId(0, 0), {presentation_url}, - url::Origin(GURL("http://google.com")), + RenderFrameHostId(0, 0), {presentation_url}, GURL("http://google.com"), base::Bind(&PresentationRequestCallbacks::Success, base::Unretained(&request_callbacks)), base::Bind(&PresentationRequestCallbacks::Error, @@ -538,7 +536,7 @@ // a NotFoundError. std::vector<MediaSink> sinks; sinks.emplace_back("sink id", "sink name", MediaSink::GENERIC); - std::vector<url::Origin> origins; + std::vector<GURL> origins; MediaSource::Id presentation_source_id = MediaSourceForPresentationUrl(presentation_url).id(); for (auto* observer : media_sinks_observers_) {
diff --git a/chrome/browser/ui/webui/media_router/query_result_manager.cc b/chrome/browser/ui/webui/media_router/query_result_manager.cc index 2bd508a..79fbb604 100644 --- a/chrome/browser/ui/webui/media_router/query_result_manager.cc +++ b/chrome/browser/ui/webui/media_router/query_result_manager.cc
@@ -12,7 +12,7 @@ #include "chrome/browser/media/router/media_router.h" #include "chrome/browser/media/router/media_sinks_observer.h" #include "content/public/browser/browser_thread.h" -#include "url/origin.h" +#include "url/gurl.h" namespace media_router { @@ -23,7 +23,7 @@ public: MediaSourceMediaSinksObserver(MediaCastMode cast_mode, const MediaSource& source, - const url::Origin& origin, + const GURL& origin, MediaRouter* router, QueryResultManager* result_manager) : MediaSinksObserver(router, source, origin), @@ -83,7 +83,7 @@ void QueryResultManager::SetSourcesForCastMode( MediaCastMode cast_mode, const std::vector<MediaSource>& sources, - const url::Origin& origin) { + const GURL& origin) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); if (sources.empty()) { LOG(WARNING) << "SetSourcesForCastMode called with empty sources for " @@ -157,7 +157,7 @@ void QueryResultManager::AddObserversForCastMode( MediaCastMode cast_mode, const std::vector<MediaSource>& sources, - const url::Origin& origin) { + const GURL& origin) { for (const MediaSource& source : sources) { if (!base::ContainsKey(sinks_observers_, source)) { std::unique_ptr<MediaSourceMediaSinksObserver> observer(
diff --git a/chrome/browser/ui/webui/media_router/query_result_manager.h b/chrome/browser/ui/webui/media_router/query_result_manager.h index da4681f..553c743 100644 --- a/chrome/browser/ui/webui/media_router/query_result_manager.h +++ b/chrome/browser/ui/webui/media_router/query_result_manager.h
@@ -21,9 +21,7 @@ #include "chrome/browser/ui/webui/media_router/media_cast_mode.h" #include "chrome/browser/ui/webui/media_router/media_sink_with_cast_modes.h" -namespace url { -class Origin; -} // namespace url +class GURL; namespace media_router { @@ -38,7 +36,7 @@ // // Typical use: // -// url::Origin origin{GURL("https://origin.com")}; +// GURL origin("https://origin.com"); // QueryResultManager::Observer* observer = ...; // QueryResultManager result_manager(router); // result_manager.AddObserver(observer); @@ -91,7 +89,7 @@ // with another cast mode, no new queries are begun. void SetSourcesForCastMode(MediaCastMode cast_mode, const std::vector<MediaSource>& sources, - const url::Origin& origin); + const GURL& origin); // Stops notifying observers for |cast_mode|, and removes it from the set of // supported cast modes. @@ -129,7 +127,7 @@ // doesn't already have an associated observer. void AddObserversForCastMode(MediaCastMode cast_mode, const std::vector<MediaSource>& sources, - const url::Origin& origin); + const GURL& origin); // Modifies the set of sinks compatible with |cast_mode| and |source| // to |new_sinks|.
diff --git a/chrome/browser/ui/webui/media_router/query_result_manager_unittest.cc b/chrome/browser/ui/webui/media_router/query_result_manager_unittest.cc index 8a9bbe98..8e01955 100644 --- a/chrome/browser/ui/webui/media_router/query_result_manager_unittest.cc +++ b/chrome/browser/ui/webui/media_router/query_result_manager_unittest.cc
@@ -47,7 +47,7 @@ .WillOnce(Return(true)); EXPECT_CALL(mock_observer_, OnResultsUpdated(_)).Times(1); query_result_manager_.SetSourcesForCastMode(cast_mode, {source}, - url::Origin(GURL(kOrigin))); + GURL(kOrigin)); } bool IsDefaultSourceForSink(const MediaSource* source, @@ -108,6 +108,7 @@ } TEST_F(QueryResultManagerTest, StartStopSinksQuery) { + GURL origin(kOrigin); CastModeSet cast_modes = query_result_manager_.GetSupportedCastModes(); EXPECT_TRUE(cast_modes.empty()); std::vector<MediaSource> actual_sources = @@ -118,7 +119,7 @@ EXPECT_CALL(mock_router_, RegisterMediaSinksObserver(_)) .WillOnce(Return(true)); query_result_manager_.SetSourcesForCastMode(MediaCastMode::DEFAULT, {source}, - url::Origin(GURL(kOrigin))); + origin); cast_modes = query_result_manager_.GetSupportedCastModes(); EXPECT_EQ(1u, cast_modes.size()); @@ -134,8 +135,8 @@ EXPECT_CALL(mock_router_, UnregisterMediaSinksObserver(_)).Times(1); EXPECT_CALL(mock_router_, RegisterMediaSinksObserver(_)) .WillOnce(Return(true)); - query_result_manager_.SetSourcesForCastMode( - MediaCastMode::DEFAULT, {another_source}, url::Origin(GURL(kOrigin))); + query_result_manager_.SetSourcesForCastMode(MediaCastMode::DEFAULT, + {another_source}, origin); cast_modes = query_result_manager_.GetSupportedCastModes(); EXPECT_EQ(1u, cast_modes.size()); @@ -166,6 +167,7 @@ MediaSource default_source2 = MediaSourceForPresentationUrl(GURL("http://baz.com")); MediaSource tab_source = MediaSourceForTab(123); + GURL origin(kOrigin); query_result_manager_.AddObserver(&mock_observer_); DiscoverSinks(MediaCastMode::DEFAULT, default_source1); @@ -195,7 +197,7 @@ EXPECT_CALL(mock_observer_, OnResultsUpdated(VectorEquals(expected_sinks))).Times(1); sinks_observer_it->second->OnSinksUpdated(sinks_query_result, - std::vector<url::Origin>()); + std::vector<GURL>()); // Action: TAB_MIRROR -> [2, 3, 4] // Expected result: @@ -224,7 +226,7 @@ EXPECT_CALL(mock_observer_, OnResultsUpdated(VectorEquals(expected_sinks))).Times(1); sinks_observer_it->second->OnSinksUpdated(sinks_query_result, - {url::Origin(GURL(kOrigin))}); + {GURL(kOrigin)}); // Action: Update default presentation URL // Expected result: @@ -244,8 +246,8 @@ .WillOnce(Return(true)); EXPECT_CALL(mock_observer_, OnResultsUpdated(VectorEquals(expected_sinks))).Times(1); - query_result_manager_.SetSourcesForCastMode( - MediaCastMode::DEFAULT, {default_source2}, url::Origin(GURL(kOrigin))); + query_result_manager_.SetSourcesForCastMode(MediaCastMode::DEFAULT, + {default_source2}, origin); // Action: DEFAULT -> [1], origins don't match // Expected result: [2 -> {TAB_MIRROR}, 3 -> {TAB_MIRROR}, 4 -> {TAB_MIRROR}] @@ -258,7 +260,7 @@ EXPECT_CALL(mock_observer_, OnResultsUpdated(VectorEquals(expected_sinks))) .Times(1); sinks_observer_it->second->OnSinksUpdated( - sinks_query_result, {url::Origin(GURL("https://differentOrigin.com"))}); + sinks_query_result, {GURL("https://differentOrigin.com")}); // Action: Remove TAB_MIRROR observer // Expected result: @@ -289,16 +291,17 @@ const std::vector<MediaSource> default_sources = {source_a, source_b, source_c}; const std::vector<MediaSource> tab_sources = {source_tab}; + const GURL origin(kOrigin); const auto& sinks_observers = query_result_manager_.sinks_observers_; // There should be one MediaSinksObserver per source. EXPECT_CALL(mock_router_, RegisterMediaSinksObserver(_)) .Times(4) .WillRepeatedly(Return(true)); - query_result_manager_.SetSourcesForCastMode( - MediaCastMode::DEFAULT, default_sources, url::Origin(GURL(kOrigin))); - query_result_manager_.SetSourcesForCastMode( - MediaCastMode::TAB_MIRROR, tab_sources, url::Origin(GURL(kOrigin))); + query_result_manager_.SetSourcesForCastMode(MediaCastMode::DEFAULT, + default_sources, origin); + query_result_manager_.SetSourcesForCastMode(MediaCastMode::TAB_MIRROR, + tab_sources, origin); // Scenario (results in this order): // Action: URL_B -> [2, 4] @@ -312,7 +315,7 @@ ASSERT_TRUE(sinks_observer_it->second.get()); auto& source_b_observer = sinks_observer_it->second; - source_b_observer->OnSinksUpdated({sink2, sink4}, std::vector<url::Origin>()); + source_b_observer->OnSinksUpdated({sink2, sink4}, std::vector<GURL>()); EXPECT_TRUE(IsDefaultSourceForSink(nullptr, sink1)); EXPECT_TRUE(IsDefaultSourceForSink(&source_b, sink2)); EXPECT_TRUE(IsDefaultSourceForSink(nullptr, sink3)); @@ -329,8 +332,7 @@ ASSERT_TRUE(sinks_observer_it->second.get()); auto& source_c_observer = sinks_observer_it->second; - source_c_observer->OnSinksUpdated({sink1, sink2, sink3}, - std::vector<url::Origin>()); + source_c_observer->OnSinksUpdated({sink1, sink2, sink3}, std::vector<GURL>()); EXPECT_TRUE(IsDefaultSourceForSink(&source_c, sink1)); EXPECT_TRUE(IsDefaultSourceForSink(&source_b, sink2)); EXPECT_TRUE(IsDefaultSourceForSink(&source_c, sink3)); @@ -347,8 +349,7 @@ ASSERT_TRUE(sinks_observer_it->second.get()); auto& source_a_observer = sinks_observer_it->second; - source_a_observer->OnSinksUpdated({sink2, sink3, sink4}, - std::vector<url::Origin>()); + source_a_observer->OnSinksUpdated({sink2, sink3, sink4}, std::vector<GURL>()); EXPECT_TRUE(IsDefaultSourceForSink(&source_c, sink1)); EXPECT_TRUE(IsDefaultSourceForSink(&source_a, sink2)); EXPECT_TRUE(IsDefaultSourceForSink(&source_a, sink3)); @@ -365,8 +366,7 @@ ASSERT_TRUE(sinks_observer_it->second.get()); auto& source_tab_observer = sinks_observer_it->second; - source_tab_observer->OnSinksUpdated({sink1, sink2}, - std::vector<url::Origin>()); + source_tab_observer->OnSinksUpdated({sink1, sink2}, std::vector<GURL>()); EXPECT_TRUE(IsDefaultSourceForSink(&source_c, sink1)); EXPECT_TRUE(IsDefaultSourceForSink(&source_a, sink2)); EXPECT_TRUE(IsDefaultSourceForSink(&source_a, sink3)); @@ -385,16 +385,17 @@ TEST_F(QueryResultManagerTest, AddInvalidSource) { const MediaSource source( MediaSourceForPresentationUrl(GURL("http://url.com"))); + const GURL origin(kOrigin); EXPECT_CALL(mock_router_, RegisterMediaSinksObserver(_)) .Times(1) .WillRepeatedly(Return(true)); query_result_manager_.SetSourcesForCastMode(MediaCastMode::DEFAULT, {source}, - url::Origin(GURL(kOrigin))); + origin); // |source| has already been registered with the default cast mode, so it // shouldn't get registered with tab mirroring. - query_result_manager_.SetSourcesForCastMode( - MediaCastMode::TAB_MIRROR, {source}, url::Origin(GURL(kOrigin))); + query_result_manager_.SetSourcesForCastMode(MediaCastMode::TAB_MIRROR, + {source}, origin); const auto& cast_mode_sources = query_result_manager_.cast_mode_sources_; const auto& default_sources = cast_mode_sources.at(MediaCastMode::DEFAULT);
diff --git a/chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc b/chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc index 64774ef..0ac26da 100644 --- a/chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc +++ b/chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.cc
@@ -63,9 +63,11 @@ void VrShellUIMessageHandler::HandleDoAction(const base::ListValue* args) { int action; + const base::DictionaryValue* arguments = nullptr; CHECK(args->GetInteger(0, &action)); + args->GetDictionary(1, &arguments); if (vr_shell_) { - vr_shell_->DoUiAction((vr_shell::UiAction) action); + vr_shell_->DoUiAction((vr_shell::UiAction) action, arguments); } }
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 78d0e1c..df42aa6 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -2088,9 +2088,9 @@ "../browser/extensions/extension_function_test_utils.h", "../browser/extensions/updater/extension_cache_fake.cc", "../browser/extensions/updater/extension_cache_fake.h", - "../browser/safe_browsing/settings_reset_prompt/mock_settings_reset_prompt_config.cc", - "../browser/safe_browsing/settings_reset_prompt/mock_settings_reset_prompt_config.h", "../browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model_browsertest.cc", + "../browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.cc", + "../browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.h", ] deps += [ @@ -3989,10 +3989,10 @@ "../browser/notifications/extension_welcome_notification_unittest.cc", "../browser/notifications/notification_conversion_helper_unittest.cc", "../browser/renderer_context_menu/context_menu_content_type_unittest.cc", - "../browser/safe_browsing/settings_reset_prompt/mock_settings_reset_prompt_config.cc", - "../browser/safe_browsing/settings_reset_prompt/mock_settings_reset_prompt_config.h", "../browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_config_unittest.cc", "../browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model_unittest.cc", + "../browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.cc", + "../browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.h", "../browser/safe_search_api/safe_search_url_checker_unittest.cc", "../browser/search/hotword_service_unittest.cc", "../browser/signin/easy_unlock_app_manager_unittest.cc",
diff --git a/chrome/test/data/banners/manifest.json b/chrome/test/data/banners/manifest.json index f458366b..72a5f60a 100644 --- a/chrome/test/data/banners/manifest.json +++ b/chrome/test/data/banners/manifest.json
@@ -14,7 +14,8 @@ { "src": "launcher-icon-2x.png", "sizes": "96x96", - "type": "image/png" + "type": "image/png", + "purpose": "any badge" }, { "src": "launcher-icon-3x.png",
diff --git a/chrome/test/data/policy/policy_test_cases.json b/chrome/test/data/policy/policy_test_cases.json index 46150a0..3e9a758 100644 --- a/chrome/test/data/policy/policy_test_cases.json +++ b/chrome/test/data/policy/policy_test_cases.json
@@ -1951,6 +1951,16 @@ "note": "This policy is retired, see https://crbug.com/621780." }, + "SSLVersionMax": { + "os": ["win", "linux", "mac", "chromeos"], + "test_policy": { "SSLVersionMax": "tls1.2" }, + "pref_mappings": [ + { "pref": "ssl.version_max", + "local_state": true + } + ] + }, + "CertificateTransparencyEnforcementDisabledForUrls": { "os": ["win", "linux", "mac", "chromeos", "android"], "test_policy": { "CertificateTransparencyEnforcementDisabledForUrls": ["example.com"] },
diff --git a/chrome/test/media_router/media_router_e2e_browsertest.cc b/chrome/test/media_router/media_router_e2e_browsertest.cc index a3b7fe6..b9fdf39 100644 --- a/chrome/test/media_router/media_router_e2e_browsertest.cc +++ b/chrome/test/media_router/media_router_e2e_browsertest.cc
@@ -20,7 +20,8 @@ #include "content/public/test/test_utils.h" #include "media/base/test_data_util.h" #include "testing/gtest/include/gtest/gtest.h" -#include "url/origin.h" +#include "url/gurl.h" + // Use the following command to run e2e browser tests: // ./out/Debug/browser_tests --user-data-dir=<empty user data dir> @@ -41,7 +42,7 @@ const char kVideo[] = "video"; const char kBearVP9Video[] = "bear-vp9.webm"; const char kPlayer[] = "player.html"; -const char kOrigin[] = "http://origin/"; +const char kOriginUrl[] = "http://origin/"; } // namespace @@ -76,7 +77,7 @@ void MediaRouterE2EBrowserTest::CreateMediaRoute( const MediaSource& source, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents) { DCHECK(media_router_); observer_.reset(new TestMediaSinksObserver(media_router_, source, origin)); @@ -145,8 +146,8 @@ int tab_id = SessionTabHelper::IdForTab(web_contents); // Wait for 30 seconds to make sure the route is stable. - CreateMediaRoute(MediaSourceForTab(tab_id), url::Origin(GURL(kOrigin)), - web_contents); + CreateMediaRoute( + MediaSourceForTab(tab_id), GURL(kOriginUrl), web_contents); Wait(base::TimeDelta::FromSeconds(30)); // Wait for 10 seconds to make sure route has been stopped. @@ -157,7 +158,7 @@ IN_PROC_BROWSER_TEST_F(MediaRouterE2EBrowserTest, MANUAL_CastApp) { // Wait for 30 seconds to make sure the route is stable. CreateMediaRoute(MediaSourceForPresentationUrl(GURL(kCastAppPresentationUrl)), - url::Origin(GURL(kOrigin)), nullptr); + GURL(kOriginUrl), nullptr); Wait(base::TimeDelta::FromSeconds(30)); // Wait for 10 seconds to make sure route has been stopped.
diff --git a/chrome/test/media_router/media_router_e2e_browsertest.h b/chrome/test/media_router/media_router_e2e_browsertest.h index d051a1d..c01681b 100644 --- a/chrome/test/media_router/media_router_e2e_browsertest.h +++ b/chrome/test/media_router/media_router_e2e_browsertest.h
@@ -44,7 +44,7 @@ // requesting JoinRoute() must have the same origin as the page that // requested CreateRoute()). void CreateMediaRoute(const MediaSource& source, - const url::Origin& origin, + const GURL& origin, content::WebContents* web_contents); // Stops the established media route and unregisters |observer_|.
diff --git a/chrome/test/media_router/test_media_sinks_observer.cc b/chrome/test/media_router/test_media_sinks_observer.cc index 8114a63..dd76964 100644 --- a/chrome/test/media_router/test_media_sinks_observer.cc +++ b/chrome/test/media_router/test_media_sinks_observer.cc
@@ -12,7 +12,7 @@ TestMediaSinksObserver::TestMediaSinksObserver(MediaRouter* router, const MediaSource& source, - const url::Origin& origin) + const GURL& origin) : MediaSinksObserver(router, source, origin) {} TestMediaSinksObserver::~TestMediaSinksObserver() {
diff --git a/chrome/test/media_router/test_media_sinks_observer.h b/chrome/test/media_router/test_media_sinks_observer.h index f0da58a3..7068f2f0 100644 --- a/chrome/test/media_router/test_media_sinks_observer.h +++ b/chrome/test/media_router/test_media_sinks_observer.h
@@ -21,7 +21,7 @@ public: TestMediaSinksObserver(MediaRouter* router, const MediaSource& source, - const url::Origin& origin); + const GURL& origin); ~TestMediaSinksObserver() override; // MediaSinksObserver implementation.
diff --git a/chromecast/renderer/BUILD.gn b/chromecast/renderer/BUILD.gn index 423ad00d..50c72c9 100644 --- a/chromecast/renderer/BUILD.gn +++ b/chromecast/renderer/BUILD.gn
@@ -8,8 +8,6 @@ sources = [ "cast_content_renderer_client.cc", "cast_content_renderer_client.h", - "cast_gin_runner.cc", - "cast_gin_runner.h", "cast_render_frame_action_deferrer.cc", "cast_render_frame_action_deferrer.h", "key_systems_cast.cc", @@ -36,11 +34,9 @@ "//chromecast/media", "//components/cdm/renderer", "//components/network_hints/renderer", - "//content:resources_grit", "//content/public/common", "//content/public/renderer", "//crypto", - "//gin:gin", "//ipc", "//media", "//services/service_manager/public/cpp",
diff --git a/chromecast/renderer/DEPS b/chromecast/renderer/DEPS index 3ab7279..fbc990d 100644 --- a/chromecast/renderer/DEPS +++ b/chromecast/renderer/DEPS
@@ -4,15 +4,12 @@ "+chromecast/media", "+components/cdm/renderer", "+components/network_hints/renderer", - "+content/grit", "+content/public/common", "+content/public/renderer", - "+gin", "+media/base", "+media/media_features.h", "+media/renderers", "+services/service_manager/public", "+third_party/WebKit/public/platform", "+third_party/WebKit/public/web", - "+ui/base/resource", ]
diff --git a/chromecast/renderer/cast_content_renderer_client.cc b/chromecast/renderer/cast_content_renderer_client.cc index 63489470..f3e32af3 100644 --- a/chromecast/renderer/cast_content_renderer_client.cc +++ b/chromecast/renderer/cast_content_renderer_client.cc
@@ -5,38 +5,28 @@ #include "chromecast/renderer/cast_content_renderer_client.h" #include <stdint.h> -#include <string> #include "base/command_line.h" #include "base/macros.h" #include "base/strings/string_number_conversions.h" -#include "base/strings/utf_string_conversions.h" #include "build/build_config.h" #include "chromecast/base/chromecast_switches.h" #include "chromecast/common/media/cast_media_client.h" #include "chromecast/crash/cast_crash_keys.h" -#include "chromecast/renderer/cast_gin_runner.h" #include "chromecast/renderer/cast_render_frame_action_deferrer.h" #include "chromecast/renderer/key_systems_cast.h" #include "chromecast/renderer/media/media_caps_observer_impl.h" #include "components/network_hints/renderer/prescient_networking_dispatcher.h" -#include "content/grit/content_resources.h" #include "content/public/common/content_switches.h" #include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_thread.h" #include "content/public/renderer/render_view.h" -#include "gin/modules/module_registry.h" -#include "gin/per_context_data.h" -#include "gin/public/context_holder.h" #include "media/base/media.h" #include "services/service_manager/public/cpp/interface_provider.h" #include "third_party/WebKit/public/platform/WebColor.h" #include "third_party/WebKit/public/web/WebFrameWidget.h" -#include "third_party/WebKit/public/web/WebKit.h" -#include "third_party/WebKit/public/web/WebLocalFrame.h" #include "third_party/WebKit/public/web/WebSettings.h" #include "third_party/WebKit/public/web/WebView.h" -#include "ui/base/resource/resource_bundle.h" #if defined(OS_ANDROID) #include "media/base/android/media_codec_util.h" @@ -151,47 +141,9 @@ new CastRenderFrameActionDeferrer(render_frame, closure); } -void CastContentRendererClient::RunScriptsAtDocumentStart( - content::RenderFrame* render_frame) { - // This method enables Mojo bindings in JavaScript for Chromecast. - - v8::HandleScope handle_scope(blink::mainThreadIsolate()); - v8::Local<v8::Context> context = - render_frame->GetWebFrame()->mainWorldScriptContext(); - - CastGinRunner* runner = CastGinRunner::Get(render_frame); - gin::Runner::Scope scoper(runner); - - // Initialize AMD API for Mojo. - render_frame->EnsureMojoBuiltinsAreAvailable(context->GetIsolate(), context); - gin::ModuleRegistry::InstallGlobals(context->GetIsolate(), context->Global()); - - // Inject JavaScript files in the correct dependency order. - static const int mojo_resource_ids[] = { - IDR_MOJO_UNICODE_JS, - IDR_MOJO_BUFFER_JS, - IDR_MOJO_INTERFACE_TYPES_JS, - IDR_MOJO_CODEC_JS, - IDR_MOJO_CONNECTOR_JS, - IDR_MOJO_VALIDATOR_JS, - IDR_MOJO_ROUTER_JS, - IDR_MOJO_BINDINGS_JS, - }; - for (size_t i = 0; i < arraysize(mojo_resource_ids); i++) { - ExecuteJavaScript(render_frame, mojo_resource_ids[i]); - } -} - bool CastContentRendererClient::AllowMediaSuspend() { return false; } -void ExecuteJavaScript(content::RenderFrame* render_frame, int resource_id) { - const std::string& js_string = ui::ResourceBundle::GetSharedInstance() - .GetRawDataResource(resource_id) - .as_string(); - render_frame->ExecuteJavaScript(base::UTF8ToUTF16(js_string)); -} - } // namespace shell } // namespace chromecast
diff --git a/chromecast/renderer/cast_content_renderer_client.h b/chromecast/renderer/cast_content_renderer_client.h index edc1182..dfbbedd7 100644 --- a/chromecast/renderer/cast_content_renderer_client.h +++ b/chromecast/renderer/cast_content_renderer_client.h
@@ -22,8 +22,6 @@ namespace shell { -void ExecuteJavaScript(content::RenderFrame* render_frame, int resourceId); - class CastContentRendererClient : public content::ContentRendererClient { public: // Creates an implementation of CastContentRendererClient. Platform should @@ -42,7 +40,6 @@ void DeferMediaLoad(content::RenderFrame* render_frame, bool render_frame_has_played_media_before, const base::Closure& closure) override; - void RunScriptsAtDocumentStart(content::RenderFrame* render_frame) override; bool AllowMediaSuspend() override; protected:
diff --git a/chromecast/renderer/cast_gin_runner.cc b/chromecast/renderer/cast_gin_runner.cc deleted file mode 100644 index ca93bf51..0000000 --- a/chromecast/renderer/cast_gin_runner.cc +++ /dev/null
@@ -1,69 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chromecast/renderer/cast_gin_runner.h" - -#include "content/public/renderer/render_frame.h" -#include "gin/per_context_data.h" -#include "third_party/WebKit/public/web/WebFrame.h" -#include "third_party/WebKit/public/web/WebKit.h" -#include "third_party/WebKit/public/web/WebLocalFrame.h" -#include "third_party/WebKit/public/web/WebScriptSource.h" - -namespace chromecast { -namespace shell { - -namespace { -const void* kCastContextData; -const void* kCastGinRunnerKey = static_cast<const void*>(&kCastContextData); -} - -// static -CastGinRunner* CastGinRunner::Get(content::RenderFrame* render_frame) { - DCHECK(render_frame); - blink::WebFrame* frame = render_frame->GetWebFrame(); - v8::HandleScope handle_scope(blink::mainThreadIsolate()); - gin::PerContextData* context_data = - gin::PerContextData::From(frame->mainWorldScriptContext()); - CastGinRunner* runner = - static_cast<CastGinRunner*>(context_data->GetUserData(kCastGinRunnerKey)); - return runner ? runner : new CastGinRunner(frame, context_data); -} - -CastGinRunner::CastGinRunner(blink::WebFrame* frame, - gin::PerContextData* context_data) - : frame_(frame), context_holder_(context_data->context_holder()) { - DCHECK(frame_); - DCHECK(context_holder_); - - // context_data takes ownership of this class. - context_data->SetUserData(kCastGinRunnerKey, this); - - // Note: this installs the runner globally. If we need to support more than - // one runner at a time we'll have to revisit this. - context_data->set_runner(this); -} - -CastGinRunner::~CastGinRunner() {} - -void CastGinRunner::Run(const std::string& source, - const std::string& resource_name) { - frame_->executeScript( - blink::WebScriptSource(blink::WebString::fromUTF8(source))); -} - -v8::Local<v8::Value> CastGinRunner::Call(v8::Local<v8::Function> function, - v8::Local<v8::Value> receiver, - int argc, - v8::Local<v8::Value> argv[]) { - return frame_->callFunctionEvenIfScriptDisabled(function, receiver, argc, - argv); -} - -gin::ContextHolder* CastGinRunner::GetContextHolder() { - return context_holder_; -} - -} // namespace shell -} // namespace chromecast
diff --git a/chromecast/renderer/cast_gin_runner.h b/chromecast/renderer/cast_gin_runner.h deleted file mode 100644 index ac01ab2..0000000 --- a/chromecast/renderer/cast_gin_runner.h +++ /dev/null
@@ -1,60 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROMECAST_RENDERER_CAST_GIN_RUNNER_H_ -#define CHROMECAST_RENDERER_CAST_GIN_RUNNER_H_ - -#include "base/macros.h" -#include "base/supports_user_data.h" -#include "gin/runner.h" - -namespace blink { -class WebFrame; -} - -namespace content { -class RenderFrame; -} - -namespace gin { -class PerContextData; -} - -namespace chromecast { -namespace shell { - -// Implementation of gin::Runner that forwards Runner functions to WebFrame. -// This class is lazily created per RenderFrame with the Get function and it's -// lifetime is managed by the gin::PerContextData associated with the frame. -class CastGinRunner : public gin::Runner, public base::SupportsUserData::Data { - public: - // Gets or creates the CastGinRunner for this RenderFrame - static CastGinRunner* Get(content::RenderFrame* render_frame); - ~CastGinRunner() override; - - // gin:Runner implementation: - void Run(const std::string& source, - const std::string& resource_name) override; - v8::Local<v8::Value> Call(v8::Local<v8::Function> function, - v8::Local<v8::Value> receiver, - int argc, - v8::Local<v8::Value> argv[]) override; - gin::ContextHolder* GetContextHolder() override; - - private: - CastGinRunner(blink::WebFrame* frame, gin::PerContextData* context_data); - - // Frame to execute script in. - blink::WebFrame* const frame_; - - // Created by blink bindings to V8. - gin::ContextHolder* const context_holder_; - - DISALLOW_COPY_AND_ASSIGN(CastGinRunner); -}; - -} // namespace shell -} // namespace chromecast - -#endif // CHROMECAST_RENDERER_CAST_GIN_RUNNER_H_
diff --git a/chromecast/tools/build/generate_test_lists.py b/chromecast/tools/build/generate_test_lists.py index e9166231..3ac72090 100755 --- a/chromecast/tools/build/generate_test_lists.py +++ b/chromecast/tools/build/generate_test_lists.py
@@ -100,7 +100,6 @@ "") with open(runtime_deps_file, "r") as f: runtime_deps[test_name] = [dep.strip() for dep in f] - assert runtime_deps[test_name][0] == os.path.join(".", test_name) with open(deps_output_file, "w") as outfile: json.dump(
diff --git a/components/autofill/core/browser/personal_data_manager_unittest.cc b/components/autofill/core/browser/personal_data_manager_unittest.cc index f570efe..3cc7d18 100644 --- a/components/autofill/core/browser/personal_data_manager_unittest.cc +++ b/components/autofill/core/browser/personal_data_manager_unittest.cc
@@ -4211,7 +4211,14 @@ // Tests the SaveImportedProfile method with different profiles to make sure the // merge logic works correctly. -TEST_F(PersonalDataManagerTest, SaveImportedProfile) { +// Flaky on TSan, see crbug.com/686226. +#if defined(THREAD_SANITIZER) +#define MAYBE_SaveImportedProfile DISABLED_SaveImportedProfile +#else +#define MAYBE_SaveImportedProfile SaveImportedProfile +#endif + +TEST_F(PersonalDataManagerTest, MAYBE_SaveImportedProfile) { typedef struct { autofill::ServerFieldType field_type; std::string field_value; @@ -4568,7 +4575,14 @@ // Tests that MergeProfile produces a merged profile with the expected usage // statistics. -TEST_F(PersonalDataManagerTest, MergeProfile_UsageStats) { +// Flaky on TSan, see crbug.com/686226. +#if defined(THREAD_SANITIZER) +#define MAYBE_MergeProfile_UsageStats DISABLED_MergeProfile_UsageStats +#else +#define MAYBE_MergeProfile_UsageStats MergeProfile_UsageStats +#endif + +TEST_F(PersonalDataManagerTest, MAYBE_MergeProfile_UsageStats) { // Create an initial profile with a use count of 10, an old use date and an // old modification date of 4 days ago. AutofillProfile* profile =
diff --git a/components/certificate_reporting/DEPS b/components/certificate_reporting/DEPS index e864d38a..bb3fb07 100644 --- a/components/certificate_reporting/DEPS +++ b/components/certificate_reporting/DEPS
@@ -2,5 +2,6 @@ "+components/network_time", "+components/prefs", "+crypto", - "+net" + "+net", + "+third_party/boringssl/src/include", ] \ No newline at end of file
diff --git a/components/certificate_reporting/error_reporter.cc b/components/certificate_reporting/error_reporter.cc index 222a492..3ab3a3c9 100644 --- a/components/certificate_reporting/error_reporter.cc +++ b/components/certificate_reporting/error_reporter.cc
@@ -13,10 +13,10 @@ #include "base/memory/ptr_util.h" #include "components/certificate_reporting/encrypted_cert_logger.pb.h" #include "crypto/aead.h" -#include "crypto/curve25519.h" #include "crypto/hkdf.h" #include "crypto/random.h" #include "net/url_request/report_sender.h" +#include "third_party/boringssl/src/include/openssl/curve25519.h" namespace certificate_reporting { @@ -36,8 +36,8 @@ const uint8_t* private_key, const uint8_t* public_key, std::string* secret) { - uint8_t shared_secret[crypto::curve25519::kBytes]; - if (!crypto::curve25519::ScalarMult(private_key, public_key, shared_secret)) + uint8_t shared_secret[X25519_SHARED_KEY_LEN]; + if (!X25519(shared_secret, private_key, public_key)) return false; // By mistake, the HKDF label here ends up with an extra null byte on @@ -64,11 +64,11 @@ const std::string& report, EncryptedCertLoggerRequest* encrypted_report) { // Generate an ephemeral key pair to generate a shared secret. - uint8_t public_key[crypto::curve25519::kBytes]; - uint8_t private_key[crypto::curve25519::kScalarBytes]; + uint8_t public_key[X25519_PUBLIC_VALUE_LEN]; + uint8_t private_key[X25519_PRIVATE_KEY_LEN]; crypto::RandBytes(private_key, sizeof(private_key)); - crypto::curve25519::ScalarBaseMult(private_key, public_key); + X25519_public_from_private(public_key, private_key); crypto::Aead aead(crypto::Aead::AES_128_CTR_HMAC_SHA256); std::string key;
diff --git a/components/certificate_reporting/error_reporter_unittest.cc b/components/certificate_reporting/error_reporter_unittest.cc index e124c6e..076049d 100644 --- a/components/certificate_reporting/error_reporter_unittest.cc +++ b/components/certificate_reporting/error_reporter_unittest.cc
@@ -17,12 +17,12 @@ #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "components/certificate_reporting/encrypted_cert_logger.pb.h" -#include "crypto/curve25519.h" #include "net/test/url_request/url_request_failed_job.h" #include "net/test/url_request/url_request_mock_data_job.h" #include "net/url_request/report_sender.h" #include "net/url_request/url_request_test_util.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/boringssl/src/include/openssl/curve25519.h" namespace certificate_reporting { @@ -103,7 +103,7 @@ public: ErrorReporterTest() { memset(server_private_key_, 1, sizeof(server_private_key_)); - crypto::curve25519::ScalarBaseMult(server_private_key_, server_public_key_); + X25519_public_from_private(server_public_key_, server_private_key_); } ~ErrorReporterTest() override {}
diff --git a/components/cryptauth/BUILD.gn b/components/cryptauth/BUILD.gn index 6a0fba0..1b14f27 100644 --- a/components/cryptauth/BUILD.gn +++ b/components/cryptauth/BUILD.gn
@@ -50,6 +50,8 @@ "remote_beacon_seed_fetcher.h", "remote_device.cc", "remote_device.h", + "secure_channel.cc", + "secure_channel.h", "secure_context.h", "secure_message_delegate.cc", "secure_message_delegate.h", @@ -91,6 +93,8 @@ "cryptauth_test_util.h", "device_to_device_responder_operations.cc", "device_to_device_responder_operations.h", + "fake_authenticator.cc", + "fake_authenticator.h", "fake_connection.cc", "fake_connection.h", "fake_cryptauth_gcm_manager.cc", @@ -141,6 +145,7 @@ "eid_generator_unittest.cc", "fake_secure_message_delegate_unittest.cc", "remote_beacon_seed_fetcher_unittest.cc", + "secure_channel_unittest.cc", "sync_scheduler_impl_unittest.cc", "wire_message_unittest.cc", ]
diff --git a/components/cryptauth/connection.h b/components/cryptauth/connection.h index c134fbf4..dbc731d7 100644 --- a/components/cryptauth/connection.h +++ b/components/cryptauth/connection.h
@@ -42,8 +42,8 @@ // either success or failure. void SendMessage(std::unique_ptr<WireMessage> message); - void AddObserver(ConnectionObserver* observer); - void RemoveObserver(ConnectionObserver* observer); + virtual void AddObserver(ConnectionObserver* observer); + virtual void RemoveObserver(ConnectionObserver* observer); const RemoteDevice& remote_device() const { return remote_device_;
diff --git a/components/cryptauth/device_to_device_authenticator.cc b/components/cryptauth/device_to_device_authenticator.cc index 425e314..d80449f 100644 --- a/components/cryptauth/device_to_device_authenticator.cc +++ b/components/cryptauth/device_to_device_authenticator.cc
@@ -29,6 +29,39 @@ } // namespace +// static +DeviceToDeviceAuthenticator::Factory* + DeviceToDeviceAuthenticator::Factory::factory_instance_ = nullptr; + +// static +std::unique_ptr<Authenticator> +DeviceToDeviceAuthenticator::Factory::NewInstance( + cryptauth::Connection* connection, + const std::string& account_id, + std::unique_ptr<cryptauth::SecureMessageDelegate> secure_message_delegate) { + if (!factory_instance_) { + factory_instance_ = new Factory(); + } + return factory_instance_->BuildInstance( + connection, account_id, std::move(secure_message_delegate)); +} + +// static +void DeviceToDeviceAuthenticator::Factory::SetInstanceForTesting( + Factory* factory) { + factory_instance_ = factory; +} + +std::unique_ptr<Authenticator> +DeviceToDeviceAuthenticator::Factory::BuildInstance( + cryptauth::Connection* connection, + const std::string& account_id, + std::unique_ptr<cryptauth::SecureMessageDelegate> + secure_message_delegate) { + return base::WrapUnique(new DeviceToDeviceAuthenticator( + connection, account_id, std::move(secure_message_delegate))); +} + DeviceToDeviceAuthenticator::DeviceToDeviceAuthenticator( Connection* connection, const std::string& account_id,
diff --git a/components/cryptauth/device_to_device_authenticator.h b/components/cryptauth/device_to_device_authenticator.h index ab98308..e398206b 100644 --- a/components/cryptauth/device_to_device_authenticator.h +++ b/components/cryptauth/device_to_device_authenticator.h
@@ -43,6 +43,27 @@ class DeviceToDeviceAuthenticator : public Authenticator, public ConnectionObserver { public: + class Factory { + public: + static std::unique_ptr<Authenticator> NewInstance( + cryptauth::Connection* connection, + const std::string& account_id, + std::unique_ptr<cryptauth::SecureMessageDelegate> + secure_message_delegate); + + static void SetInstanceForTesting(Factory* factory); + + protected: + virtual std::unique_ptr<Authenticator> BuildInstance( + cryptauth::Connection* connection, + const std::string& account_id, + std::unique_ptr<cryptauth::SecureMessageDelegate> + secure_message_delegate); + + private: + static Factory* factory_instance_; + }; + // Creates the instance: // |connection|: The connection to the remote device, which must be in a // connected state. Not owned.
diff --git a/components/cryptauth/fake_authenticator.cc b/components/cryptauth/fake_authenticator.cc new file mode 100644 index 0000000..fb54ac3 --- /dev/null +++ b/components/cryptauth/fake_authenticator.cc
@@ -0,0 +1,22 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/cryptauth/fake_authenticator.h" + +#include <utility> + +#include "base/memory/ptr_util.h" + +namespace cryptauth { + +FakeAuthenticator::FakeAuthenticator() {} + +FakeAuthenticator::~FakeAuthenticator() {} + +void FakeAuthenticator::Authenticate( + const Authenticator::AuthenticationCallback& callback) { + last_callback_ = callback; +} + +} // namespace cryptauth
diff --git a/components/cryptauth/fake_authenticator.h b/components/cryptauth/fake_authenticator.h new file mode 100644 index 0000000..68e1eea --- /dev/null +++ b/components/cryptauth/fake_authenticator.h
@@ -0,0 +1,36 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_CRYPTAUTH_FAKE_AUTHENTICATOR_H_ +#define COMPONENTS_CRYPTAUTH_FAKE_AUTHENTICATOR_H_ + +#include "base/callback.h" +#include "base/macros.h" +#include "components/cryptauth/authenticator.h" + +namespace cryptauth { + +// A fake implementation of Authenticator to use in tests. +class FakeAuthenticator : public Authenticator { + public: + FakeAuthenticator(); + ~FakeAuthenticator() override; + + // Authenticator: + void Authenticate(const AuthenticationCallback& callback) + override; + + AuthenticationCallback last_callback() { + return last_callback_; + } + + private: + AuthenticationCallback last_callback_; + + DISALLOW_COPY_AND_ASSIGN(FakeAuthenticator); +}; + +} // namespace cryptauth + +#endif // COMPONENTS_CRYPTAUTH_FAKE_AUTHENTICATOR_H_
diff --git a/components/cryptauth/fake_connection.cc b/components/cryptauth/fake_connection.cc index ce11c64..fc861ab 100644 --- a/components/cryptauth/fake_connection.cc +++ b/components/cryptauth/fake_connection.cc
@@ -11,13 +11,15 @@ namespace cryptauth { -namespace { -const char kFakeFeatureName[] = "fakeFeature"; -} // namespace - FakeConnection::FakeConnection(const RemoteDevice& remote_device) - : Connection(remote_device) { - Connect(); + : FakeConnection(remote_device, /* should_auto_connect */ true) {} + +FakeConnection::FakeConnection( + const RemoteDevice& remote_device, bool should_auto_connect) + : Connection(remote_device), should_auto_connect_(should_auto_connect) { + if (should_auto_connect_) { + Connect(); + } } FakeConnection::~FakeConnection() { @@ -25,13 +27,40 @@ } void FakeConnection::Connect() { - SetStatus(CONNECTED); + if (should_auto_connect_) { + SetStatus(CONNECTED); + } else { + SetStatus(IN_PROGRESS); + } } void FakeConnection::Disconnect() { SetStatus(DISCONNECTED); } +void FakeConnection::AddObserver(ConnectionObserver* observer) { + observers_.push_back(observer); + Connection::AddObserver(observer); +} + +void FakeConnection::RemoveObserver(ConnectionObserver* observer) { + observers_.erase( + std::remove(observers_.begin(), observers_.end(), observer), + observers_.end()); + Connection::RemoveObserver(observer); +} + +void FakeConnection::CompleteInProgressConnection(bool success) { + DCHECK(!should_auto_connect_); + DCHECK(status() == IN_PROGRESS); + + if (success) { + SetStatus(CONNECTED); + } else { + SetStatus(DISCONNECTED); + } +} + void FakeConnection::FinishSendingMessageWithSuccess(bool success) { CHECK(current_message_); // Capture a copy of the message, as OnDidSendMessage() might reentrantly @@ -40,9 +69,12 @@ OnDidSendMessage(*sent_message, success); } -void FakeConnection::ReceiveMessageWithPayload(const std::string& payload) { +void FakeConnection::ReceiveMessage( + const std::string& feature, const std::string& payload) { + pending_feature_ = feature; pending_payload_ = payload; OnBytesReceived(std::string()); + pending_feature_.clear(); pending_payload_.clear(); } @@ -54,8 +86,7 @@ std::unique_ptr<WireMessage> FakeConnection::DeserializeWireMessage( bool* is_incomplete_message) { *is_incomplete_message = false; - return base::MakeUnique<WireMessage>( - pending_payload_, std::string(kFakeFeatureName)); + return base::MakeUnique<WireMessage>(pending_payload_, pending_feature_); } } // namespace cryptauth
diff --git a/components/cryptauth/fake_connection.h b/components/cryptauth/fake_connection.h index 9cb804f..cae66db 100644 --- a/components/cryptauth/fake_connection.h +++ b/components/cryptauth/fake_connection.h
@@ -10,26 +10,41 @@ namespace cryptauth { +class ConnectionObserver; + // A fake implementation of Connection to use in tests. class FakeConnection : public Connection { public: FakeConnection(const RemoteDevice& remote_device); + FakeConnection(const RemoteDevice& remote_device, bool should_auto_connect); ~FakeConnection() override; // Connection: void Connect() override; void Disconnect() override; + void AddObserver(ConnectionObserver* observer) override; + void RemoveObserver(ConnectionObserver* observer) override; + + // Completes a connection attempt which was originally started via a call to + // |Connect()|. If |success| is true, the connection's status shifts to + // |CONNECTED|; otherwise, the status shifts to |DISCONNECTED|. Note that this + // function should only be called when |should_auto_connect| is false. + void CompleteInProgressConnection(bool success); // Completes the current send operation with success |success|. void FinishSendingMessageWithSuccess(bool success); // Simulates receiving a wire message with the given |payload|, bypassing the // container WireMessage format. - void ReceiveMessageWithPayload(const std::string& payload); + void ReceiveMessage(const std::string& feature, const std::string& payload); // Returns the current message in progress of being sent. WireMessage* current_message() { return current_message_.get(); } + std::vector<ConnectionObserver*>& observers() { + return observers_; + } + using Connection::SetStatus; private: @@ -42,10 +57,15 @@ // SendMessageImpl() and FinishSendingMessageWithSuccess(). std::unique_ptr<WireMessage> current_message_; - // The payload that should be returned when DeserializeWireMessage() is - // called. + // The feature and payload that should be returned when + // DeserializeWireMessage() is called. + std::string pending_feature_; std::string pending_payload_; + std::vector<ConnectionObserver*> observers_; + + const bool should_auto_connect_; + DISALLOW_COPY_AND_ASSIGN(FakeConnection); };
diff --git a/components/cryptauth/secure_channel.cc b/components/cryptauth/secure_channel.cc new file mode 100644 index 0000000..c8ed9fd --- /dev/null +++ b/components/cryptauth/secure_channel.cc
@@ -0,0 +1,247 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/cryptauth/secure_channel.h" + +#include "base/bind.h" +#include "base/memory/ptr_util.h" +#include "components/cryptauth/wire_message.h" +#include "components/proximity_auth/logging/logging.h" + +namespace cryptauth { + +// static +std::string SecureChannel::StatusToString(const Status& status) { + switch (status) { + case Status::DISCONNECTED: + return "[disconnected]"; + case Status::CONNECTING: + return "[connecting]"; + case Status::CONNECTED: + return "[connected]"; + case Status::AUTHENTICATING: + return "[authenticating]"; + case Status::AUTHENTICATED: + return "[authenticated]"; + default: + return "[unknown status]"; + } +} + +SecureChannel::Delegate::~Delegate() {} + +SecureChannel::PendingMessage::PendingMessage() {} + +SecureChannel::PendingMessage::PendingMessage( + const std::string& feature, const std::string& payload) + : feature(feature), payload(payload) {} + +SecureChannel::PendingMessage::~PendingMessage() {} + +SecureChannel::SecureChannel( + std::unique_ptr<Connection> connection, + std::unique_ptr<Delegate> delegate) + : connection_(std::move(connection)), + delegate_(std::move(delegate)), + status_(Status::DISCONNECTED), + weak_ptr_factory_(this) { + DCHECK(connection_); + DCHECK(!connection_->IsConnected()); + DCHECK(!connection_->remote_device().user_id.empty()); + DCHECK(delegate_); + + connection_->AddObserver(this); +} + +SecureChannel::~SecureChannel() { + connection_->RemoveObserver(this); +} + +void SecureChannel::Initialize() { + DCHECK(status_ == Status::DISCONNECTED); + connection_->Connect(); + TransitionToStatus(Status::CONNECTING); +} + +void SecureChannel::SendMessage( + const std::string& feature, const std::string& payload) { + DCHECK(status_ == Status::AUTHENTICATED); + + PA_LOG(INFO) << "Queuing new message to send: {" + << "feature: \"" << feature << "\", " + << "payload: \"" << payload << "\"" + << "}"; + + queued_messages_.push_back(PendingMessage(feature, payload)); + ProcessMessageQueue(); +} + +void SecureChannel::Disconnect() { + if (connection_->IsConnected()) { + connection_->Disconnect(); + } + + TransitionToStatus(Status::DISCONNECTED); +} + +void SecureChannel::AddObserver(Observer* observer) { + observer_list_.AddObserver(observer); +} + +void SecureChannel::RemoveObserver(Observer* observer) { + observer_list_.RemoveObserver(observer); +} + +void SecureChannel::OnConnectionStatusChanged( + Connection* connection, + Connection::Status old_status, + Connection::Status new_status) { + DCHECK(connection == connection_.get()); + + if (new_status == Connection::Status::CONNECTED) { + TransitionToStatus(Status::CONNECTED); + + // Once the connection has succeeded, authenticate the connection by + // initiating the security handshake. + Authenticate(); + return; + } + + if (new_status == Connection::Status::DISCONNECTED) { + // If the connection is no longer active, disconnect. + Disconnect(); + return; + } +} + +void SecureChannel::OnMessageReceived(const Connection& connection, + const WireMessage& wire_message) { + DCHECK(&connection == const_cast<const Connection*>(connection_.get())); + if (wire_message.feature() == Authenticator::kAuthenticationFeature) { + // If the message received was part of the authentication handshake, it + // is a low-level message and should not be forwarded to observers. + return; + } + + secure_context_->Decode(wire_message.payload(), + base::Bind(&SecureChannel::OnMessageDecoded, + weak_ptr_factory_.GetWeakPtr(), + wire_message.feature())); +} + +void SecureChannel::OnSendCompleted(const cryptauth::Connection& connection, + const cryptauth::WireMessage& wire_message, + bool success) { + DCHECK(pending_message_->feature == wire_message.feature()); + + if (success && status_ != Status::DISCONNECTED) { + pending_message_.reset(); + ProcessMessageQueue(); + return; + } + + PA_LOG(ERROR) << "Could not send message: {" + << "payload: \"" << pending_message_->payload << "\", " + << "feature: \"" << pending_message_->feature << "\"" + << "}"; + pending_message_.reset(); + + // The connection automatically retries failed messges, so if |success| is + // |false| here, a fatal error has occurred. Thus, there is no need to retry + // the message; instead, disconnect. + Disconnect(); +} + +void SecureChannel::TransitionToStatus(const Status& new_status) { + if (new_status == status_) { + // Only report changes to state. + return; + } + + PA_LOG(INFO) << "Connection status changed: " + << StatusToString(status_) + << " => " << StatusToString(new_status); + + Status old_status = status_; + status_ = new_status; + + for (auto& observer : observer_list_) { + observer.OnSecureChannelStatusChanged(this, old_status, status_); + } +} + +void SecureChannel::Authenticate() { + DCHECK(status_ == Status::CONNECTED); + DCHECK(!authenticator_); + + authenticator_ = DeviceToDeviceAuthenticator::Factory::NewInstance( + connection_.get(), + connection_->remote_device().user_id, + delegate_->CreateSecureMessageDelegate()); + authenticator_->Authenticate( + base::Bind(&SecureChannel::OnAuthenticationResult, + weak_ptr_factory_.GetWeakPtr())); + + TransitionToStatus(Status::AUTHENTICATING); +} + +void SecureChannel::ProcessMessageQueue() { + if (pending_message_ || queued_messages_.empty()) { + return; + } + + DCHECK(!connection_->is_sending_message()); + + pending_message_.reset(new PendingMessage(queued_messages_.front())); + queued_messages_.pop_front(); + + PA_LOG(INFO) << "Sending message: {" + << "feature: \"" << pending_message_->feature << "\", " + << "payload: \"" << pending_message_->payload << "\"" + << "}"; + + secure_context_->Encode(pending_message_->payload, + base::Bind(&SecureChannel::OnMessageEncoded, + weak_ptr_factory_.GetWeakPtr(), + pending_message_->feature)); +} + +void SecureChannel::OnMessageEncoded( + const std::string& feature, const std::string& encoded_message) { + connection_->SendMessage(base::MakeUnique<cryptauth::WireMessage>( + encoded_message, feature)); +} + +void SecureChannel::OnMessageDecoded( + const std::string& feature, const std::string& decoded_message) { + PA_LOG(INFO) << "Received message: {" + << "feature: \"" << feature << "\", " + << "payload: \"" << decoded_message << "\"" + << "}"; + + for (auto& observer : observer_list_) { + observer.OnMessageReceived(this, feature, decoded_message); + } +} + +void SecureChannel::OnAuthenticationResult( + Authenticator::Result result, + std::unique_ptr<SecureContext> secure_context) { + DCHECK(status_ == Status::AUTHENTICATING); + + // The authenticator is no longer needed, so release it. + authenticator_.reset(); + + if (result != Authenticator::Result::SUCCESS) { + PA_LOG(WARNING) << "Failed to authenticate connection to device with ID " + << connection_->remote_device().GetTruncatedDeviceIdForLogs(); + Disconnect(); + return; + } + + secure_context_ = std::move(secure_context); + TransitionToStatus(Status::AUTHENTICATED); +} + +} // namespace cryptauth
diff --git a/components/cryptauth/secure_channel.h b/components/cryptauth/secure_channel.h new file mode 100644 index 0000000..4e18af9 --- /dev/null +++ b/components/cryptauth/secure_channel.h
@@ -0,0 +1,137 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_CRYPTAUTH_SECURE_CHANNEL_H_ +#define COMPONENTS_CRYPTAUTH_SECURE_CHANNEL_H_ + +#include <deque> + +#include "base/macros.h" +#include "base/memory/weak_ptr.h" +#include "components/cryptauth/authenticator.h" +#include "components/cryptauth/connection.h" +#include "components/cryptauth/connection_observer.h" +#include "components/cryptauth/device_to_device_authenticator.h" +#include "components/cryptauth/remote_device.h" +#include "components/cryptauth/secure_context.h" +#include "components/cryptauth/secure_message_delegate.h" + +namespace cryptauth { + +// An authenticated bi-directional channel for exchanging messages with remote +// devices. |SecureChannel| manages a |Connection| by initializing it and +// authenticating it via a security handshake once the connection has occurred. +// Once the channel has been authenticated, messages sent are automatically +// encrypted and messages received are automatically decrypted. +class SecureChannel : public ConnectionObserver { + public: + // Enumeration of possible states of connecting to a remote device. + // DISCONNECTED: There is no connection to the device, nor is there a + // pending connection attempt. + // CONNECTING: There is an ongoing connection attempt. + // CONNECTED: There is a Bluetooth connection to the device, but the + // connection has not yet been authenticated. + // AUTHENTICATING: There is an active connection that is currently in the + // process of authenticating via a 3-message authentication handshake. + // AUTHENTICATED: The connection has been authenticated, and arbitrary + // messages can be sent/received to/from the device. + enum class Status { + DISCONNECTED, + CONNECTING, + CONNECTED, + AUTHENTICATING, + AUTHENTICATED, + }; + + static std::string StatusToString(const Status& status); + + class Observer { + public: + virtual void OnSecureChannelStatusChanged( + SecureChannel* secure_channel, + const Status& old_status, + const Status& new_status) = 0; + + virtual void OnMessageReceived( + SecureChannel* secure_channel, + const std::string& feature, + const std::string& payload) = 0; + }; + + class Delegate { + public: + virtual ~Delegate(); + + virtual std::unique_ptr<SecureMessageDelegate> + CreateSecureMessageDelegate() = 0; + }; + + SecureChannel( + std::unique_ptr<Connection> connection, + std::unique_ptr<Delegate> delegate); + ~SecureChannel() override; + + void Initialize(); + + void SendMessage(const std::string& feature, const std::string& payload); + + void Disconnect(); + + void AddObserver(Observer* observer); + void RemoveObserver(Observer* observer); + + Status status() const { + return status_; + } + + // ConnectionObserver: + void OnConnectionStatusChanged(Connection* connection, + Connection::Status old_status, + Connection::Status new_status) override; + void OnMessageReceived(const Connection& connection, + const WireMessage& wire_message) override; + void OnSendCompleted(const cryptauth::Connection& connection, + const cryptauth::WireMessage& wire_message, + bool success) override; + + private: + // Message waiting to be sent. Note that this is *not* the message that will + // end up being sent over the wire; before that can be done, the payload must + // be encrypted. + struct PendingMessage { + PendingMessage(); + PendingMessage(const std::string& feature, const std::string& payload); + virtual ~PendingMessage(); + + const std::string feature; + const std::string payload; + }; + + void TransitionToStatus(const Status& new_status); + void Authenticate(); + void ProcessMessageQueue(); + void OnMessageEncoded( + const std::string& feature, const std::string& encoded_message); + void OnMessageDecoded( + const std::string& feature, const std::string& decoded_message); + void OnAuthenticationResult( + Authenticator::Result result, + std::unique_ptr<SecureContext> secure_context); + + std::unique_ptr<Connection> connection_; + std::unique_ptr<Delegate> delegate_; + std::unique_ptr<Authenticator> authenticator_; + std::unique_ptr<SecureContext> secure_context_; + Status status_; + std::deque<PendingMessage> queued_messages_; + std::unique_ptr<PendingMessage> pending_message_; + base::ObserverList<Observer> observer_list_; + base::WeakPtrFactory<SecureChannel> weak_ptr_factory_; + + DISALLOW_COPY_AND_ASSIGN(SecureChannel); +}; + +} // namespace cryptauth + +#endif // COMPONENTS_CRYPTAUTH_SECURE_CHANNEL_H_
diff --git a/components/cryptauth/secure_channel_unittest.cc b/components/cryptauth/secure_channel_unittest.cc new file mode 100644 index 0000000..02b3c292 --- /dev/null +++ b/components/cryptauth/secure_channel_unittest.cc
@@ -0,0 +1,548 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/cryptauth/secure_channel.h" + +#include <string> + +#include "base/bind.h" +#include "base/memory/ptr_util.h" +#include "base/memory/weak_ptr.h" +#include "components/cryptauth/fake_authenticator.h" +#include "components/cryptauth/fake_connection.h" +#include "components/cryptauth/fake_secure_context.h" +#include "components/cryptauth/fake_secure_message_delegate.h" +#include "components/cryptauth/remote_device_test_util.h" +#include "components/cryptauth/wire_message.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace cryptauth { + +namespace { + +const std::string test_user_id = "testUserId"; + +class TestDelegate : public SecureChannel::Delegate { + public: + TestDelegate(std::unique_ptr<SecureMessageDelegate> secure_message_delegate) + : secure_message_delegate_(std::move(secure_message_delegate)) {} + ~TestDelegate() override {} + + std::unique_ptr<SecureMessageDelegate> CreateSecureMessageDelegate() + override { + return std::move(secure_message_delegate_); + } + + private: + std::unique_ptr<SecureMessageDelegate> secure_message_delegate_; +}; + +struct SecureChannelStatusChange { + SecureChannelStatusChange( + const SecureChannel::Status& old_status, + const SecureChannel::Status& new_status) + : old_status(old_status), new_status(new_status) {} + + SecureChannel::Status old_status; + SecureChannel::Status new_status; +}; + +struct ReceivedMessage { + ReceivedMessage(const std::string& feature, const std::string& payload) + : feature(feature), payload(payload) {} + + std::string feature; + std::string payload; +}; + +class TestObserver : public SecureChannel::Observer { + public: + TestObserver(SecureChannel* secure_channel) + : secure_channel_(secure_channel) {} + + // SecureChannel::Observer: + void OnSecureChannelStatusChanged( + SecureChannel* secure_channel, + const SecureChannel::Status& old_status, + const SecureChannel::Status& new_status) override { + DCHECK(secure_channel == secure_channel_); + connection_status_changes_.push_back( + SecureChannelStatusChange(old_status, new_status)); + } + + void OnMessageReceived(SecureChannel* secure_channel, + const std::string& feature, + const std::string& payload) override { + DCHECK(secure_channel == secure_channel_); + received_messages_.push_back(ReceivedMessage(feature, payload)); + } + + std::vector<SecureChannelStatusChange>& connection_status_changes() { + return connection_status_changes_; + } + + std::vector<ReceivedMessage>& received_messages() { + return received_messages_; + } + + private: + SecureChannel* secure_channel_; + std::vector<SecureChannelStatusChange> connection_status_changes_; + std::vector<ReceivedMessage> received_messages_; +}; + +class TestAuthenticatorFactory : public DeviceToDeviceAuthenticator::Factory { + public: + TestAuthenticatorFactory() : last_instance_(nullptr) {} + + std::unique_ptr<Authenticator> BuildInstance( + cryptauth::Connection* connection, + const std::string& account_id, + std::unique_ptr<cryptauth::SecureMessageDelegate> + secure_message_delegate) override { + last_instance_ = new FakeAuthenticator(); + return base::WrapUnique(last_instance_); + } + + Authenticator* last_instance() { + return last_instance_; + } + + private: + Authenticator* last_instance_; +}; + +RemoteDevice CreateTestRemoteDevice() { + RemoteDevice remote_device = GenerateTestRemoteDevices(1)[0]; + remote_device.user_id = test_user_id; + return remote_device; +} + +} // namespace + +class CryptAuthSecureChannelTest : public testing::Test { + protected: + CryptAuthSecureChannelTest() + : test_device_(CreateTestRemoteDevice()), + weak_ptr_factory_(this) {} + + void SetUp() override { + test_authenticator_factory_ = base::MakeUnique<TestAuthenticatorFactory>(); + DeviceToDeviceAuthenticator::Factory::SetInstanceForTesting( + test_authenticator_factory_.get()); + + fake_secure_context_ = nullptr; + + fake_secure_message_delegate_ = new FakeSecureMessageDelegate(); + + test_delegate_ = + new TestDelegate(base::WrapUnique(fake_secure_message_delegate_)); + + fake_connection_ = + new FakeConnection(test_device_, /* should_auto_connect */ false); + + EXPECT_FALSE(fake_connection_->observers().size()); + secure_channel_ = base::MakeUnique<SecureChannel>( + base::WrapUnique(fake_connection_), base::WrapUnique(test_delegate_)); + EXPECT_EQ(static_cast<size_t>(1), fake_connection_->observers().size()); + EXPECT_EQ(secure_channel_.get(), fake_connection_->observers()[0]); + + test_observer_ = base::MakeUnique<TestObserver>(secure_channel_.get()); + secure_channel_->AddObserver(test_observer_.get()); + } + + void TearDown() override { + // All state changes should have already been verified. This ensures that + // no test has missed one. + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange>()); + + // Same with received messages. + VerifyReceivedMessages(std::vector<ReceivedMessage>()); + + // Same with messages being sent. + VerifyNoMessageBeingSent(); + } + + void VerifyConnectionStateChanges( + const std::vector<SecureChannelStatusChange>& expected_changes) { + verified_status_changes_.insert( + verified_status_changes_.end(), + expected_changes.begin(), + expected_changes.end()); + + ASSERT_EQ( + verified_status_changes_.size(), + test_observer_->connection_status_changes().size()); + + for (size_t i = 0; i < verified_status_changes_.size(); i++) { + EXPECT_EQ( + verified_status_changes_[i].old_status, + test_observer_->connection_status_changes()[i].old_status); + EXPECT_EQ( + verified_status_changes_[i].new_status, + test_observer_->connection_status_changes()[i].new_status); + } + } + + void VerifyReceivedMessages( + const std::vector<ReceivedMessage>& expected_messages) { + verified_received_messages_.insert( + verified_received_messages_.end(), + expected_messages.begin(), + expected_messages.end()); + + ASSERT_EQ( + verified_received_messages_.size(), + test_observer_->received_messages().size()); + + for (size_t i = 0; i < verified_received_messages_.size(); i++) { + EXPECT_EQ( + verified_received_messages_[i].feature, + test_observer_->received_messages()[i].feature); + EXPECT_EQ( + verified_received_messages_[i].payload, + test_observer_->received_messages()[i].payload); + } + } + + void FailAuthentication(Authenticator::Result result) { + ASSERT_NE(result, Authenticator::Result::SUCCESS); + + FakeAuthenticator* authenticator = static_cast<FakeAuthenticator*>( + test_authenticator_factory_->last_instance()); + authenticator->last_callback().Run(result, nullptr); + } + + void AuthenticateSuccessfully() { + FakeAuthenticator* authenticator = static_cast<FakeAuthenticator*>( + test_authenticator_factory_->last_instance()); + + fake_secure_context_ = new FakeSecureContext(); + authenticator->last_callback().Run( + Authenticator::Result::SUCCESS, base::WrapUnique(fake_secure_context_)); + } + + void ConnectAndAuthenticate() { + secure_channel_->Initialize(); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::DISCONNECTED, + SecureChannel::Status::CONNECTING + } + }); + + fake_connection_->CompleteInProgressConnection(/* success */ true); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::CONNECTING, + SecureChannel::Status::CONNECTED + }, + { + SecureChannel::Status::CONNECTED, + SecureChannel::Status::AUTHENTICATING + } + }); + + AuthenticateSuccessfully(); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::AUTHENTICATING, + SecureChannel::Status::AUTHENTICATED + } + }); + } + + void StartSendingMessage( + const std::string& feature, const std::string& payload) { + secure_channel_->SendMessage(feature, payload); + VerifyMessageBeingSent(feature, payload); + } + + void StartAndFinishSendingMessage( + const std::string& feature, const std::string& payload, bool success) { + StartSendingMessage(feature, payload); + fake_connection_->FinishSendingMessageWithSuccess(success); + } + + void VerifyNoMessageBeingSent() { + EXPECT_FALSE(fake_connection_->current_message()); + } + + void VerifyMessageBeingSent( + const std::string& feature, const std::string& payload) { + WireMessage* message_being_sent = fake_connection_->current_message(); + // Note that despite the fact that |Encode()| has an asynchronous interface, + // the implementation will call |VerifyWireMessageContents()| synchronously. + fake_secure_context_->Encode( + payload, + base::Bind(&CryptAuthSecureChannelTest::VerifyWireMessageContents, + weak_ptr_factory_.GetWeakPtr(), + message_being_sent, + feature)); + } + + void VerifyWireMessageContents( + WireMessage* wire_message, + const std::string& expected_feature, + const std::string& expected_payload) { + EXPECT_EQ(expected_feature, wire_message->feature()); + EXPECT_EQ(expected_payload, wire_message->payload()); + } + + // Owned by secure_channel_. + FakeConnection* fake_connection_; + + // Owned by secure_chanel_. + TestDelegate* test_delegate_; + + // Owned by test_delegate_. + FakeSecureMessageDelegate* fake_secure_message_delegate_; + + // Owned by secure_channel_ once authentication has completed successfully. + FakeSecureContext* fake_secure_context_; + + std::vector<SecureChannelStatusChange> verified_status_changes_; + + std::vector<ReceivedMessage> verified_received_messages_; + + std::unique_ptr<SecureChannel> secure_channel_; + + std::unique_ptr<TestObserver> test_observer_; + + std::unique_ptr<TestAuthenticatorFactory> test_authenticator_factory_; + + const RemoteDevice test_device_; + + base::WeakPtrFactory<CryptAuthSecureChannelTest> weak_ptr_factory_; + + private: + DISALLOW_COPY_AND_ASSIGN(CryptAuthSecureChannelTest); +}; + +TEST_F(CryptAuthSecureChannelTest, ConnectionAttemptFails) { + secure_channel_->Initialize(); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::DISCONNECTED, + SecureChannel::Status::CONNECTING + } + }); + + fake_connection_->CompleteInProgressConnection(/* success */ false); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::CONNECTING, + SecureChannel::Status::DISCONNECTED + } + }); +} + +TEST_F(CryptAuthSecureChannelTest, DisconnectBeforeAuthentication) { + secure_channel_->Initialize(); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::DISCONNECTED, + SecureChannel::Status::CONNECTING + } + }); + + fake_connection_->Disconnect(); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::CONNECTING, + SecureChannel::Status::DISCONNECTED + } + }); +} + +TEST_F(CryptAuthSecureChannelTest, AuthenticationFails_Disconnect) { + secure_channel_->Initialize(); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::DISCONNECTED, + SecureChannel::Status::CONNECTING + } + }); + + fake_connection_->CompleteInProgressConnection(/* success */ true); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::CONNECTING, + SecureChannel::Status::CONNECTED + }, + { + SecureChannel::Status::CONNECTED, + SecureChannel::Status::AUTHENTICATING + } + }); + + FailAuthentication(Authenticator::Result::DISCONNECTED); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::AUTHENTICATING, + SecureChannel::Status::DISCONNECTED + } + }); +} + +TEST_F(CryptAuthSecureChannelTest, AuthenticationFails_Failure) { + secure_channel_->Initialize(); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::DISCONNECTED, + SecureChannel::Status::CONNECTING + } + }); + + fake_connection_->CompleteInProgressConnection(/* success */ true); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::CONNECTING, + SecureChannel::Status::CONNECTED + }, + { + SecureChannel::Status::CONNECTED, + SecureChannel::Status::AUTHENTICATING + } + }); + + FailAuthentication(Authenticator::Result::FAILURE); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::AUTHENTICATING, + SecureChannel::Status::DISCONNECTED + } + }); +} + +TEST_F(CryptAuthSecureChannelTest, SendMessage_DisconnectWhileSending) { + ConnectAndAuthenticate(); + StartSendingMessage("feature", "payload"); + + fake_connection_->Disconnect(); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::AUTHENTICATED, + SecureChannel::Status::DISCONNECTED + } + }); + + fake_connection_->FinishSendingMessageWithSuccess(false); + // No further state change should have occurred. + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange>()); +} + +TEST_F( + CryptAuthSecureChannelTest, + SendMessage_DisconnectWhileSending_ThenSendCompletedOccurs) { + ConnectAndAuthenticate(); + StartSendingMessage("feature", "payload"); + + fake_connection_->Disconnect(); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::AUTHENTICATED, + SecureChannel::Status::DISCONNECTED + } + }); + + // If, due to a race condition, a disconnection occurs and |SendCompleted()| + // is called in the success case, nothing should occur. + fake_connection_->FinishSendingMessageWithSuccess(true); + + // No further state change should have occurred. + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange>()); +} + +TEST_F(CryptAuthSecureChannelTest, SendMessage_Failure) { + ConnectAndAuthenticate(); + StartAndFinishSendingMessage("feature", "payload", /* success */ false); + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::AUTHENTICATED, + SecureChannel::Status::DISCONNECTED + } + }); +} + +TEST_F(CryptAuthSecureChannelTest, SendMessage_Success) { + ConnectAndAuthenticate(); + StartAndFinishSendingMessage("feature", "payload", /* success */ true); +} + +TEST_F(CryptAuthSecureChannelTest, SendMessage_MultipleMessages_Success) { + ConnectAndAuthenticate(); + + // Send a second message before the first has completed. + secure_channel_->SendMessage("feature1", "payload1"); + secure_channel_->SendMessage("feature2", "payload2"); + + // The first message should still be sending. + VerifyMessageBeingSent("feature1", "payload1"); + + // Send the first message. + fake_connection_->FinishSendingMessageWithSuccess(true); + + // Now, the second message should be sending. + VerifyMessageBeingSent("feature2", "payload2"); + fake_connection_->FinishSendingMessageWithSuccess(true); +} + +TEST_F(CryptAuthSecureChannelTest, SendMessage_MultipleMessages_FirstFails) { + ConnectAndAuthenticate(); + + // Send a second message before the first has completed. + secure_channel_->SendMessage("feature1", "payload1"); + secure_channel_->SendMessage("feature2", "payload2"); + + // The first message should still be sending. + VerifyMessageBeingSent("feature1", "payload1"); + + // Fail sending the first message. + fake_connection_->FinishSendingMessageWithSuccess(false); + + // The connection should have become disconnected. + VerifyConnectionStateChanges(std::vector<SecureChannelStatusChange> { + { + SecureChannel::Status::AUTHENTICATED, + SecureChannel::Status::DISCONNECTED + } + }); + + // The first message failed, so no other ones should be tried afterward. + VerifyNoMessageBeingSent(); +} + +TEST_F(CryptAuthSecureChannelTest, ReceiveMessage) { + ConnectAndAuthenticate(); + + // Note: FakeSecureContext's Encode() function simply adds ", but encoded" to + // the end of the message. + fake_connection_->ReceiveMessage("feature", "payload, but encoded"); + VerifyReceivedMessages(std::vector<ReceivedMessage> { + {"feature", "payload"} + }); +} + +TEST_F(CryptAuthSecureChannelTest, SendAndReceiveMessages) { + ConnectAndAuthenticate(); + + StartAndFinishSendingMessage("feature", "request1", /* success */ true); + + // Note: FakeSecureContext's Encode() function simply adds ", but encoded" to + // the end of the message. + fake_connection_->ReceiveMessage("feature", "response1, but encoded"); + VerifyReceivedMessages(std::vector<ReceivedMessage> { + {"feature", "response1"} + }); + + StartAndFinishSendingMessage("feature", "request2", /* success */ true); + + fake_connection_->ReceiveMessage("feature", "response2, but encoded"); + VerifyReceivedMessages(std::vector<ReceivedMessage> { + {"feature", "response2"} + }); +} + +} // namespace cryptauth
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc index 7c1fda14..fe6ac02 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
@@ -205,7 +205,7 @@ DCHECK(data_reduction_proxy_config_); DCHECK(request); - // If this is after a redirect, reset |request|'s DataReductionProxyData. + // Reset |request|'s DataReductionProxyData. DataReductionProxyData::ClearData(request); if (params::IsIncludedInHoldbackFieldTrial()) { @@ -278,6 +278,14 @@ lofi_decider->MaybeSetIgnorePreviewsBlacklistDirective(headers); } +void DataReductionProxyNetworkDelegate::OnBeforeRedirectInternal( + net::URLRequest* request, + const GURL& new_location) { + // Since this is after a redirect response, reset |request|'s + // DataReductionProxyData. + DataReductionProxyData::ClearData(request); +} + void DataReductionProxyNetworkDelegate::OnCompletedInternal( net::URLRequest* request, bool started) {
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h index 0d5799c..f36cea45 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h
@@ -104,6 +104,11 @@ const net::ProxyRetryInfoMap& proxy_retry_info, net::HttpRequestHeaders* headers) override; + // Called after a redirect response. Clears out persistent + // DataReductionProxyData from the URLRequest. + void OnBeforeRedirectInternal(net::URLRequest* request, + const GURL& new_location) override; + // Indicates that the URL request has been completed or failed. // |started| indicates whether the request has been started. If false, // some information like the socket address is not available.
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc index 338c4f3..f30883c 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
@@ -68,6 +68,8 @@ const char kOtherProxy[] = "testproxy:17"; +const char kTestURL[] = "http://www.google.com/"; + #if defined(OS_ANDROID) const Client kClient = Client::CHROME_ANDROID; #elif defined(OS_IOS) @@ -288,7 +290,7 @@ const std::string& response_headers, bool expect_cached, bool expect_brotli) { - GURL url("http://www.example.com/a.html"); + GURL url(kTestURL); net::SSLSocketDataProvider ssl_socket_data_provider(net::ASYNC, net::OK); int response_body_size = 140; @@ -311,11 +313,17 @@ EXPECT_FALSE( io_data()->test_request_options()->GetHeaderValueForTesting().empty()); - std::string prefix_headers( - "GET http://www.example.com/a.html HTTP/1.1\r\n" - "Host: www.example.com\r\n" - "Proxy-Connection: keep-alive\r\n" - "User-Agent:\r\n"); + std::string host = GURL(kTestURL).host(); + std::string prefix_headers = std::string("GET ") + .append(kTestURL) + .append( + " HTTP/1.1\r\n" + "Host: ") + .append(host) + .append( + "\r\n" + "Proxy-Connection: keep-alive\r\n" + "User-Agent:\r\n"); std::string accept_language_header("Accept-Language: en-us,fr\r\n"); @@ -442,8 +450,8 @@ TEST_F(DataReductionProxyNetworkDelegateTest, AuthenticationTest) { Init(false, false); - std::unique_ptr<net::URLRequest> fake_request(FetchURLRequest( - GURL("http://www.google.com/"), nullptr, std::string(), 0)); + std::unique_ptr<net::URLRequest> fake_request( + FetchURLRequest(GURL(kTestURL), nullptr, std::string(), 0)); net::ProxyInfo data_reduction_proxy_info; net::ProxyRetryInfoMap proxy_retry_info; @@ -518,8 +526,8 @@ net::ProxyRetryInfoMap proxy_retry_info; net::TestDelegate delegate; - std::unique_ptr<net::URLRequest> fake_request = context()->CreateRequest( - GURL("http://www.google.com/"), net::IDLE, &delegate); + std::unique_ptr<net::URLRequest> fake_request = + context()->CreateRequest(GURL(kTestURL), net::IDLE, &delegate); fake_request->SetLoadFlags(net::LOAD_MAIN_FRAME_DEPRECATED); lofi_decider()->SetIsUsingLoFiMode( config()->ShouldEnableLoFiMode(*fake_request.get())); @@ -538,8 +546,8 @@ net::HttpRequestHeaders headers; net::ProxyRetryInfoMap proxy_retry_info; net::TestDelegate delegate; - std::unique_ptr<net::URLRequest> fake_request = context()->CreateRequest( - GURL("http://www.google.com/"), net::IDLE, &delegate); + std::unique_ptr<net::URLRequest> fake_request = + context()->CreateRequest(GURL(kTestURL), net::IDLE, &delegate); lofi_decider()->SetIsUsingLoFiMode(false); NotifyNetworkDelegate(fake_request.get(), data_reduction_proxy_info, proxy_retry_info, &headers); @@ -556,8 +564,8 @@ net::HttpRequestHeaders headers; net::ProxyRetryInfoMap proxy_retry_info; net::TestDelegate delegate; - std::unique_ptr<net::URLRequest> fake_request = context()->CreateRequest( - GURL("http://www.google.com/"), net::IDLE, &delegate); + std::unique_ptr<net::URLRequest> fake_request = + context()->CreateRequest(GURL(kTestURL), net::IDLE, &delegate); lofi_decider()->SetIsUsingLoFiMode(true); NotifyNetworkDelegate(fake_request.get(), data_reduction_proxy_info, @@ -576,8 +584,8 @@ net::HttpRequestHeaders headers; net::ProxyRetryInfoMap proxy_retry_info; net::TestDelegate delegate; - std::unique_ptr<net::URLRequest> fake_request = context()->CreateRequest( - GURL("http://www.google.com/"), net::IDLE, &delegate); + std::unique_ptr<net::URLRequest> fake_request = + context()->CreateRequest(GURL(kTestURL), net::IDLE, &delegate); fake_request->SetLoadFlags(net::LOAD_MAIN_FRAME_DEPRECATED); lofi_decider()->SetIsUsingLoFiMode(false); NotifyNetworkDelegate(fake_request.get(), data_reduction_proxy_info, @@ -593,8 +601,8 @@ net::HttpRequestHeaders headers; net::ProxyRetryInfoMap proxy_retry_info; net::TestDelegate delegate; - std::unique_ptr<net::URLRequest> fake_request = context()->CreateRequest( - GURL("http://www.google.com/"), net::IDLE, &delegate); + std::unique_ptr<net::URLRequest> fake_request = + context()->CreateRequest(GURL(kTestURL), net::IDLE, &delegate); lofi_decider()->SetIsUsingLoFiMode(false); NotifyNetworkDelegate(fake_request.get(), data_reduction_proxy_info, proxy_retry_info, &headers); @@ -611,8 +619,8 @@ net::HttpRequestHeaders headers; net::ProxyRetryInfoMap proxy_retry_info; net::TestDelegate delegate; - std::unique_ptr<net::URLRequest> fake_request = context()->CreateRequest( - GURL("http://www.google.com/"), net::IDLE, &delegate); + std::unique_ptr<net::URLRequest> fake_request = + context()->CreateRequest(GURL(kTestURL), net::IDLE, &delegate); fake_request->SetLoadFlags(net::LOAD_MAIN_FRAME_DEPRECATED); lofi_decider()->SetIsUsingLoFiMode( config()->ShouldEnableLoFiMode(*fake_request.get())); @@ -672,7 +680,7 @@ context()->set_network_quality_estimator(&test_network_quality_estimator); std::unique_ptr<net::URLRequest> request = context()->CreateRequest( - GURL("http://www.google.com/"), net::RequestPriority::IDLE, nullptr); + GURL(kTestURL), net::RequestPriority::IDLE, nullptr); request->SetLoadFlags(test.main_frame ? net::LOAD_MAIN_FRAME_DEPRECATED : 0); lofi_decider()->SetIsUsingLoFiMode(test.lofi_on); @@ -689,7 +697,7 @@ : net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN, data->effective_connection_type()); EXPECT_TRUE(data->used_data_reduction_proxy()); - EXPECT_EQ(GURL("http://www.google.com/"), data->request_url()); + EXPECT_EQ(GURL(kTestURL), data->request_url()); EXPECT_EQ("fake-session", data->session_key()); EXPECT_EQ(test.lofi_on, data->lofi_requested()); } @@ -727,7 +735,7 @@ data_reduction_proxy_info.UseNamedProxy("some.other.proxy"); config()->UpdateConfigForTesting(test.data_reduction_proxy_enabled, true); std::unique_ptr<net::URLRequest> request = context()->CreateRequest( - GURL("http://www.google.com/"), net::RequestPriority::IDLE, nullptr); + GURL(kTestURL), net::RequestPriority::IDLE, nullptr); request->set_method("GET"); net::HttpRequestHeaders headers; net::ProxyRetryInfoMap proxy_retry_info; @@ -761,7 +769,7 @@ context()->set_network_quality_estimator(&test_network_quality_estimator); std::unique_ptr<net::URLRequest> request = context()->CreateRequest( - GURL("http://www.google.com/"), net::RequestPriority::IDLE, nullptr); + GURL(kTestURL), net::RequestPriority::IDLE, nullptr); request->SetLoadFlags(net::LOAD_MAIN_FRAME_DEPRECATED); lofi_decider()->SetIsUsingLoFiMode(true); io_data()->request_options()->SetSecureSession("fake-session"); @@ -774,14 +782,20 @@ EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_OFFLINE, data->effective_connection_type()); EXPECT_TRUE(data->used_data_reduction_proxy()); - EXPECT_EQ(GURL("http://www.google.com/"), data->request_url()); + EXPECT_EQ(GURL(kTestURL), data->request_url()); EXPECT_EQ("fake-session", data->session_key()); EXPECT_TRUE(data->lofi_requested()); data_reduction_proxy_info.UseNamedProxy("port.of.other.proxy"); - // Simulate a redirect by calling NotifyBeforeSendHeaders again with different - // proxy info. + // Simulate a redirect even though the same URL is used. Should clear + // DataReductionProxyData. + network_delegate()->NotifyBeforeRedirect(request.get(), GURL(kTestURL)); + data = DataReductionProxyData::GetData(*request.get()); + EXPECT_FALSE(data); + + // Call NotifyBeforeSendHeaders again with different proxy info to check that + // new data isn't added. network_delegate()->NotifyBeforeSendHeaders( request.get(), data_reduction_proxy_info, proxy_retry_info, &headers); data = DataReductionProxyData::GetData(*request.get()); @@ -829,9 +843,8 @@ "x-original-content-length: " + base::Int64ToString(kOriginalContentLength) + "\r\n\r\n"; - std::unique_ptr<net::URLRequest> fake_request( - FetchURLRequest(GURL("http://www.google.com/"), nullptr, response_headers, - kResponseContentLength)); + std::unique_ptr<net::URLRequest> fake_request(FetchURLRequest( + GURL(kTestURL), nullptr, response_headers, kResponseContentLength)); fake_request->SetLoadFlags(fake_request->load_flags() | net::LOAD_MAIN_FRAME_DEPRECATED); @@ -907,8 +920,8 @@ lofi_decider()->SetIsUsingLoFiMode( config()->ShouldEnableLoFiMode(*fake_request.get())); - fake_request = (FetchURLRequest(GURL("http://www.example.com/"), nullptr, - response_headers, kResponseContentLength)); + fake_request = (FetchURLRequest(GURL(kTestURL), nullptr, response_headers, + kResponseContentLength)); fake_request->SetLoadFlags(fake_request->load_flags() | net::LOAD_MAIN_FRAME_DEPRECATED); @@ -959,8 +972,7 @@ response_headers += "Chrome-Proxy-Content-Transform: empty-image\r\n"; response_headers += "\r\n"; - FetchURLRequest(GURL("http://www.google.com/"), nullptr, response_headers, - 140); + FetchURLRequest(GURL(kTestURL), nullptr, response_headers, 140); VerifyDidNotifyLoFiResponse(tests[i].lofi_response); } @@ -976,8 +988,7 @@ net::HttpRequestHeaders request_headers; request_headers.SetHeader("chrome-proxy-accept-transform", "lite-page"); lofi_decider()->ignore_is_using_data_reduction_proxy_check(); - FetchURLRequest(GURL("http://www.google.com/"), &request_headers, - std::string(), 140); + FetchURLRequest(GURL(kTestURL), &request_headers, std::string(), 140); histogram_tester.ExpectBucketCount(kLoFiTransformationTypeHistogram, NO_TRANSFORMATION_LITE_PAGE_REQUESTED, 1); @@ -990,8 +1001,7 @@ "x-original-content-length: 200\r\n"; response_headers += "\r\n"; - FetchURLRequest(GURL("http://www.google.com/"), nullptr, response_headers, - 140); + FetchURLRequest(GURL(kTestURL), nullptr, response_headers, 140); histogram_tester.ExpectBucketCount(kLoFiTransformationTypeHistogram, LITE_PAGE, 1); @@ -1033,8 +1043,8 @@ // Use secure sockets when fetching the request since Brotli is only enabled // for secure connections. - std::unique_ptr<net::URLRequest> request(FetchURLRequest( - GURL("http://www.example.com/a.html"), nullptr, response_headers, 140)); + std::unique_ptr<net::URLRequest> request( + FetchURLRequest(GURL(kTestURL), nullptr, response_headers, 140)); EXPECT_EQ(140, request->received_response_content_length()); EXPECT_NE(0, request->GetTotalSentBytes()); EXPECT_NE(0, request->GetTotalReceivedBytes());
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc index 3b5cb25a..eb267fb1 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
@@ -31,6 +31,7 @@ #include "components/data_reduction_proxy/core/common/data_reduction_proxy_server.h" #include "components/prefs/pref_registry_simple.h" #include "components/prefs/testing_pref_service.h" +#include "net/base/network_delegate_impl.h" #include "net/proxy/proxy_config.h" #include "net/proxy/proxy_info.h" #include "net/proxy/proxy_list.h" @@ -621,7 +622,7 @@ // |request_context_storage| takes ownership of the network delegate. std::unique_ptr<DataReductionProxyNetworkDelegate> network_delegate = io_data()->CreateNetworkDelegate( - base::MakeUnique<net::TestNetworkDelegate>(), true); + base::MakeUnique<net::NetworkDelegateImpl>(), true); request_context_storage->set_network_delegate(std::move(network_delegate));
diff --git a/components/exo/notification_surface.cc b/components/exo/notification_surface.cc index c31aae9..2b66edd 100644 --- a/components/exo/notification_surface.cc +++ b/components/exo/notification_surface.cc
@@ -28,10 +28,7 @@ void OnBoundsChanged(const gfx::Rect& old_bounds, const gfx::Rect& new_bounds) override {} gfx::NativeCursor GetCursor(const gfx::Point& point) override { - // If surface has a cursor provider then return 'none' as cursor providers - // are responsible for drawing cursors. Use default cursor if no cursor - // provider is registered. - return surface_->HasCursorProvider() ? ui::kCursorNone : ui::kCursorNull; + return surface_->GetCursor(); } int GetNonClientComponent(const gfx::Point& point) const override { return HTNOWHERE;
diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc index bd267e04..9ca231e5 100644 --- a/components/exo/pointer.cc +++ b/components/exo/pointer.cc
@@ -5,6 +5,8 @@ #include "components/exo/pointer.h" #include "ash/public/cpp/shell_window_ids.h" +#include "cc/output/copy_output_request.h" +#include "cc/output/copy_output_result.h" #include "components/exo/pointer_delegate.h" #include "components/exo/pointer_stylus_delegate.h" #include "components/exo/surface.h" @@ -17,12 +19,20 @@ #include "ui/display/screen.h" #include "ui/events/event.h" #include "ui/gfx/geometry/vector2d_conversions.h" -#include "ui/views/widget/widget.h" +#include "ui/gfx/transform_util.h" + +#if defined(USE_OZONE) +#include "ui/ozone/public/cursor_factory_ozone.h" +#endif + +#if defined(USE_X11) +#include "ui/base/cursor/cursor_loader_x11.h" +#endif namespace exo { namespace { -static constexpr float kLargeCursorScale = 2.8; +const float kLargeCursorScale = 2.8f; // Synthesized events typically lack floating point precision so to avoid // generating mouse event jitter we consider the location of these events @@ -40,10 +50,7 @@ // Pointer, public: Pointer::Pointer(PointerDelegate* delegate) - : delegate_(delegate), - surface_(nullptr), - focus_(nullptr), - cursor_scale_(1.0f) { + : delegate_(delegate), cursor_(ui::kCursorNull) { auto* helper = WMHelper::GetInstance(); helper->AddPreTargetHandler(this); helper->AddCursorObserver(this); @@ -57,9 +64,6 @@ focus_->RemoveSurfaceObserver(this); focus_->UnregisterCursorProvider(this); } - if (widget_) - widget_->CloseNow(); - auto* helper = WMHelper::GetInstance(); helper->RemoveCursorObserver(this); helper->RemovePreTargetHandler(this); @@ -70,9 +74,6 @@ if (!focus_) return; - if (!widget_) - CreatePointerWidget(); - // If surface is different than the current pointer surface then remove the // current surface and add the new surface. if (surface != surface_) { @@ -81,8 +82,10 @@ return; } if (surface_) { - widget_->GetNativeWindow()->RemoveChild(surface_->window()); - surface_->window()->Hide(); + surface_->window()->SetTransform(gfx::Transform()); + WMHelper::GetInstance() + ->GetContainer(ash::kShellWindowId_MouseCursorContainer) + ->RemoveChild(surface_->window()); surface_->SetSurfaceDelegate(nullptr); surface_->RemoveSurfaceObserver(this); } @@ -90,35 +93,31 @@ if (surface_) { surface_->SetSurfaceDelegate(this); surface_->AddSurfaceObserver(this); - widget_->GetNativeWindow()->AddChild(surface_->window()); + // Note: Surface window needs to be added to the tree so we can take a + // snapshot. Where in the tree is not important but we might as well use + // the cursor container. + WMHelper::GetInstance() + ->GetContainer(ash::kShellWindowId_MouseCursorContainer) + ->AddChild(surface_->window()); } } - // Update hotspot and show cursor surface if not already visible. + // Update hotspot. hotspot_ = hotspot; + + // If |surface_| is set then ascynchrounsly capture a snapshot of cursor, + // otherwise cancel pending capture and immediately set the cursor to "none". if (surface_) { - surface_->window()->SetBounds( - gfx::Rect(gfx::Point() - hotspot_.OffsetFromOrigin(), - surface_->window()->layer()->size())); - if (!surface_->window()->IsVisible()) - surface_->window()->Show(); - - // Show widget now that cursor has been defined. - if (!widget_->IsVisible()) - widget_->Show(); + CaptureCursor(); + } else { + cursor_captured_callback_.Cancel(); + cursor_ = ui::kCursorNone; + UpdateCursor(); } +} - // Register pointer as cursor provider now that the cursor for |focus_| has - // been defined. - focus_->RegisterCursorProvider(this); - - // Update cursor in case the registration of pointer as cursor provider - // caused the cursor to change. - aura::client::CursorClient* cursor_client = - aura::client::GetCursorClient(focus_->window()->GetRootWindow()); - if (cursor_client) - cursor_client->SetCursor( - focus_->window()->GetCursor(gfx::ToFlooredPoint(location_))); +gfx::NativeCursor Pointer::GetCursor() { + return cursor_; } //////////////////////////////////////////////////////////////////////////////// @@ -141,6 +140,7 @@ // response to each OnPointerEnter() call. focus_->UnregisterCursorProvider(this); focus_ = nullptr; + cursor_ = ui::kCursorNull; } // Second generate an enter event if focus moved to a new target. if (target) { @@ -149,6 +149,7 @@ location_ = event->location_f(); focus_ = target; focus_->AddSurfaceObserver(this); + focus_->RegisterCursorProvider(this); } delegate_->OnPointerFrame(); } @@ -215,27 +216,6 @@ NOTREACHED(); break; } - - // Update cursor widget to reflect current focus and pointer location. - if (focus_) { - if (!widget_) - CreatePointerWidget(); - - // Update cursor location if mouse event caused it to change. - gfx::Point mouse_location = aura::Env::GetInstance()->last_mouse_location(); - gfx::Rect bounds = widget_->GetWindowBoundsInScreen(); - if (mouse_location != bounds.origin()) { - bounds.set_origin(mouse_location); - widget_->SetBounds(bounds); - } - - UpdateCursorScale(); - if (!widget_->IsVisible()) - widget_->Show(); - } else { - if (widget_ && widget_->IsVisible()) - widget_->Hide(); - } } void Pointer::OnScrollEvent(ui::ScrollEvent* event) { @@ -243,7 +223,9 @@ } void Pointer::OnCursorSetChanged(ui::CursorSetType cursor_set) { - UpdateCursorScale(); + // Capture new cursor in case UI scale changed. + if (focus_ && surface_) + UpdateCursor(); } //////////////////////////////////////////////////////////////////////////////// @@ -252,9 +234,10 @@ void Pointer::OnSurfaceCommit() { surface_->CheckIfSurfaceHierarchyNeedsCommitToNewSurfaces(); surface_->CommitSurfaceHierarchy(); - surface_->window()->SetBounds( - gfx::Rect(gfx::Point() - hotspot_.OffsetFromOrigin(), - surface_->window()->layer()->size())); + + // Capture new cursor to reflect result of commit. + if (focus_) + CaptureCursor(); } bool Pointer::IsSurfaceSynchronized() const { @@ -277,23 +260,6 @@ //////////////////////////////////////////////////////////////////////////////// // Pointer, private: -void Pointer::CreatePointerWidget() { - DCHECK(!widget_); - - views::Widget::InitParams params; - params.type = views::Widget::InitParams::TYPE_TOOLTIP; - params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; - params.shadow_type = views::Widget::InitParams::SHADOW_TYPE_NONE; - params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; - params.accept_events = false; - params.parent = WMHelper::GetInstance()->GetContainer( - ash::kShellWindowId_MouseCursorContainer); - widget_.reset(new views::Widget); - widget_->Init(params); - widget_->GetNativeWindow()->set_owned_by_parent(false); - widget_->GetNativeWindow()->SetName("ExoPointer"); -} - Surface* Pointer::GetEffectiveTargetForEvent(ui::Event* event) const { Surface* target = Surface::AsSurface(static_cast<aura::Window*>(event->target())); @@ -303,22 +269,20 @@ return delegate_->CanAcceptPointerEventsForSurface(target) ? target : nullptr; } -void Pointer::UpdateCursorScale() { - if (!focus_) - return; +void Pointer::CaptureCursor() { + DCHECK(surface_); + DCHECK(focus_); display::Screen* screen = display::Screen::GetScreen(); WMHelper* helper = WMHelper::GetInstance(); // Update cursor scale if the effective UI scale has changed. - display::Display display = - screen->GetDisplayNearestWindow(widget_->GetNativeWindow()); + display::Display display = screen->GetDisplayNearestWindow(focus_->window()); float ui_scale = helper->GetDisplayInfo(display.id()).GetEffectiveUIScale(); + float primary_device_scale_factor = + screen->GetPrimaryDisplay().device_scale_factor(); if (display::Display::HasInternalDisplay()) { - float primary_device_scale_factor = - screen->GetPrimaryDisplay().device_scale_factor(); - // The size of the cursor surface is the quotient of its physical size and // the DSF of the primary display. The physical size is proportional to the // DSF of the internal display. For external displays (and the internal @@ -335,12 +299,62 @@ if (helper->GetCursorSet() == ui::CURSOR_SET_LARGE) ui_scale *= kLargeCursorScale; - if (ui_scale != cursor_scale_) { - gfx::Transform transform; - transform.Scale(ui_scale, ui_scale); - widget_->GetNativeWindow()->SetTransform(transform); - cursor_scale_ = ui_scale; + // Set UI scale before submitting capture request. + surface_->window()->layer()->SetTransform( + gfx::GetScaleTransform(gfx::Point(), ui_scale)); + + // Cancel pending capture and create a new request. + cursor_captured_callback_.Reset( + base::Bind(&Pointer::OnCursorCaptured, base::Unretained(this), + gfx::ScaleToFlooredPoint( + hotspot_, + // |hotspot_| is in surface coordinate space so apply both + // device scale and UI scale. + ui_scale * primary_device_scale_factor))); + surface_->window()->layer()->RequestCopyOfOutput( + cc::CopyOutputRequest::CreateBitmapRequest( + cursor_captured_callback_.callback())); +} + +void Pointer::OnCursorCaptured(const gfx::Point& hotspot, + std::unique_ptr<cc::CopyOutputResult> result) { + if (!focus_) + return; + + cursor_ = ui::kCursorNone; + if (!result->IsEmpty()) { + DCHECK(result->HasBitmap()); + std::unique_ptr<SkBitmap> bitmap = result->TakeBitmap(); + + ui::PlatformCursor platform_cursor; +#if defined(USE_OZONE) + // TODO(reveman): Add interface for creating cursors from GpuMemoryBuffers + // and use that here instead of the current bitmap API. crbug.com/686600 + platform_cursor = ui::CursorFactoryOzone::GetInstance()->CreateImageCursor( + *bitmap.get(), hotspot); +#elif defined(USE_X11) + XcursorImage* image = ui::SkBitmapToXcursorImage(bitmap.get(), hotspot); + platform_cursor = ui::CreateReffedCustomXCursor(image); +#endif + cursor_ = ui::kCursorCustom; + cursor_.SetPlatformCursor(platform_cursor); +#if defined(USE_OZONE) + ui::CursorFactoryOzone::GetInstance()->UnrefImageCursor(platform_cursor); +#elif defined(USE_X11) + ui::UnrefCustomXCursor(platform_cursor); +#endif } + + UpdateCursor(); +} + +void Pointer::UpdateCursor() { + DCHECK(focus_); + + aura::client::CursorClient* cursor_client = + aura::client::GetCursorClient(focus_->window()->GetRootWindow()); + if (cursor_client) + cursor_client->SetCursor(cursor_); } } // namespace exo
diff --git a/components/exo/pointer.h b/components/exo/pointer.h index df158e1..c21255e8 100644 --- a/components/exo/pointer.h +++ b/components/exo/pointer.h
@@ -7,23 +7,26 @@ #include <memory> +#include "base/cancelable_callback.h" #include "base/macros.h" #include "components/exo/surface_delegate.h" #include "components/exo/surface_observer.h" #include "components/exo/wm_helper.h" +#include "ui/base/cursor/cursor.h" #include "ui/events/event_handler.h" #include "ui/gfx/geometry/point.h" #include "ui/gfx/geometry/point_f.h" +#include "ui/gfx/native_widget_types.h" + +namespace cc { +class CopyOutputResult; +} namespace ui { class Event; class MouseEvent; } -namespace views { -class Widget; -} - namespace exo { class PointerDelegate; class Surface; @@ -45,6 +48,9 @@ // pointer location, in surface local coordinates. void SetCursor(Surface* surface, const gfx::Point& hotspot); + // Returns the current cursor for the pointer. + gfx::NativeCursor GetCursor(); + // Overridden from ui::EventHandler: void OnMouseEvent(ui::MouseEvent* event) override; void OnScrollEvent(ui::ScrollEvent* event) override; @@ -60,11 +66,15 @@ void OnSurfaceDestroying(Surface* surface) override; private: - // Creates the |widget_| for pointer. - void CreatePointerWidget(); + // Asynchronously update the cursor by capturing a snapshot of |surface_|. + void CaptureCursor(); - // Updates the scale of the cursor with the latest state. - void UpdateCursorScale(); + // Called when cursor snapshot has been captured. + void OnCursorCaptured(const gfx::Point& hotspot, + std::unique_ptr<cc::CopyOutputResult> result); + + // Update cursor to reflect the current value of |cursor_|. + void UpdateCursor(); // Returns the effective target for |event|. Surface* GetEffectiveTargetForEvent(ui::Event* event) const; @@ -72,9 +82,6 @@ // The delegate instance that all events are dispatched to. PointerDelegate* const delegate_; - // The widget for the pointer cursor. - std::unique_ptr<views::Widget> widget_; - // The current pointer surface. Surface* surface_ = nullptr; @@ -84,12 +91,16 @@ // The location of the pointer in the current focus surface. gfx::PointF location_; - // The scale applied to the cursor to compensate for the UI scale. - float cursor_scale_ = 1.0f; - // The position of the pointer surface relative to the pointer location. gfx::Point hotspot_; + // The current cursor. + ui::Cursor cursor_; + + // Cancelable callback for pending cursor capture. + base::CancelableCallback<void(std::unique_ptr<cc::CopyOutputResult>)> + cursor_captured_callback_; + DISALLOW_COPY_AND_ASSIGN(Pointer); };
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc index d93e6c7..82f2f5db 100644 --- a/components/exo/shell_surface.cc +++ b/components/exo/shell_surface.cc
@@ -684,8 +684,13 @@ surface_->CheckIfSurfaceHierarchyNeedsCommitToNewSurfaces(); surface_->CommitSurfaceHierarchy(); - if (enabled() && !widget_) - CreateShellSurfaceWidget(ui::SHOW_STATE_NORMAL); + if (enabled() && !widget_) { + // Defer widget creation until surface contains some contents. + if (surface_->content_size().IsEmpty()) + Configure(); + else + CreateShellSurfaceWidget(ui::SHOW_STATE_NORMAL); + } // Apply the accumulated pending origin offset to reflect acknowledged // configure requests. @@ -1148,8 +1153,6 @@ } void ShellSurface::Configure() { - DCHECK(widget_); - // Delay configure callback if |scoped_configure_| is set. if (scoped_configure_) { scoped_configure_->set_needs_configure(); @@ -1159,21 +1162,28 @@ gfx::Vector2d origin_offset = pending_origin_config_offset_; pending_origin_config_offset_ = gfx::Vector2d(); - ash::wm::WindowState* window_state = - ash::wm::GetWindowState(widget_->GetNativeWindow()); + int resize_component = HTCAPTION; + if (widget_) { + ash::wm::WindowState* window_state = + ash::wm::GetWindowState(widget_->GetNativeWindow()); - // If surface is being resized, save the resize direction. - int resize_component = window_state->is_dragged() - ? window_state->drag_details()->window_component - : HTCAPTION; + // If surface is being resized, save the resize direction. + if (window_state->is_dragged()) + resize_component = window_state->drag_details()->window_component; + } uint32_t serial = 0; if (!configure_callback_.is_null()) { - const views::NonClientView* non_client_view = widget_->non_client_view(); - serial = configure_callback_.Run( - non_client_view->frame_view()->GetBoundsForClientView().size(), - ash::wm::GetWindowState(widget_->GetNativeWindow())->GetStateType(), - IsResizing(), widget_->IsActive()); + if (widget_) { + const views::NonClientView* non_client_view = widget_->non_client_view(); + serial = configure_callback_.Run( + non_client_view->frame_view()->GetBoundsForClientView().size(), + ash::wm::GetWindowState(widget_->GetNativeWindow())->GetStateType(), + IsResizing(), widget_->IsActive()); + } else { + serial = configure_callback_.Run( + gfx::Size(), ash::wm::WINDOW_STATE_TYPE_NORMAL, false, false); + } } if (!serial) {
diff --git a/components/exo/shell_surface_unittest.cc b/components/exo/shell_surface_unittest.cc index 3df1796..7c6ddaaf2 100644 --- a/components/exo/shell_surface_unittest.cc +++ b/components/exo/shell_surface_unittest.cc
@@ -210,12 +210,16 @@ } TEST_F(ShellSurfaceTest, SetApplicationId) { + gfx::Size buffer_size(64, 64); + std::unique_ptr<Buffer> buffer( + new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size))); std::unique_ptr<Surface> surface(new Surface); std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get())); EXPECT_EQ(nullptr, shell_surface->GetWidget()); shell_surface->SetApplicationId("pre-widget-id"); + surface->Attach(buffer.get()); surface->Commit(); aura::Window* window = shell_surface->GetWidget()->GetNativeWindow(); EXPECT_EQ("pre-widget-id", ShellSurface::GetApplicationId(window)); @@ -312,6 +316,9 @@ } TEST_F(ShellSurfaceTest, CloseCallback) { + gfx::Size buffer_size(64, 64); + std::unique_ptr<Buffer> buffer( + new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size))); std::unique_ptr<Surface> surface(new Surface); std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get())); @@ -319,6 +326,7 @@ shell_surface->set_close_callback( base::Bind(&Close, base::Unretained(&close_call_count))); + surface->Attach(buffer.get()); surface->Commit(); EXPECT_EQ(0, close_call_count); @@ -497,10 +505,14 @@ } TEST_F(ShellSurfaceTest, Shadow) { + gfx::Size buffer_size(128, 128); + std::unique_ptr<Buffer> buffer( + new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size))); std::unique_ptr<Surface> surface(new Surface); std::unique_ptr<ShellSurface> shell_surface( new ShellSurface(surface.get(), nullptr, gfx::Rect(), true, false, ash::kShellWindowId_DefaultContainer)); + surface->Attach(buffer.get()); surface->Commit(); aura::Window* window = shell_surface->GetWidget()->GetNativeWindow(); @@ -514,7 +526,6 @@ // 2) Just creating a sub surface won't create a shadow. std::unique_ptr<Surface> child = display->CreateSurface(); - gfx::Size buffer_size(128, 128); std::unique_ptr<Buffer> child_buffer( new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size))); child->Attach(child_buffer.get()); @@ -570,6 +581,9 @@ } TEST_F(ShellSurfaceTest, ShadowWithStateChange) { + gfx::Size buffer_size(64, 64); + std::unique_ptr<Buffer> buffer( + new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size))); std::unique_ptr<Surface> surface(new Surface); // Set the bounds to disable auto managed mode. std::unique_ptr<ShellSurface> shell_surface( @@ -580,6 +594,7 @@ const gfx::Size content_size(100, 100); const gfx::Rect original_bounds(gfx::Point(10, 10), content_size); shell_surface->SetGeometry(original_bounds); + surface->Attach(buffer.get()); surface->Commit(); // Placing a shadow at screen origin will make the shadow's origin (-10, -10). @@ -629,6 +644,9 @@ } TEST_F(ShellSurfaceTest, ShadowWithTransform) { + gfx::Size buffer_size(64, 64); + std::unique_ptr<Buffer> buffer( + new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size))); std::unique_ptr<Surface> surface(new Surface); // Set the bounds to disable auto managed mode. std::unique_ptr<ShellSurface> shell_surface( @@ -639,6 +657,7 @@ const gfx::Size content_size(100, 100); const gfx::Rect original_bounds(gfx::Point(10, 10), content_size); shell_surface->SetGeometry(original_bounds); + surface->Attach(buffer.get()); surface->Commit(); aura::Window* window = shell_surface->GetWidget()->GetNativeWindow();
diff --git a/components/exo/surface.cc b/components/exo/surface.cc index 35e78516..7fa8b877 100644 --- a/components/exo/surface.cc +++ b/components/exo/surface.cc
@@ -21,6 +21,7 @@ #include "cc/surfaces/surface.h" #include "cc/surfaces/surface_id_allocator.h" #include "components/exo/buffer.h" +#include "components/exo/pointer.h" #include "components/exo/surface_delegate.h" #include "components/exo/surface_observer.h" #include "third_party/khronos/GLES2/gl2.h" @@ -77,10 +78,7 @@ void OnBoundsChanged(const gfx::Rect& old_bounds, const gfx::Rect& new_bounds) override {} gfx::NativeCursor GetCursor(const gfx::Point& point) override { - // If surface has a cursor provider then return 'none' as cursor providers - // are responsible for drawing cursors. Use default cursor if no cursor - // provider is registered. - return surface_->HasCursorProvider() ? ui::kCursorNone : ui::kCursorNull; + return surface_->GetCursor(); } int GetNonClientComponent(const gfx::Point& point) const override { return HTNOWHERE; @@ -559,8 +557,15 @@ cursor_providers_.erase(provider); } -bool Surface::HasCursorProvider() const { - return !cursor_providers_.empty(); +gfx::NativeCursor Surface::GetCursor() { + // What cursor we display when we have multiple cursor providers is not + // important. Return the first non-null cursor. + for (const auto& cursor_provider : cursor_providers_) { + gfx::NativeCursor cursor = cursor_provider->GetCursor(); + if (cursor != ui::kCursorNull) + return cursor; + } + return ui::kCursorNull; } void Surface::SetSurfaceDelegate(SurfaceDelegate* delegate) {
diff --git a/components/exo/surface.h b/components/exo/surface.h index ba85979a..694d86b 100644 --- a/components/exo/surface.h +++ b/components/exo/surface.h
@@ -26,6 +26,7 @@ #include "ui/aura/window_observer.h" #include "ui/compositor/compositor_vsync_manager.h" #include "ui/gfx/geometry/rect.h" +#include "ui/gfx/native_widget_types.h" namespace base { namespace trace_event { @@ -171,8 +172,9 @@ void RegisterCursorProvider(CursorProvider* provider); void UnregisterCursorProvider(CursorProvider* provider); - // Returns true if surface has at least one cursor provider registered. - bool HasCursorProvider() const; + // Returns the cursor for the surface. If no cursor provider is registered + // then kCursorNull is returned. + gfx::NativeCursor GetCursor(); // Set the surface delegate. void SetSurfaceDelegate(SurfaceDelegate* delegate);
diff --git a/components/exo/wayland/server.cc b/components/exo/wayland/server.cc index a63bfb75..102836af 100644 --- a/components/exo/wayland/server.cc +++ b/components/exo/wayland/server.cc
@@ -21,6 +21,7 @@ #include <wayland-server-core.h> #include <wayland-server-protocol-core.h> #include <xdg-shell-unstable-v5-server-protocol.h> +#include <xdg-shell-unstable-v6-server-protocol.h> #include <algorithm> #include <cstdlib> @@ -1165,9 +1166,220 @@ } //////////////////////////////////////////////////////////////////////////////// +// xdg_positioner_interface: + +void xdg_positioner_v6_destroy(wl_client* client, wl_resource* resource) { + wl_resource_destroy(resource); +} + +void xdg_positioner_v6_set_size(wl_client* client, + wl_resource* resource, + int32_t width, + int32_t height) { + NOTIMPLEMENTED(); +} + +void xdg_positioner_v6_set_anchor_rect(wl_client* client, + wl_resource* resource, + int32_t x, + int32_t y, + int32_t width, + int32_t height) { + NOTIMPLEMENTED(); +} + +void xdg_positioner_v6_set_anchor(wl_client* client, + wl_resource* resource, + uint32_t anchor) { + NOTIMPLEMENTED(); +} + +void xdg_positioner_v6_set_gravity(wl_client* client, + wl_resource* resource, + uint32_t gravity) { + NOTIMPLEMENTED(); +} + +void xdg_positioner_v6_set_constraint_adjustment( + wl_client* client, + wl_resource* resource, + uint32_t constraint_adjustment) { + NOTIMPLEMENTED(); +} + +void xdg_positioner_v6_set_offset(wl_client* client, + wl_resource* resource, + int32_t x, + int32_t y) { + NOTIMPLEMENTED(); +} + +const struct zxdg_positioner_v6_interface xdg_positioner_v6_implementation = { + xdg_positioner_v6_destroy, + xdg_positioner_v6_set_size, + xdg_positioner_v6_set_anchor_rect, + xdg_positioner_v6_set_anchor, + xdg_positioner_v6_set_gravity, + xdg_positioner_v6_set_constraint_adjustment, + xdg_positioner_v6_set_offset}; + +//////////////////////////////////////////////////////////////////////////////// +// xdg_toplevel_interface: + +int XdgToplevelV6ResizeComponent(uint32_t edges) { + switch (edges) { + case ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP: + return HTTOP; + case ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM: + return HTBOTTOM; + case ZXDG_TOPLEVEL_V6_RESIZE_EDGE_LEFT: + return HTLEFT; + case ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_LEFT: + return HTTOPLEFT; + case ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_LEFT: + return HTBOTTOMLEFT; + case ZXDG_TOPLEVEL_V6_RESIZE_EDGE_RIGHT: + return HTRIGHT; + case ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_RIGHT: + return HTTOPRIGHT; + case ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_RIGHT: + return HTBOTTOMRIGHT; + default: + return HTBOTTOMRIGHT; + } +} + +void xdg_toplevel_v6_destroy(wl_client* client, wl_resource* resource) { + wl_resource_destroy(resource); +} + +void xdg_toplevel_v6_set_parent(wl_client* client, + wl_resource* resource, + wl_resource* parent) { + if (!parent) { + GetUserDataAs<ShellSurface>(resource)->SetParent(nullptr); + return; + } + + // This is a noop if parent has not been mapped. + ShellSurface* shell_surface = GetUserDataAs<ShellSurface>(parent); + if (shell_surface->GetWidget()) + GetUserDataAs<ShellSurface>(resource)->SetParent(shell_surface); +} + +void xdg_toplevel_v6_set_title(wl_client* client, + wl_resource* resource, + const char* title) { + GetUserDataAs<ShellSurface>(resource)->SetTitle( + base::string16(base::UTF8ToUTF16(title))); +} + +void xdg_toplevel_v6_set_add_id(wl_client* client, + wl_resource* resource, + const char* app_id) { + GetUserDataAs<ShellSurface>(resource)->SetApplicationId(app_id); +} + +void xdg_toplevel_v6_show_window_menu(wl_client* client, + wl_resource* resource, + wl_resource* seat, + uint32_t serial, + int32_t x, + int32_t y) { + NOTIMPLEMENTED(); +} + +void xdg_toplevel_v6_move(wl_client* client, + wl_resource* resource, + wl_resource* seat, + uint32_t serial) { + GetUserDataAs<ShellSurface>(resource)->Move(); +} + +void xdg_toplevel_v6_resize(wl_client* client, + wl_resource* resource, + wl_resource* seat, + uint32_t serial, + uint32_t edges) { + int component = XdgToplevelV6ResizeComponent(edges); + if (component != HTNOWHERE) + GetUserDataAs<ShellSurface>(resource)->Resize(component); +} + +void xdg_toplevel_v6_set_max_size(wl_client* client, + wl_resource* resource, + int32_t width, + int32_t height) { + NOTIMPLEMENTED(); +} + +void xdg_toplevel_v6_set_min_size(wl_client* client, + wl_resource* resource, + int32_t width, + int32_t height) { + NOTIMPLEMENTED(); +} + +void xdg_toplevel_v6_set_maximized(wl_client* client, wl_resource* resource) { + GetUserDataAs<ShellSurface>(resource)->Maximize(); +} + +void xdg_toplevel_v6_unset_maximized(wl_client* client, wl_resource* resource) { + GetUserDataAs<ShellSurface>(resource)->Restore(); +} + +void xdg_toplevel_v6_set_fullscreen(wl_client* client, + wl_resource* resource, + wl_resource* output) { + GetUserDataAs<ShellSurface>(resource)->SetFullscreen(true); +} + +void xdg_toplevel_v6_unset_fullscreen(wl_client* client, + wl_resource* resource) { + GetUserDataAs<ShellSurface>(resource)->SetFullscreen(false); +} + +void xdg_toplevel_v6_set_minimized(wl_client* client, wl_resource* resource) { + GetUserDataAs<ShellSurface>(resource)->Minimize(); +} + +const struct zxdg_toplevel_v6_interface xdg_toplevel_v6_implementation = { + xdg_toplevel_v6_destroy, xdg_toplevel_v6_set_parent, + xdg_toplevel_v6_set_title, xdg_toplevel_v6_set_add_id, + xdg_toplevel_v6_show_window_menu, xdg_toplevel_v6_move, + xdg_toplevel_v6_resize, xdg_toplevel_v6_set_max_size, + xdg_toplevel_v6_set_min_size, xdg_toplevel_v6_set_maximized, + xdg_toplevel_v6_unset_maximized, xdg_toplevel_v6_set_fullscreen, + xdg_toplevel_v6_unset_fullscreen, xdg_toplevel_v6_set_minimized}; + +//////////////////////////////////////////////////////////////////////////////// +// xdg_popup_interface: + +void xdg_popup_v5_destroy(wl_client* client, wl_resource* resource) { + wl_resource_destroy(resource); +} + +const struct xdg_popup_interface xdg_popup_v5_implementation = { + xdg_popup_v5_destroy}; + +void xdg_popup_v6_destroy(wl_client* client, wl_resource* resource) { + wl_resource_destroy(resource); +} + +void xdg_popup_v6_grab(wl_client* client, + wl_resource* resource, + wl_resource* seat, + uint32_t serial) { + NOTIMPLEMENTED(); +} + +const struct zxdg_popup_v6_interface xdg_popup_v6_implementation = { + xdg_popup_v6_destroy, xdg_popup_v6_grab}; + +//////////////////////////////////////////////////////////////////////////////// // xdg_surface_interface: -int XdgResizeComponent(uint32_t edges) { +int XdgSurfaceV5ResizeComponent(uint32_t edges) { switch (edges) { case XDG_SURFACE_RESIZE_EDGE_TOP: return HTTOP; @@ -1190,13 +1402,13 @@ } } -void xdg_surface_destroy(wl_client* client, wl_resource* resource) { +void xdg_surface_v5_destroy(wl_client* client, wl_resource* resource) { wl_resource_destroy(resource); } -void xdg_surface_set_parent(wl_client* client, - wl_resource* resource, - wl_resource* parent) { +void xdg_surface_v5_set_parent(wl_client* client, + wl_resource* resource, + wl_resource* parent) { if (!parent) { GetUserDataAs<ShellSurface>(resource)->SetParent(nullptr); return; @@ -1208,112 +1420,224 @@ GetUserDataAs<ShellSurface>(resource)->SetParent(shell_surface); } -void xdg_surface_set_title(wl_client* client, - wl_resource* resource, - const char* title) { +void xdg_surface_v5_set_title(wl_client* client, + wl_resource* resource, + const char* title) { GetUserDataAs<ShellSurface>(resource) ->SetTitle(base::string16(base::UTF8ToUTF16(title))); } -void xdg_surface_set_add_id(wl_client* client, - wl_resource* resource, - const char* app_id) { +void xdg_surface_v5_set_add_id(wl_client* client, + wl_resource* resource, + const char* app_id) { GetUserDataAs<ShellSurface>(resource)->SetApplicationId(app_id); } -void xdg_surface_show_window_menu(wl_client* client, - wl_resource* resource, - wl_resource* seat, - uint32_t serial, - int32_t x, - int32_t y) { +void xdg_surface_v5_show_window_menu(wl_client* client, + wl_resource* resource, + wl_resource* seat, + uint32_t serial, + int32_t x, + int32_t y) { NOTIMPLEMENTED(); } -void xdg_surface_move(wl_client* client, - wl_resource* resource, - wl_resource* seat, - uint32_t serial) { +void xdg_surface_v5_move(wl_client* client, + wl_resource* resource, + wl_resource* seat, + uint32_t serial) { GetUserDataAs<ShellSurface>(resource)->Move(); } -void xdg_surface_resize(wl_client* client, - wl_resource* resource, - wl_resource* seat, - uint32_t serial, - uint32_t edges) { - int component = XdgResizeComponent(edges); +void xdg_surface_v5_resize(wl_client* client, + wl_resource* resource, + wl_resource* seat, + uint32_t serial, + uint32_t edges) { + int component = XdgSurfaceV5ResizeComponent(edges); if (component != HTNOWHERE) GetUserDataAs<ShellSurface>(resource)->Resize(component); } -void xdg_surface_ack_configure(wl_client* client, - wl_resource* resource, - uint32_t serial) { +void xdg_surface_v5_ack_configure(wl_client* client, + wl_resource* resource, + uint32_t serial) { GetUserDataAs<ShellSurface>(resource)->AcknowledgeConfigure(serial); } -void xdg_surface_set_window_geometry(wl_client* client, - wl_resource* resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height) { +void xdg_surface_v5_set_window_geometry(wl_client* client, + wl_resource* resource, + int32_t x, + int32_t y, + int32_t width, + int32_t height) { GetUserDataAs<ShellSurface>(resource) ->SetGeometry(gfx::Rect(x, y, width, height)); } -void xdg_surface_set_maximized(wl_client* client, wl_resource* resource) { +void xdg_surface_v5_set_maximized(wl_client* client, wl_resource* resource) { GetUserDataAs<ShellSurface>(resource)->Maximize(); } -void xdg_surface_unset_maximized(wl_client* client, wl_resource* resource) { +void xdg_surface_v5_unset_maximized(wl_client* client, wl_resource* resource) { GetUserDataAs<ShellSurface>(resource)->Restore(); } -void xdg_surface_set_fullscreen(wl_client* client, - wl_resource* resource, - wl_resource* output) { +void xdg_surface_v5_set_fullscreen(wl_client* client, + wl_resource* resource, + wl_resource* output) { GetUserDataAs<ShellSurface>(resource)->SetFullscreen(true); } -void xdg_surface_unset_fullscreen(wl_client* client, wl_resource* resource) { +void xdg_surface_v5_unset_fullscreen(wl_client* client, wl_resource* resource) { GetUserDataAs<ShellSurface>(resource)->SetFullscreen(false); } -void xdg_surface_set_minimized(wl_client* client, wl_resource* resource) { +void xdg_surface_v5_set_minimized(wl_client* client, wl_resource* resource) { GetUserDataAs<ShellSurface>(resource)->Minimize(); } -const struct xdg_surface_interface xdg_surface_implementation = { - xdg_surface_destroy, - xdg_surface_set_parent, - xdg_surface_set_title, - xdg_surface_set_add_id, - xdg_surface_show_window_menu, - xdg_surface_move, - xdg_surface_resize, - xdg_surface_ack_configure, - xdg_surface_set_window_geometry, - xdg_surface_set_maximized, - xdg_surface_unset_maximized, - xdg_surface_set_fullscreen, - xdg_surface_unset_fullscreen, - xdg_surface_set_minimized}; +const struct xdg_surface_interface xdg_surface_v5_implementation = { + xdg_surface_v5_destroy, + xdg_surface_v5_set_parent, + xdg_surface_v5_set_title, + xdg_surface_v5_set_add_id, + xdg_surface_v5_show_window_menu, + xdg_surface_v5_move, + xdg_surface_v5_resize, + xdg_surface_v5_ack_configure, + xdg_surface_v5_set_window_geometry, + xdg_surface_v5_set_maximized, + xdg_surface_v5_unset_maximized, + xdg_surface_v5_set_fullscreen, + xdg_surface_v5_unset_fullscreen, + xdg_surface_v5_set_minimized}; -//////////////////////////////////////////////////////////////////////////////// -// xdg_popup_interface: - -void xdg_popup_destroy(wl_client* client, wl_resource* resource) { +void xdg_surface_v6_destroy(wl_client* client, wl_resource* resource) { wl_resource_destroy(resource); } -const struct xdg_popup_interface xdg_popup_implementation = {xdg_popup_destroy}; +void HandleXdgToplevelV6CloseCallback(wl_resource* resource) { + zxdg_toplevel_v6_send_close(resource); + wl_client_flush(wl_resource_get_client(resource)); +} + +void AddXdgToplevelV6State(wl_array* states, zxdg_toplevel_v6_state state) { + zxdg_toplevel_v6_state* value = static_cast<zxdg_toplevel_v6_state*>( + wl_array_add(states, sizeof(zxdg_toplevel_v6_state))); + DCHECK(value); + *value = state; +} + +uint32_t HandleXdgToplevelV6ConfigureCallback( + wl_resource* resource, + wl_resource* surface_resource, + const gfx::Size& size, + ash::wm::WindowStateType state_type, + bool resizing, + bool activated) { + wl_array states; + wl_array_init(&states); + if (state_type == ash::wm::WINDOW_STATE_TYPE_MAXIMIZED) + AddXdgToplevelV6State(&states, ZXDG_TOPLEVEL_V6_STATE_MAXIMIZED); + if (state_type == ash::wm::WINDOW_STATE_TYPE_FULLSCREEN) + AddXdgToplevelV6State(&states, ZXDG_TOPLEVEL_V6_STATE_FULLSCREEN); + if (resizing) + AddXdgToplevelV6State(&states, ZXDG_TOPLEVEL_V6_STATE_RESIZING); + if (activated) + AddXdgToplevelV6State(&states, ZXDG_TOPLEVEL_V6_STATE_ACTIVATED); + zxdg_toplevel_v6_send_configure(resource, size.width(), size.height(), + &states); + uint32_t serial = wl_display_next_serial( + wl_client_get_display(wl_resource_get_client(surface_resource))); + zxdg_surface_v6_send_configure(surface_resource, serial); + wl_client_flush(wl_resource_get_client(resource)); + wl_array_release(&states); + return serial; +} + +void xdg_surface_v6_get_toplevel(wl_client* client, + wl_resource* resource, + uint32_t id) { + ShellSurface* shell_surface = GetUserDataAs<ShellSurface>(resource); + if (shell_surface->enabled()) { + wl_resource_post_error(resource, ZXDG_SURFACE_V6_ERROR_ALREADY_CONSTRUCTED, + "surface has already been constructed"); + return; + } + + shell_surface->SetEnabled(true); + + wl_resource* xdg_toplevel_resource = + wl_resource_create(client, &zxdg_toplevel_v6_interface, 1, id); + + shell_surface->set_close_callback( + base::Bind(&HandleXdgToplevelV6CloseCallback, + base::Unretained(xdg_toplevel_resource))); + + shell_surface->set_configure_callback(base::Bind( + &HandleXdgToplevelV6ConfigureCallback, + base::Unretained(xdg_toplevel_resource), base::Unretained(resource))); + + wl_resource_set_implementation(xdg_toplevel_resource, + &xdg_toplevel_v6_implementation, shell_surface, + nullptr); +} + +void HandleXdgPopupV6CloseCallback(wl_resource* resource) { + zxdg_popup_v6_send_popup_done(resource); + wl_client_flush(wl_resource_get_client(resource)); +} + +void xdg_surface_v6_get_popup(wl_client* client, + wl_resource* resource, + uint32_t id, + wl_resource* parent, + wl_resource* positioner) { + ShellSurface* shell_surface = GetUserDataAs<ShellSurface>(resource); + if (shell_surface->enabled()) { + wl_resource_post_error(resource, ZXDG_SURFACE_V6_ERROR_ALREADY_CONSTRUCTED, + "surface has already been constructed"); + return; + } + + shell_surface->SetEnabled(true); + + wl_resource* xdg_popup_resource = + wl_resource_create(client, &zxdg_popup_v6_interface, 1, id); + + shell_surface->set_close_callback(base::Bind( + &HandleXdgPopupV6CloseCallback, base::Unretained(xdg_popup_resource))); + + wl_resource_set_implementation( + xdg_popup_resource, &xdg_popup_v6_implementation, shell_surface, nullptr); +} + +void xdg_surface_v6_set_window_geometry(wl_client* client, + wl_resource* resource, + int32_t x, + int32_t y, + int32_t width, + int32_t height) { + GetUserDataAs<ShellSurface>(resource)->SetGeometry( + gfx::Rect(x, y, width, height)); +} + +void xdg_surface_v6_ack_configure(wl_client* client, + wl_resource* resource, + uint32_t serial) { + GetUserDataAs<ShellSurface>(resource)->AcknowledgeConfigure(serial); +} + +const struct zxdg_surface_v6_interface xdg_surface_v6_implementation = { + xdg_surface_v6_destroy, xdg_surface_v6_get_toplevel, + xdg_surface_v6_get_popup, xdg_surface_v6_set_window_geometry, + xdg_surface_v6_ack_configure}; //////////////////////////////////////////////////////////////////////////////// // xdg_shell_interface: -void xdg_shell_destroy(wl_client* client, wl_resource* resource) { +void xdg_shell_v5_destroy(wl_client* client, wl_resource* resource) { // Nothing to do here. } @@ -1322,42 +1646,43 @@ static_assert(XDG_SHELL_VERSION == XDG_SHELL_VERSION_CURRENT, "Interface version doesn't match implementation version"); -void xdg_shell_use_unstable_version(wl_client* client, - wl_resource* resource, - int32_t version) { +void xdg_shell_v5_use_unstable_version(wl_client* client, + wl_resource* resource, + int32_t version) { if (version > XDG_SHELL_VERSION) { wl_resource_post_error(resource, 1, "xdg-shell version not implemented yet."); } } -void HandleXdgSurfaceCloseCallback(wl_resource* resource) { +void HandleXdgSurfaceV5CloseCallback(wl_resource* resource) { xdg_surface_send_close(resource); wl_client_flush(wl_resource_get_client(resource)); } -void AddXdgSurfaceState(wl_array* states, xdg_surface_state state) { +void AddXdgSurfaceV5State(wl_array* states, xdg_surface_state state) { xdg_surface_state* value = static_cast<xdg_surface_state*>( wl_array_add(states, sizeof(xdg_surface_state))); DCHECK(value); *value = state; } -uint32_t HandleXdgSurfaceConfigureCallback(wl_resource* resource, - const gfx::Size& size, - ash::wm::WindowStateType state_type, - bool resizing, - bool activated) { +uint32_t HandleXdgSurfaceV5ConfigureCallback( + wl_resource* resource, + const gfx::Size& size, + ash::wm::WindowStateType state_type, + bool resizing, + bool activated) { wl_array states; wl_array_init(&states); if (state_type == ash::wm::WINDOW_STATE_TYPE_MAXIMIZED) - AddXdgSurfaceState(&states, XDG_SURFACE_STATE_MAXIMIZED); + AddXdgSurfaceV5State(&states, XDG_SURFACE_STATE_MAXIMIZED); if (state_type == ash::wm::WINDOW_STATE_TYPE_FULLSCREEN) - AddXdgSurfaceState(&states, XDG_SURFACE_STATE_FULLSCREEN); + AddXdgSurfaceV5State(&states, XDG_SURFACE_STATE_FULLSCREEN); if (resizing) - AddXdgSurfaceState(&states, XDG_SURFACE_STATE_RESIZING); + AddXdgSurfaceV5State(&states, XDG_SURFACE_STATE_RESIZING); if (activated) - AddXdgSurfaceState(&states, XDG_SURFACE_STATE_ACTIVATED); + AddXdgSurfaceV5State(&states, XDG_SURFACE_STATE_ACTIVATED); uint32_t serial = wl_display_next_serial( wl_client_get_display(wl_resource_get_client(resource))); xdg_surface_send_configure(resource, size.width(), size.height(), &states, @@ -1367,10 +1692,10 @@ return serial; } -void xdg_shell_get_xdg_surface(wl_client* client, - wl_resource* resource, - uint32_t id, - wl_resource* surface) { +void xdg_shell_v5_get_xdg_surface(wl_client* client, + wl_resource* resource, + uint32_t id, + wl_resource* surface) { std::unique_ptr<ShellSurface> shell_surface = GetUserDataAs<Display>(resource)->CreateShellSurface( GetUserDataAs<Surface>(surface)); @@ -1383,31 +1708,32 @@ wl_resource* xdg_surface_resource = wl_resource_create(client, &xdg_surface_interface, 1, id); - shell_surface->set_close_callback(base::Bind( - &HandleXdgSurfaceCloseCallback, base::Unretained(xdg_surface_resource))); - - shell_surface->set_configure_callback( - base::Bind(&HandleXdgSurfaceConfigureCallback, + shell_surface->set_close_callback( + base::Bind(&HandleXdgSurfaceV5CloseCallback, base::Unretained(xdg_surface_resource))); - SetImplementation(xdg_surface_resource, &xdg_surface_implementation, + shell_surface->set_configure_callback( + base::Bind(&HandleXdgSurfaceV5ConfigureCallback, + base::Unretained(xdg_surface_resource))); + + SetImplementation(xdg_surface_resource, &xdg_surface_v5_implementation, std::move(shell_surface)); } -void HandleXdgPopupCloseCallback(wl_resource* resource) { +void HandleXdgPopupV5CloseCallback(wl_resource* resource) { xdg_popup_send_popup_done(resource); wl_client_flush(wl_resource_get_client(resource)); } -void xdg_shell_get_xdg_popup(wl_client* client, - wl_resource* resource, - uint32_t id, - wl_resource* surface, - wl_resource* parent, - wl_resource* seat, - uint32_t serial, - int32_t x, - int32_t y) { +void xdg_shell_v5_get_xdg_popup(wl_client* client, + wl_resource* resource, + uint32_t id, + wl_resource* surface, + wl_resource* parent, + wl_resource* seat, + uint32_t serial, + int32_t x, + int32_t y) { // Parent widget can be found by locating the closest ancestor with a widget. views::Widget* parent_widget = nullptr; aura::Window* parent_window = GetUserDataAs<Surface>(parent)->window(); @@ -1447,28 +1773,91 @@ wl_resource_create(client, &xdg_popup_interface, 1, id); shell_surface->set_close_callback(base::Bind( - &HandleXdgPopupCloseCallback, base::Unretained(xdg_popup_resource))); + &HandleXdgPopupV5CloseCallback, base::Unretained(xdg_popup_resource))); - SetImplementation(xdg_popup_resource, &xdg_popup_implementation, + SetImplementation(xdg_popup_resource, &xdg_popup_v5_implementation, std::move(shell_surface)); } -void xdg_shell_pong(wl_client* client, wl_resource* resource, uint32_t serial) { +void xdg_shell_v5_pong(wl_client* client, + wl_resource* resource, + uint32_t serial) { NOTIMPLEMENTED(); } -const struct xdg_shell_interface xdg_shell_implementation = { - xdg_shell_destroy, xdg_shell_use_unstable_version, - xdg_shell_get_xdg_surface, xdg_shell_get_xdg_popup, xdg_shell_pong}; +const struct xdg_shell_interface xdg_shell_v5_implementation = { + xdg_shell_v5_destroy, xdg_shell_v5_use_unstable_version, + xdg_shell_v5_get_xdg_surface, xdg_shell_v5_get_xdg_popup, + xdg_shell_v5_pong}; -void bind_xdg_shell(wl_client* client, - void* data, - uint32_t version, - uint32_t id) { +void bind_xdg_shell_v5(wl_client* client, + void* data, + uint32_t version, + uint32_t id) { wl_resource* resource = wl_resource_create(client, &xdg_shell_interface, 1, id); - wl_resource_set_implementation(resource, &xdg_shell_implementation, data, + wl_resource_set_implementation(resource, &xdg_shell_v5_implementation, data, + nullptr); +} + +void xdg_shell_v6_destroy(wl_client* client, wl_resource* resource) { + // Nothing to do here. +} + +void xdg_shell_v6_create_positioner(wl_client* client, + wl_resource* resource, + uint32_t id) { + wl_resource* xdg_positioner_resource = + wl_resource_create(client, &zxdg_positioner_v6_interface, 1, id); + + wl_resource_set_implementation(xdg_positioner_resource, + &xdg_positioner_v6_implementation, nullptr, + nullptr); +} + +void xdg_shell_v6_get_xdg_surface(wl_client* client, + wl_resource* resource, + uint32_t id, + wl_resource* surface) { + std::unique_ptr<ShellSurface> shell_surface = + GetUserDataAs<Display>(resource)->CreateShellSurface( + GetUserDataAs<Surface>(surface)); + if (!shell_surface) { + wl_resource_post_error(resource, ZXDG_SHELL_V6_ERROR_ROLE, + "surface has already been assigned a role"); + return; + } + + // Xdg shell v6 surfaces are initially disabled and needs to be explicitly + // mapped before they are enabled and can become visible. + shell_surface->SetEnabled(false); + + wl_resource* xdg_surface_resource = + wl_resource_create(client, &zxdg_surface_v6_interface, 1, id); + + SetImplementation(xdg_surface_resource, &xdg_surface_v6_implementation, + std::move(shell_surface)); +} + +void xdg_shell_v6_pong(wl_client* client, + wl_resource* resource, + uint32_t serial) { + NOTIMPLEMENTED(); +} + +const struct zxdg_shell_v6_interface xdg_shell_v6_implementation = { + xdg_shell_v6_destroy, xdg_shell_v6_create_positioner, + xdg_shell_v6_get_xdg_surface, xdg_shell_v6_pong}; + +void bind_xdg_shell_v6(wl_client* client, + void* data, + uint32_t version, + uint32_t id) { + wl_resource* resource = + wl_resource_create(client, &zxdg_shell_v6_interface, 1, id); + + wl_resource_set_implementation(resource, &xdg_shell_v6_implementation, data, nullptr); } @@ -3244,7 +3633,9 @@ wl_global_create(wl_display_.get(), &wl_output_interface, output_version, display_, bind_output); wl_global_create(wl_display_.get(), &xdg_shell_interface, 1, display_, - bind_xdg_shell); + bind_xdg_shell_v5); + wl_global_create(wl_display_.get(), &zxdg_shell_v6_interface, 1, display_, + bind_xdg_shell_v6); wl_global_create(wl_display_.get(), &zcr_vsync_feedback_v1_interface, 1, display_, bind_vsync_feedback); wl_global_create(wl_display_.get(), &wl_data_device_manager_interface, 1,
diff --git a/components/invalidation/OWNERS b/components/invalidation/OWNERS index 9b396653..7f08e5f 100644 --- a/components/invalidation/OWNERS +++ b/components/invalidation/OWNERS
@@ -1,3 +1,5 @@ dcheng@chromium.org nyquist@chromium.org pavely@chromium.org + +# COMPONENT: Services>Invalidation
diff --git a/components/network_session_configurator/network_session_configurator.cc b/components/network_session_configurator/network_session_configurator.cc index e1fdf9d9..91a2b15 100644 --- a/components/network_session_configurator/network_session_configurator.cc +++ b/components/network_session_configurator/network_session_configurator.cc
@@ -255,6 +255,12 @@ GetVariationParam(quic_trial_params, "do_not_fragment"), "true"); } +bool ShouldQuicEstimateInitialRtt( + const VariationParameters& quic_trial_params) { + return base::LowerCaseEqualsASCII( + GetVariationParam(quic_trial_params, "estimate_initial_rtt"), "true"); +} + bool ShouldQuicDisablePreConnectIfZeroRtt( const VariationParameters& quic_trial_params) { return base::LowerCaseEqualsASCII( @@ -383,6 +389,8 @@ ShouldQuicRaceCertVerification(quic_trial_params); params->quic_do_not_fragment = ShouldQuicDoNotFragment(quic_trial_params); + params->quic_estimate_initial_rtt = + ShouldQuicEstimateInitialRtt(quic_trial_params); params->quic_disable_preconnect_if_0rtt = ShouldQuicDisablePreConnectIfZeroRtt(quic_trial_params); params->quic_host_whitelist = GetQuicHostWhitelist(quic_trial_params);
diff --git a/components/network_session_configurator/network_session_configurator_unittest.cc b/components/network_session_configurator/network_session_configurator_unittest.cc index 38219c7c..1832dfd 100644 --- a/components/network_session_configurator/network_session_configurator_unittest.cc +++ b/components/network_session_configurator/network_session_configurator_unittest.cc
@@ -87,6 +87,7 @@ params_.quic_packet_reader_yield_after_duration_milliseconds); EXPECT_FALSE(params_.quic_race_cert_verification); EXPECT_FALSE(params_.quic_do_not_fragment); + EXPECT_FALSE(params_.quic_estimate_initial_rtt); EXPECT_FALSE(params_.quic_disable_preconnect_if_0rtt); EXPECT_FALSE(params_.quic_migrate_sessions_on_network_change); EXPECT_FALSE(params_.quic_migrate_sessions_early); @@ -220,6 +221,17 @@ EXPECT_TRUE(params_.quic_do_not_fragment); } +TEST_F(NetworkSessionConfiguratorTest, QuicEstimateInitialRtt) { + std::map<std::string, std::string> field_trial_params; + field_trial_params["estimate_initial_rtt"] = "true"; + variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params); + base::FieldTrialList::CreateFieldTrial("QUIC", "Enabled"); + + ParseFieldTrials(); + + EXPECT_TRUE(params_.quic_estimate_initial_rtt); +} + TEST_F(NetworkSessionConfiguratorTest, QuicDisablePreConnectIfZeroRtt) { std::map<std::string, std::string> field_trial_params; field_trial_params["disable_preconnect_if_0rtt"] = "true";
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json index d3881ca2..4328073 100644 --- a/components/policy/resources/policy_templates.json +++ b/components/policy/resources/policy_templates.json
@@ -139,7 +139,7 @@ # persistent IDs for all fields (but not for groups!) are needed. These are # specified by the 'id' keys of each policy. NEVER CHANGE EXISTING IDs, # because doing so would break the deployed wire format! -# For your editing convenience: highest ID currently used: 360 +# For your editing convenience: highest ID currently used: 361 # And don't forget to also update the EnterprisePolicies enum of # histograms.xml. # @@ -8258,6 +8258,48 @@ Otherwise, if compatibility with a buggy server must be maintained, this policy may be set to "tls1.1". This is a stopgap measure and the server should be rapidly fixed.''', }, { + 'name': 'SSLVersionMax', + 'type': 'string-enum', + 'schema': { + 'type': 'string', + 'enum': [ + 'tls1.2', + 'tls1.3', + ], + }, + 'items': [ + { + 'name': 'TLSv1.2', + 'value': 'tls1.2', + 'caption': 'TLS 1.2', + }, + { + 'name': 'TLSv1.3', + 'value': 'tls1.3', + 'caption': 'TLS 1.3', + }, + ], + 'supported_on': [ + 'chrome.*:57-', + 'chrome_os:57-', + 'android:57-', + 'ios:57-', + ], + 'features': { + 'dynamic_refresh': True, + 'per_profile': False, + }, + 'example_value': 'tls1.2', + 'id': 361, + 'caption': '''Maximum SSL version enabled''', + 'tags': ['system-security'], + 'desc': '''Warning: The max TLS version policy will be entirely removed from <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> around version 66 (around February 2018). + + If this policy is not configured then <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> uses a default maximum version which is TLSv1.3. + + Otherwise it may be set to one of the following values: "tls1.2" or "tls1.3". When set, <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> will not use SSL/TLS versions greater than the specified version. An unrecognized value will be ignored.''', + }, + { 'name': 'CertificateTransparencyEnforcementDisabledForUrls', 'type': 'list', 'schema': {
diff --git a/components/policy/resources/policy_templates_ml.xtb b/components/policy/resources/policy_templates_ml.xtb index fe1b798..c17fbe9 100644 --- a/components/policy/resources/policy_templates_ml.xtb +++ b/components/policy/resources/policy_templates_ml.xtb
@@ -138,7 +138,7 @@ ഈ നയം സജ്ജീകരിക്കാതെ വിടുകയാണെങ്കിൽ, സ്ഥിര മൂല്യമായ 'MultiProfileUserBehaviorMustBePrimary' എന്റർപ്രൈസ്-നിയന്ത്രിത ഉപയോക്താക്കൾക്കായി ബാധകമാക്കും, 'MultiProfileUserBehaviorUnrestricted' എന്നത് നിയന്ത്രിച്ചിട്ടില്ലാത്ത ഉപയോക്താക്കൾക്കായി ഉപയോഗിക്കും.</translation> <translation id="1465619815762735808">പ്ലേ ചെയ്യാന് ക്ലിക്കുചെയ്യുക</translation> -<translation id="1468307069016535757">ലോഗിൻ സ്ക്രീനിൽ ഉയർന്ന ദൃശ്യ തീവ്രത മോഡ് പ്രവേശനക്ഷമത സവിശേഷതയുടെ സ്ഥിര നില സജ്ജമാക്കുക. +<translation id="1468307069016535757">ലോഗിൻ സ്ക്രീനിൽ ഉയർന്ന ദൃശ്യ തീവ്രത മോഡ് ഉപയോഗസഹായി സവിശേഷതയുടെ സ്ഥിര നില സജ്ജമാക്കുക. ഈ നയം true എന്നതായി സജ്ജമാക്കുകയാണെങ്കിൽ, ലോഗിൻ സ്ക്രീൻ ദൃശ്യമാകുമ്പോൾ ഉയർന്ന ദൃശ്യ തീവ്രത മോഡ് പ്രവർത്തനക്ഷമമാകും. @@ -367,7 +367,7 @@ false എന്ന് സജ്ജീകരിക്കുകയാണെങ്കിൽ, ഓൺ സ്ക്രീൻ വെർച്വൽ കീബോർഡ് എല്ലായ്പ്പോഴും പ്രവർത്തനരഹിതമായിരിക്കും. - നിങ്ങൾ ഈ നയം സജ്ജമാക്കുകയാണെങ്കിൽ, ഉപയോക്താക്കൾക്ക് അത് മാറ്റാനോ അസാധുവാക്കാനോ കഴിയില്ല. എന്നിരുന്നാലും, ഉപയോക്താക്കൾക്ക് ഈ പോളിസി നിയന്ത്രിക്കുന്ന വെർച്വൽ കീബോർഡിന് പ്രാധാന്യം നൽകുന്ന ഓൺ സ്ക്രീൻ കീബോർഡ് പ്രവേശനക്ഷമത പ്രവർത്തനക്ഷമമാക്കാനോ/പ്രവർത്തനരഹിതമാക്കാനോ തുടർന്നും സാധ്യമാകും. ഓൺ സ്ക്രീൻ കീബോർഡ് പ്രവേശനക്ഷമത നിയന്ത്രിക്കുന്നതിനുള്ള നയം |VirtualKeyboardEnabled| കാണുക. + നിങ്ങൾ ഈ നയം സജ്ജമാക്കുകയാണെങ്കിൽ, ഉപയോക്താക്കൾക്ക് അത് മാറ്റാനോ അസാധുവാക്കാനോ കഴിയില്ല. എന്നിരുന്നാലും, ഉപയോക്താക്കൾക്ക് ഈ പോളിസി നിയന്ത്രിക്കുന്ന വെർച്വൽ കീബോർഡിന് പ്രാധാന്യം നൽകുന്ന ഓൺ സ്ക്രീൻ കീബോർഡ് ഉപയോഗസഹായി പ്രവർത്തനക്ഷമമാക്കാനോ/പ്രവർത്തനരഹിതമാക്കാനോ തുടർന്നും സാധ്യമാകും. ഓൺ സ്ക്രീൻ കീബോർഡ് ഉപയോഗസഹായി നിയന്ത്രിക്കുന്നതിനുള്ള നയം |VirtualKeyboardEnabled| കാണുക. ഈ നയം സജ്ജീകരിക്കാതെ വിടുകയാണെങ്കിൽ, പ്രാരംഭത്തിൽ ഓൺ-സ്ക്രീൻ കീബോർഡ് പ്രവർത്തനരഹിതമാക്കിയിരിക്കാമെങ്കിലും ഉപയോക്താവിന് ഏതുസമയത്തും അത് പ്രവർത്തനക്ഷമമാക്കാനാകും. കീബോർഡ് എപ്പോൾ ദൃശ്യമാകണമെന്ന് തീരുമാനിക്കാനും ഹ്യുറിസ്റ്റിക് നയങ്ങൾ ഉപയോഗിച്ചേക്കാം.</translation> <translation id="228659285074633994">AC പവറിൽ പ്രവർത്തിക്കുമ്പോൾ ഒരു മുന്നറിയിപ്പ് ഡയലോഗ് കാണിച്ചതിന് ശേഷം ഉപയോക്തൃ ഇൻപുട്ട് ഇല്ലാതെയുള്ള സമയ ദൈർഘ്യം വ്യക്തമാക്കുന്നു. @@ -964,12 +964,12 @@ ഈ നയം false ആയി സജ്ജീകരിക്കുകയാണെങ്കിൽ, ഉപയോക്താവ് ലോഗ് ഇൻ ചെയ്തിരിക്കുമ്പോൾ ഉപകരണത്തിൽ ഓഡിയോ ഔട്ട്പുട്ട് ദൃശ്യമാകില്ല. - അന്തർനിർമ്മിത സ്പീക്കറുകളിൽ മാത്രമല്ല, എല്ലാതരം ഓഡിയോ ഔട്ട്പുട്ടിലും ഈ നയം ബാധകമാകും. ഈ നയത്താൽ ഓഡിയോ പ്രവേശനക്ഷമത സവിശേഷതയും തടസ്സപ്പെടും. ഉപയോക്താവിനായി ഒരു സ്ക്രീൻ റീഡർ ആവശ്യമായി വരുമ്പോൾ ഈ നയം പ്രവർത്തനക്ഷമമാക്കരുത്. + അന്തർനിർമ്മിത സ്പീക്കറുകളിൽ മാത്രമല്ല, എല്ലാതരം ഓഡിയോ ഔട്ട്പുട്ടിലും ഈ നയം ബാധകമാകും. ഈ നയത്താൽ ഓഡിയോ ഉപയോഗസഹായി സവിശേഷതയും തടസ്സപ്പെടും. ഉപയോക്താവിനായി ഒരു സ്ക്രീൻ റീഡർ ആവശ്യമായി വരുമ്പോൾ ഈ നയം പ്രവർത്തനക്ഷമമാക്കരുത്. ഈ നയം true ആയി സജ്ജീകരിച്ചിട്ടുണ്ടെങ്കിലോ കോൺഫിഗർ ചെയ്തിട്ടില്ലെങ്കിലോ, ഉപയോക്താക്കൾക്ക് അവരുടെ ഉപകരണത്തിൽ പിന്തുണയ്ക്കുന്ന എല്ലാ ഓഡിയോ ഔട്ട്പുട്ടുകളും ഉപയോഗിക്കാനാകും.</translation> <translation id="3808945828600697669">അപ്രാപ്തമാക്കപ്പെട്ട പ്ലഗിനുകളുടെ ലിസ്റ്റ് നിര്ദേശിക്കുക</translation> <translation id="3816312845600780067">യാന്ത്രിക ലോഗിനിന് ബെയ്ൽഔട്ട് കീബോർഡ് കുറുക്കുവഴി പ്രവർത്തനക്ഷമമാക്കുക</translation> -<translation id="3820526221169548563">ഓൺ-സ്ക്രീൻ കീബോർഡ് പ്രവേശനക്ഷമത സവിശേഷത പ്രവർത്തനക്ഷമമാക്കുക. +<translation id="3820526221169548563">ഓൺ-സ്ക്രീൻ കീബോർഡ് ഉപയോഗസഹായി സവിശേഷത പ്രവർത്തനക്ഷമമാക്കുക. ഈ നയം true എന്നതായി സജ്ജീകരീക്കുകയാണെങ്കിൽ, ഓൺ-സ്ക്രീൻ കീബോർഡ് എല്ലായ്പ്പോഴും പ്രവർത്തനക്ഷമമായിരിക്കും. @@ -1288,7 +1288,7 @@ ഈ നയം സജ്ജമാക്കാതിരിക്കുകയാണെങ്കിൽ, ഇൻട്രാനെറ്റായി ഒരു സെർവർ കണ്ടെത്തിയാൽ പോലും <ph name="PRODUCT_NAME" /> ഉപയോക്തൃ ക്രെഡൻഷ്യലുകൾ നിയുക്തമാക്കില്ല.</translation> <translation id="4752880493649142945">RemoteAccessHostTokenValidationUrl എന്നതിലേക്ക് കണക്റ്റുചെയ്യുന്നതിനുള്ള ക്ലയന്റ് സർട്ടിഫിക്കറ്റ്</translation> -<translation id="4791031774429044540">വലിയ കഴ്സർ പ്രവേശനക്ഷമത സവിശേഷത പ്രവർത്തനക്ഷമമാക്കുക. +<translation id="4791031774429044540">വലിയ കഴ്സർ ഉപയോഗസഹായി സവിശേഷത പ്രവർത്തനക്ഷമമാക്കുക. ഈ നയം true എന്നതായി സജ്ജമാക്കുകയാണെങ്കിൽ, വലിയ കഴ്സർ എല്ലായ്പ്പോഴും പ്രവർത്തനക്ഷമമായിരിക്കും. @@ -1412,7 +1412,7 @@ ഈ നയം ആഗോള സ്ഥിരസ്ഥിതി മൂല്യത്തെ സജ്ജീകരിക്കാത്ത നിലയിലാണെങ്കിൽ, അത് സജ്ജീകരിച്ച 'DefaultNotificationsSetting' നയത്തിലെയോ ഉപയോക്താവിന്റെ സ്വകാര്യ കോൺഫിഗറേഷനിൽ നിന്നുള്ളതോ ആയ എല്ലാ സൈറ്റുകളിലും ഉപയോഗിക്കുന്നതാണ്.</translation> <translation id="5219844027738217407">Android ആപ്സുകളിൽ മൈക്രോഫോണിന് മാത്രമേ ഈ നയം ബാധകമാകൂ. ഈ നയം 'ശരി' എന്ന് സജ്ജമാക്കുമ്പോൾ, ഒഴിവാക്കലുകളൊന്നുമില്ലാതെ എല്ലാ Android ആപ്സുകൾക്കുമായി മൈക്രോഫോൺ മ്യൂട്ടുചെയ്യും.</translation> <translation id="5226033722357981948">പ്ലഗിന് ഫൈന്ഡര് അപ്രാപ്തമാക്കണമോ വേണ്ടയോ എന്ന് നിര്ദേശിക്കുക</translation> -<translation id="523505283826916779">പ്രവേശനക്ഷമത ക്രമീകരണങ്ങൾ</translation> +<translation id="523505283826916779">ഉപയോഗസഹായി ക്രമീകരണങ്ങൾ</translation> <translation id="5255162913209987122">ശുപാർശ ചെയ്യാൻ കഴിയും</translation> <translation id="527237119693897329">ഏതൊക്കെ നേറ്റീവ് സന്ദേശമയയ്ക്കൽ ഹോസ്റ്റുകളാണ് ലോഡുചെയ്യാൻ പാടില്ലാത്തതെന്ന് വ്യക്തമാക്കുന്നതിന് നിങ്ങളെ അനുവദിക്കുന്നു. @@ -1618,7 +1618,7 @@ 'നിർബന്ധിതം' എന്നതാണ് തിരഞ്ഞെടുത്തിരിക്കുന്നതെങ്കിൽ, പേജുകൾ ആൾമാറാട്ട മോഡിൽ മാത്രമേ തുറക്കാൻ കഴിയുകയുള്ളൂ.</translation> <translation id="5836064773277134605">വിദൂര ആക്സസ്സ് ഹോസ്റ്റ് ഉപയോഗിക്കുന്ന UDP പോർട്ട് ശ്രേണി പരിമിതപ്പെടുത്തുക</translation> -<translation id="5862253018042179045">ലോഗിൻ സ്ക്രീനിൽ സംഭാഷണ ഫീഡ്ബാക്ക് പ്രവേശനക്ഷമത സവിശേഷതയുടെ സ്ഥിര നില സജ്ജമാക്കുക. +<translation id="5862253018042179045">ലോഗിൻ സ്ക്രീനിൽ സംഭാഷണ ഫീഡ്ബാക്ക് ഉപയോഗസഹായി സവിശേഷതയുടെ സ്ഥിര നില സജ്ജമാക്കുക. ഈ നയം true എന്നതായി സജ്ജമാക്കുകയാണെങ്കിൽ, ലോഗിൻ സ്ക്രീൻ ദൃശ്യമായിരിക്കുമ്പോൾ സംഭാഷണ ഫീഡ്ബാക്ക് പ്രവർത്തനക്ഷമമാകും. @@ -1650,7 +1650,7 @@ ഈ ക്രമീകരണം പ്രവർത്തനരഹിതമാക്കിയിട്ടുണ്ടെങ്കിലോ കോൺഫിഗർചെയ്തിട്ടില്ലെങ്കിലോ, നുബ്ബി പ്രമാണീകരണ അഭ്യർത്ഥനകൾ അംഗീകരിക്കപ്പെടില്ല.</translation> <translation id="5898486742390981550">ഒന്നിലധികം ഉപയോക്താക്കൾ ലോഗിൻ ചെയ്തിരിക്കുമ്പോൾ, പ്രാഥമിക ഉപയോക്താവിന് മാത്രമേ Android ആപ്സുകൾ ഉപയോഗിക്കാനാവൂ.</translation> <translation id="5921713479449475707">HTTP മുഖേന യാന്ത്രിക അപ്ഡേറ്റ് ഡൗൺലോഡുകൾ അനുവദിക്കുക</translation> -<translation id="5921888683953999946">ലോഗിൻ സ്ക്രീനിൽ വലിയ കഴ്സറിന്റെ പ്രവേശനക്ഷമത സവിശേഷതയുടെ സ്ഥിര അവസ്ഥ സജ്ജമാക്കുക. +<translation id="5921888683953999946">ലോഗിൻ സ്ക്രീനിൽ വലിയ കഴ്സറിന്റെ ഉപയോഗസഹായി സവിശേഷതയുടെ സ്ഥിര അവസ്ഥ സജ്ജമാക്കുക. ഈ നയം true ആയി സജ്ജമാക്കുകയാണെങ്കിൽ ലോഗിൻ സ്ക്രീൻ ദൃശ്യമാകുമ്പോൾ വലിയ കഴ്സർ പ്രവർത്തനക്ഷമമാകും. @@ -1837,8 +1837,8 @@ ഉപയോക്താവ് തിരഞ്ഞെടുത്ത ചാനലിനെ ChromeOsReleaseChannel നയം അസാധുവാക്കും, എന്നാൽ നയ ചാനൽ ഉപകരണത്തിൽ ഇൻസ്റ്റാളുചെയ്ത ഒന്നിനേക്കാൾ സുദൃഢമാണെങ്കിൽ, ഉപകരണത്തിൽ ഇൻസ്റ്റാളുചെയ്തിരിക്കുന്നതിനേക്കാൾ ഉയർന്ന പതിപ്പ് നമ്പറിലേക്ക് എത്തുന്ന കൂടുതൽ സുദൃഢമായ ചാനലിന്റെ പതിപ്പിനുശേഷം മാത്രമേ ചാനൽ സ്വിച്ചുചെയ്യുകയുള്ളൂ.</translation> <translation id="6559057113164934677">എന്റെ ക്യാമറയും മൈക്രോഫോണും ആക്സസ്സുചെയ്യാൻ ഒരു സൈറ്റിനെയും അനുവദിക്കരുത്</translation> -<translation id="6561396069801924653">സിസ്റ്റം ട്രേ മെനുവിൽ പ്രവേശനക്ഷമത ഓപ്ഷനുകൾ കാണിക്കുക</translation> -<translation id="6565312346072273043">ലോഗിൻ സ്ക്രീനിലെ ഓൺ-സ്ക്രീൻ കീബോർഡ് പ്രവേശനക്ഷമത സവിശേഷതയുടെ സ്ഥിര നില സജ്ജീകരിക്കുക. +<translation id="6561396069801924653">സിസ്റ്റം ട്രേ മെനുവിൽ ഉപയോഗസഹായി ഓപ്ഷനുകൾ കാണിക്കുക</translation> +<translation id="6565312346072273043">ലോഗിൻ സ്ക്രീനിലെ ഓൺ-സ്ക്രീൻ കീബോർഡ് ഉപയോഗസഹായി സവിശേഷതയുടെ സ്ഥിര നില സജ്ജീകരിക്കുക. ഈ നയം true ആയി സജ്ജീകരിക്കുകയാണെങ്കിൽ, ലോഗിൻ സ്ക്രീൻ ദൃശ്യമാകുമ്പോൾ ഓൺ-സ്ക്രീൻ കീബോർഡ് പ്രവർത്തനക്ഷമമാകും. @@ -1919,15 +1919,15 @@ ഈ നയം സജ്ജീകരിക്കാതെ വിടുകയാണെങ്കിലോ ഇത് ഒരു ശൂന്യമായ സ്ട്രിംഗിലേയ്ക്ക് സജ്ജീകരിച്ചിട്ടുണ്ടെങ്കിലോ, <ph name="REMOTEACCESSHOSTFIREWALLTRAVERSAL_POLICY_NAME" /> നയം പ്രവർത്തനരഹിതമാക്കിയിട്ടില്ലെങ്കിൽ ലഭ്യമായ എല്ലാ പോർട്ടും ഉപയോഗിക്കാൻ വിദൂര ആക്സസ്സ് ഹോസ്റ്റിനെ അനുവദിക്കും, ഈ സാഹചര്യത്തിൽ വിദൂര ആക്സസ്സ് ഹോസ്റ്റ് 12400-12409 പരിധിയിൽ UDP പോർട്ടുകൾ ഉപയോഗിക്കും.</translation> <translation id="6699880231565102694">വിദൂര ആക്സസ്സ് ഹോസ്റ്റുകൾക്കായി ഇരട്ട-വസ്തുതാ പ്രാമാണീകരണം പ്രാപ്തമാക്കുക</translation> -<translation id="6757375960964186754">സിസ്റ്റം മെനുവിൽ <ph name="PRODUCT_OS_NAME" /> പ്രവേശനക്ഷമതാ ഓപ്ഷനുകൾ ദൃശ്യമാക്കുക. +<translation id="6757375960964186754">സിസ്റ്റം മെനുവിൽ <ph name="PRODUCT_OS_NAME" /> ഉപയോഗസഹായി ഓപ്ഷനുകൾ ദൃശ്യമാക്കുക. - ഈ നയം true ആയി സജ്ജീകരിക്കുകയാണെങ്കിൽ, സിസ്റ്റം ട്രേ മെനുവിൽ പ്രവേശനക്ഷമതാ ഓപ്ഷനുകൾ എല്ലായ്പ്പോഴും ദൃശ്യമാകും. + ഈ നയം true ആയി സജ്ജീകരിക്കുകയാണെങ്കിൽ, സിസ്റ്റം ട്രേ മെനുവിൽ ഉപയോഗസഹായി ഓപ്ഷനുകൾ എല്ലായ്പ്പോഴും ദൃശ്യമാകും. - ഈ നയം false ആയി സജ്ജീകരിക്കുകയാണെങ്കിൽ, സിസ്റ്റം ട്രേ മെനുവിൽ പ്രവേശനക്ഷമതാ ഓപ്ഷനുകൾ ഒരിക്കലും ദൃശ്യമാകില്ല. + ഈ നയം false ആയി സജ്ജീകരിക്കുകയാണെങ്കിൽ, സിസ്റ്റം ട്രേ മെനുവിൽ ഉപയോഗസഹായി ഓപ്ഷനുകൾ ഒരിക്കലും ദൃശ്യമാകില്ല. ഈ നയം സജ്ജീകരിക്കുകയാണെങ്കിൽ, ഉപയോക്താക്കൾക്ക് അത് മാറ്റാനോ അസാധുവാക്കാനോ കഴിയില്ല. - ഈ നയം സജ്ജീകരിക്കാതെ വിടുകയാണെങ്കിൽ, സിസ്റ്റം ട്രേ മെനുവിൽ പ്രവേശനക്ഷമത ഓപ്ഷനുകൾ ദൃശ്യമാകില്ലെങ്കിലും ക്രമീകരണങ്ങളുടെ പേജ് വഴി ഉപയോക്താക്കൾക്ക് പ്രവേശനക്ഷമത ഓപ്ഷനുകൾ ദൃശ്യമാക്കാനാകും.</translation> + ഈ നയം സജ്ജീകരിക്കാതെ വിടുകയാണെങ്കിൽ, സിസ്റ്റം ട്രേ മെനുവിൽ ഉപയോഗസഹായി ഓപ്ഷനുകൾ ദൃശ്യമാകില്ലെങ്കിലും ക്രമീകരണങ്ങളുടെ പേജ് വഴി ഉപയോക്താക്കൾക്ക് ഉപയോഗസഹായി ഓപ്ഷനുകൾ ദൃശ്യമാക്കാനാകും.</translation> <translation id="6766216162565713893">അടുത്തുള്ള ഒരു Bluetooth ഉപകരണത്തിലേക്ക് ഉപയോക്താവിനോട് ആക്സസ്സ് അനുവദിക്കാനായി ആവശ്യപ്പെടാൻ സൈറ്റുകളെ അനുവദിക്കുക</translation> <translation id="6770454900105963262">സജീവ കിയോസ്ക് സെഷനുകളെക്കുറിച്ചുള്ള വിവരം റിപ്പോർട്ടുചെയ്യുക</translation> <translation id="6774533686631353488">ഉപയോക്തൃനില പ്രാദേശിക സന്ദേശമയയ്ക്കൽ ഹോസ്റ്റുകളെ അനുവദിക്കുക (അഡ്മിൻ അനുമതികളില്ലാതെ ഇൻസ്റ്റാൾചെയ്തത്).</translation> @@ -1949,7 +1949,7 @@ ഡെമോ സെഷൻ ആരംഭിക്കുമ്പോൾ ലോഡുചെയ്യാനുള്ള URL-കളുടെ ഗണത്തെ നിർണ്ണയിക്കുന്നു. പ്രാരംഭ URL ക്രമീകരിക്കുന്നതിനായുള്ള മറ്റ് എല്ലാ മെക്കാനിസങ്ങളെയും ഈ നയം അസാധുവാക്കും, അതുകൊണ്ട് ഒരു പ്രത്യേക ഉപയോക്താവുമായി ബന്ധപ്പെടുത്തിയിട്ടില്ലാത്ത ഒരു സെഷനിൽ മാത്രമേ നടപ്പിലാക്കാൻ കഴിയൂ.</translation> <translation id="6908640907898649429">സ്ഥിരസ്ഥിതി തിരയൽ ദാതാവിനെ കോണ്ഫിഗര് ചെയ്യുന്നു. ഉപയോക്താവ് ഉപയോഗിക്കുന്ന അല്ലെങ്കില് സ്ഥിരസ്ഥിതി തിരയൽ അപ്രാപ്തമാക്കാനായി തെരഞ്ഞെടുക്കുന്ന സ്ഥിരസ്ഥിതി തിരയൽ ദാതാവിനെ നിങ്ങള്ക്ക് നിര്ദേശിക്കാന് കഴിയും</translation> -<translation id="6915442654606973733">സംഭാഷണ ഫീഡ്ബാക്ക് പ്രവേശനക്ഷമത സവിശേഷത പ്രവർത്തനക്ഷമമാക്കുക. +<translation id="6915442654606973733">സംഭാഷണ ഫീഡ്ബാക്ക് ഉപയോഗസഹായി സവിശേഷത പ്രവർത്തനക്ഷമമാക്കുക. ഈ നയം true എന്നതായി സജ്ജമാക്കുകയാണെങ്കിൽ, സംഭാഷണ ഫീഡ്ബാക്ക് എല്ലായ്പ്പോഴും പ്രവർത്തനക്ഷമമായിരിക്കും. @@ -2250,7 +2250,7 @@ ഈ നയം <ph name="PRODUCT_NAME" />-ന്റെ ആന്തരിക ഉപയോഗത്തിന് മാത്രമുള്ളതാണ്.</translation> <translation id="7712109699186360774">ഒരു സൈറ്റിന് എന്റെ ക്യാമറ കൂടാതെ/അല്ലെങ്കിൽ മൈക്രോഫോൺ ആക്സസ്സുചെയ്യണമെന്നുള്ളപ്പോഴെല്ലാം ചോദിക്കുക</translation> <translation id="7715711044277116530">അവതരണ മോഡിൽ സ്ക്രീൻ മങ്ങുന്നതിന്റെ കാലതാമസം സ്കെയിൽ ചെയ്യുന്നതനുസരിച്ചുള്ള ശതമാനം</translation> -<translation id="7717938661004793600"><ph name="PRODUCT_OS_NAME" /> പ്രവേശനക്ഷമത സവിശേഷതകൾ കോൺഫിഗർ ചെയ്യുക.</translation> +<translation id="7717938661004793600"><ph name="PRODUCT_OS_NAME" /> ഉപയോഗസഹായി സവിശേഷതകൾ കോൺഫിഗർ ചെയ്യുക.</translation> <translation id="7719251660743813569">ഉപയോഗ അളവുകൾ Google-ലേക്ക് തിരികെ റിപ്പോർട്ടുചെയ്യുന്നുണ്ടോ എന്നത് നിയന്ത്രിക്കുന്നു. ട്രൂ എന്നായി സജ്ജീകരിച്ചിട്ടുണ്ടെങ്കിൽ, <ph name="PRODUCT_OS_NAME" /> ഉപയോഗ അളവുകൾ റിപ്പോർട്ടുചെയ്യും. കോൺഫിഗർ ചെയ്തിട്ടില്ലെങ്കിലോ ഫാൾസ് എന്നായി സജ്ജീകരിച്ചിട്ടുണ്ടെങ്കിലോ, അളവുകൾ റിപ്പോർട്ടുചെയ്യുന്നത് അപ്രാപ്തമാക്കും.</translation> <translation id="7723433108978650103">ലിസ്റ്റുചെയ്ത URL-കളിലേക്കുള്ള ആക്സസ്സ് ബ്ലോക്കുചെയ്യുന്നു. @@ -2438,7 +2438,7 @@ <translation id="8141795997560411818">ഈ നയം Android Google ഡ്രൈവ് ആപ്പ് ഉപയോഗിക്കുന്നതിൽ നിന്ന് ഉപയോക്താവിനെ തടയുന്നില്ല. Google ഡ്രൈവിലുള്ള ആക്സസ് തടയണമെങ്കിൽ, നിങ്ങൾ Android Google ഡ്രൈവ് ആപ്പിന്റെ ഇൻസ്റ്റലേഷൻ അനുവദിക്കരുത്.</translation> <translation id="8146727383888924340">Chrome OS രജിസ്ട്രേഷനിലൂടെ ഓഫറുകൾ വീണ്ടെടുക്കാൻ ഉപയോക്താക്കളെ അനുവദിക്കുക</translation> <translation id="8148785525797916822">തുടർന്ന്, ഒരു കമ്പ്യൂട്ടറിലോ പിന്തുണയ്ക്കാത്ത ഓപ്പറേറ്റിംഗ് സിസ്റ്റത്തിലോ <ph name="PRODUCT_NAME" /> റൺ ചെയ്യുമ്പോൾ കാണിക്കുന്ന മുന്നറിയിപ്പിനെ നിയന്ത്രിക്കുന്നു.</translation> -<translation id="8148901634826284024">ഉയർന്ന ദൃശ്യ തീവ്രത മോഡ് പ്രവേശനക്ഷമത സവിശേഷത പ്രവർത്തനക്ഷമമാക്കുക. +<translation id="8148901634826284024">ഉയർന്ന ദൃശ്യ തീവ്രത മോഡ് ഉപയോഗസഹായി സവിശേഷത പ്രവർത്തനക്ഷമമാക്കുക. ഈ നയം true എന്നതായി സജ്ജമാക്കുകയാണെങ്കിൽ, ഉയർന്ന ദൃശ്യ തീവ്രത മോഡ് എല്ലായ്പ്പോഴും പ്രവർത്തനക്ഷമമാക്കിയിരിക്കും.
diff --git a/components/proximity_auth/messenger_impl_unittest.cc b/components/proximity_auth/messenger_impl_unittest.cc index 7f7257e..fa88a735 100644 --- a/components/proximity_auth/messenger_impl_unittest.cc +++ b/components/proximity_auth/messenger_impl_unittest.cc
@@ -32,6 +32,7 @@ namespace proximity_auth { namespace { +const char kTestFeature[] = "testFeature"; const char kChallenge[] = "a most difficult challenge"; class MockMessengerObserver : public MessengerObserver { @@ -206,7 +207,8 @@ messenger.GetFakeConnection()->FinishSendingMessageWithSuccess(true); EXPECT_CALL(observer, OnDecryptResponseProxy(std::string())); - messenger.GetFakeConnection()->ReceiveMessageWithPayload( + messenger.GetFakeConnection()->ReceiveMessage( + std::string(kTestFeature), "{\"type\":\"decrypt_response\"}, but encoded"); } @@ -218,7 +220,8 @@ messenger.GetFakeConnection()->FinishSendingMessageWithSuccess(true); EXPECT_CALL(observer, OnDecryptResponseProxy(std::string())); - messenger.GetFakeConnection()->ReceiveMessageWithPayload( + messenger.GetFakeConnection()->ReceiveMessage( + std::string(kTestFeature), "{" "\"type\":\"decrypt_response\"," "\"data\":\"not a base64-encoded string\"" @@ -233,7 +236,8 @@ messenger.GetFakeConnection()->FinishSendingMessageWithSuccess(true); EXPECT_CALL(observer, OnDecryptResponseProxy("a winner is you")); - messenger.GetFakeConnection()->ReceiveMessageWithPayload( + messenger.GetFakeConnection()->ReceiveMessage( + std::string(kTestFeature), "{" "\"type\":\"decrypt_response\"," "\"data\":\"YSB3aW5uZXIgaXMgeW91\"" // "a winner is you", base64-encoded @@ -249,7 +253,8 @@ messenger.GetFakeConnection()->FinishSendingMessageWithSuccess(true); EXPECT_CALL(observer, OnDecryptResponseProxy("\xFF\xE6")); - messenger.GetFakeConnection()->ReceiveMessageWithPayload( + messenger.GetFakeConnection()->ReceiveMessage( + std::string(kTestFeature), "{" "\"type\":\"decrypt_response\"," "\"data\":\"_-Y=\"" // "\0xFF\0xE6", base64url-encoded. @@ -301,8 +306,8 @@ messenger.GetFakeConnection()->FinishSendingMessageWithSuccess(true); EXPECT_CALL(observer, OnUnlockResponse(true)); - messenger.GetFakeConnection()->ReceiveMessageWithPayload( - "{\"type\":\"unlock_response\"}, but encoded"); + messenger.GetFakeConnection()->ReceiveMessage( + std::string(kTestFeature), "{\"type\":\"unlock_response\"}, but encoded"); } TEST(ProximityAuthMessengerImplTest, @@ -312,8 +317,8 @@ // Receive a status update message that's missing all the data. EXPECT_CALL(observer, OnRemoteStatusUpdate(_)).Times(0); - messenger.GetFakeConnection()->ReceiveMessageWithPayload( - "{\"type\":\"status_update\"}, but encoded"); + messenger.GetFakeConnection()->ReceiveMessage( + std::string(kTestFeature), "{\"type\":\"status_update\"}, but encoded"); } TEST(ProximityAuthMessengerImplTest, @@ -328,7 +333,8 @@ SECURE_SCREEN_LOCK_ENABLED), Field(&RemoteStatusUpdate::trust_agent_state, TRUST_AGENT_UNSUPPORTED)))); - messenger.GetFakeConnection()->ReceiveMessageWithPayload( + messenger.GetFakeConnection()->ReceiveMessage( + std::string(kTestFeature), "{" "\"type\":\"status_update\"," "\"user_presence\":\"present\"," @@ -344,8 +350,8 @@ messenger.GetFakeConnection()->FinishSendingMessageWithSuccess(true); // The StrictMock will verify that no observer methods are called. - messenger.GetFakeConnection()->ReceiveMessageWithPayload( - "Not JSON, but encoded"); + messenger.GetFakeConnection()->ReceiveMessage(std::string(kTestFeature), + "Not JSON, but encoded"); } TEST(ProximityAuthMessengerImplTest, OnMessageReceived_MissingTypeField) { @@ -355,7 +361,8 @@ messenger.GetFakeConnection()->FinishSendingMessageWithSuccess(true); // The StrictMock will verify that no observer methods are called. - messenger.GetFakeConnection()->ReceiveMessageWithPayload( + messenger.GetFakeConnection()->ReceiveMessage( + std::string(kTestFeature), "{\"some key that's not 'type'\":\"some value\"}, but encoded"); } @@ -364,8 +371,8 @@ StrictMock<MockMessengerObserver> observer(&messenger); // The StrictMock will verify that no observer methods are called. - messenger.GetFakeConnection()->ReceiveMessageWithPayload( - "{\"type\":\"unlock_response\"}, but encoded"); + messenger.GetFakeConnection()->ReceiveMessage( + std::string(kTestFeature), "{\"type\":\"unlock_response\"}, but encoded"); } TEST(ProximityAuthMessengerImplTest, @@ -377,8 +384,8 @@ messenger.GetFakeConnection()->FinishSendingMessageWithSuccess(true); // The StrictMock will verify that no observer methods are called. - messenger.GetFakeConnection()->ReceiveMessageWithPayload( - "{\"type\":\"unlock_response\"}, but encoded"); + messenger.GetFakeConnection()->ReceiveMessage( + std::string(kTestFeature), "{\"type\":\"unlock_response\"}, but encoded"); } TEST(ProximityAuthMessengerImplTest, @@ -390,7 +397,8 @@ messenger.GetFakeConnection()->FinishSendingMessageWithSuccess(true); // The StrictMock will verify that no observer methods are called. - messenger.GetFakeConnection()->ReceiveMessageWithPayload( + messenger.GetFakeConnection()->ReceiveMessage( + std::string(kTestFeature), "{" "\"type\":\"decrypt_response\"," "\"data\":\"YSB3aW5uZXIgaXMgeW91\"" @@ -427,7 +435,8 @@ // Now simulate a response arriving for the original decryption request. EXPECT_CALL(observer, OnDecryptResponseProxy("a winner is you")); - messenger.GetFakeConnection()->ReceiveMessageWithPayload( + messenger.GetFakeConnection()->ReceiveMessage( + std::string(kTestFeature), "{" "\"type\":\"decrypt_response\"," "\"data\":\"YSB3aW5uZXIgaXMgeW91\""
diff --git a/components/safe_browsing/base_blocking_page.cc b/components/safe_browsing/base_blocking_page.cc index 6c57b34a..8a6db51 100644 --- a/components/safe_browsing/base_blocking_page.cc +++ b/components/safe_browsing/base_blocking_page.cc
@@ -66,7 +66,7 @@ const UnsafeResourceList& unsafe_resources) { return SafeBrowsingErrorUI::SBErrorDisplayOptions( IsMainPageLoadBlocked(unsafe_resources), - true, // kSafeBrowsingExtendedReportingOptInAllowed + false, // kSafeBrowsingExtendedReportingOptInAllowed false, // is_off_the_record false, // is_extended_reporting false, // is_scout
diff --git a/components/ssl_config/ssl_config_service_manager_pref.cc b/components/ssl_config/ssl_config_service_manager_pref.cc index 9437237..2bd06679 100644 --- a/components/ssl_config/ssl_config_service_manager_pref.cc +++ b/components/ssl_config/ssl_config_service_manager_pref.cc
@@ -286,7 +286,7 @@ if (version_min) { config->version_min = version_min; } - if (version_max) { + if (version_max && version_max >= net::SSL_PROTOCOL_VERSION_TLS1_2) { config->version_max = version_max; } config->disabled_cipher_suites = disabled_cipher_suites_;
diff --git a/components/ssl_config/ssl_config_service_manager_pref_unittest.cc b/components/ssl_config/ssl_config_service_manager_pref_unittest.cc index 9c2e24b8..1ddceac7 100644 --- a/components/ssl_config/ssl_config_service_manager_pref_unittest.cc +++ b/components/ssl_config/ssl_config_service_manager_pref_unittest.cc
@@ -179,6 +179,49 @@ EXPECT_LE(net::SSL_PROTOCOL_VERSION_TLS1, ssl_config.version_min); } +// Tests that SSL max version correctly sets the maximum version. +TEST_F(SSLConfigServiceManagerPrefTest, SSLVersionMax) { + scoped_refptr<TestingPrefStore> local_state_store(new TestingPrefStore()); + + TestingPrefServiceSimple local_state; + local_state.SetUserPref(ssl_config::prefs::kSSLVersionMax, + new base::StringValue("tls1.3")); + SSLConfigServiceManager::RegisterPrefs(local_state.registry()); + + std::unique_ptr<SSLConfigServiceManager> config_manager( + SSLConfigServiceManager::CreateDefaultManager( + &local_state, base::ThreadTaskRunnerHandle::Get())); + ASSERT_TRUE(config_manager.get()); + scoped_refptr<SSLConfigService> config_service(config_manager->Get()); + ASSERT_TRUE(config_service.get()); + + SSLConfig ssl_config; + config_service->GetSSLConfig(&ssl_config); + EXPECT_EQ(net::SSL_PROTOCOL_VERSION_TLS1_3, ssl_config.version_max); +} + +// Tests that SSL max version can not be set below TLS 1.2. +TEST_F(SSLConfigServiceManagerPrefTest, NoTLS11Max) { + scoped_refptr<TestingPrefStore> local_state_store(new TestingPrefStore()); + + TestingPrefServiceSimple local_state; + local_state.SetUserPref(ssl_config::prefs::kSSLVersionMax, + new base::StringValue("tls1.1")); + SSLConfigServiceManager::RegisterPrefs(local_state.registry()); + + std::unique_ptr<SSLConfigServiceManager> config_manager( + SSLConfigServiceManager::CreateDefaultManager( + &local_state, base::ThreadTaskRunnerHandle::Get())); + ASSERT_TRUE(config_manager.get()); + scoped_refptr<SSLConfigService> config_service(config_manager->Get()); + ASSERT_TRUE(config_service.get()); + + SSLConfig ssl_config; + config_service->GetSSLConfig(&ssl_config); + // The command-line option must not have been honored. + EXPECT_LE(net::SSL_PROTOCOL_VERSION_TLS1_2, ssl_config.version_max); +} + // Tests that TLS 1.3 may be enabled via features. TEST_F(SSLConfigServiceManagerPrefTest, TLS13Feature) { // Toggle the feature. @@ -194,12 +237,36 @@ scoped_refptr<SSLConfigService> config_service(config_manager->Get()); ASSERT_TRUE(config_service.get()); - // The feature should have switched the default version_fallback_min value. SSLConfig ssl_config; config_service->GetSSLConfig(&ssl_config); EXPECT_EQ(net::SSL_PROTOCOL_VERSION_TLS1_3, ssl_config.version_max); } +// Tests that the SSLVersionMax preference overwites the TLS 1.3 feature. +TEST_F(SSLConfigServiceManagerPrefTest, TLS13SSLVersionMax) { + scoped_refptr<TestingPrefStore> local_state_store(new TestingPrefStore()); + + // Toggle the feature. + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitFromCommandLine("NegotiateTLS13", std::string()); + + TestingPrefServiceSimple local_state; + local_state.SetUserPref(ssl_config::prefs::kSSLVersionMax, + new base::StringValue("tls1.2")); + SSLConfigServiceManager::RegisterPrefs(local_state.registry()); + + std::unique_ptr<SSLConfigServiceManager> config_manager( + SSLConfigServiceManager::CreateDefaultManager( + &local_state, base::ThreadTaskRunnerHandle::Get())); + ASSERT_TRUE(config_manager.get()); + scoped_refptr<SSLConfigService> config_service(config_manager->Get()); + ASSERT_TRUE(config_service.get()); + + SSLConfig ssl_config; + config_service->GetSSLConfig(&ssl_config); + EXPECT_EQ(net::SSL_PROTOCOL_VERSION_TLS1_2, ssl_config.version_max); +} + // Tests that SHA-1 signatures for local trust anchors can be enabled. TEST_F(SSLConfigServiceManagerPrefTest, SHA1ForLocalAnchors) { scoped_refptr<TestingPrefStore> local_state_store(new TestingPrefStore());
diff --git a/components/strings/components_strings_id.xtb b/components/strings/components_strings_id.xtb index 7f321659..dced849 100644 --- a/components/strings/components_strings_id.xtb +++ b/components/strings/components_strings_id.xtb
@@ -263,7 +263,7 @@ <translation id="3549761410225185768"><ph name="NUM_TABS_MORE" /> lainnya...</translation> <translation id="3555561725129903880">Server ini tidak dapat membuktikan bahwa ini adalah <ph name="DOMAIN" />; sertifikat keamanannya berasal dari <ph name="DOMAIN2" />. Hal ini dapat disebabkan oleh kesalahan konfigurasi atau ada penyerang yang mencegat sambungan Anda. <ph name="BEGIN_LEARN_MORE_LINK" />Pelajari lebih lanjut<ph name="END_LEARN_MORE_LINK" />.</translation> <translation id="3556433843310711081">Pengelola dapat membuka blokirnya untuk Anda</translation> -<translation id="3566021033012934673">Sambungan Anda tidak pribadi</translation> +<translation id="3566021033012934673">Koneksi Anda tidak pribadi</translation> <translation id="3583757800736429874">&Ulangi Pemindahan</translation> <translation id="3586931643579894722">Sembunyikan detail</translation> <translation id="3587482841069643663">Semua</translation>
diff --git a/components/sync_sessions/sessions_sync_manager.cc b/components/sync_sessions/sessions_sync_manager.cc index 471e9eb..4b0938e 100644 --- a/components/sync_sessions/sessions_sync_manager.cc +++ b/components/sync_sessions/sessions_sync_manager.cc
@@ -7,12 +7,9 @@ #include <algorithm> #include <utility> -#include "base/format_macros.h" -#include "base/logging.h" #include "base/memory/ptr_util.h" #include "base/metrics/field_trial.h" #include "base/metrics/histogram_macros.h" -#include "base/strings/stringprintf.h" #include "build/build_config.h" #include "components/sync/base/hash_util.h" #include "components/sync/device_info/local_device_info_provider.h" @@ -24,7 +21,6 @@ #include "components/sync_sessions/synced_tab_delegate.h" #include "components/sync_sessions/synced_window_delegate.h" #include "components/sync_sessions/synced_window_delegates_getter.h" -#include "components/sync_sessions/tab_node_pool.h" #include "components/variations/variations_associated_data.h" using sessions::SerializedNavigationEntry; @@ -66,44 +62,17 @@ return s1->modified_time > s2->modified_time; } -std::string TabNodeIdToTag(const std::string& machine_tag, int tab_node_id) { - CHECK_GT(tab_node_id, TabNodePool::kInvalidTabNodeID) << "crbug.com/673618"; - return base::StringPrintf("%s %d", machine_tag.c_str(), tab_node_id); -} - std::string TagFromSpecifics(const sync_pb::SessionSpecifics& specifics) { if (specifics.has_header()) { return specifics.session_tag(); } else if (specifics.has_tab()) { - return TabNodeIdToTag(specifics.session_tag(), specifics.tab_node_id()); + return TabNodePool::TabIdToTag(specifics.session_tag(), + specifics.tab_node_id()); } else { return std::string(); } } -sync_pb::SessionSpecifics SessionTabToSpecifics( - const sessions::SessionTab& session_tab, - const std::string& local_tag, - int tab_node_id) { - sync_pb::SessionSpecifics specifics; - specifics.mutable_tab()->CopyFrom(session_tab.ToSyncData()); - specifics.set_session_tag(local_tag); - specifics.set_tab_node_id(tab_node_id); - return specifics; -} - -void AppendDeletionsForTabNodes(const std::set<int>& tab_node_ids, - const std::string& machine_tag, - syncer::SyncChangeList* change_output) { - for (std::set<int>::const_iterator it = tab_node_ids.begin(); - it != tab_node_ids.end(); ++it) { - change_output->push_back(syncer::SyncChange( - FROM_HERE, SyncChange::ACTION_DELETE, - SyncData::CreateLocalDelete(TabNodeIdToTag(machine_tag, *it), - syncer::SESSIONS))); - } -} - } // namespace // |local_device| is owned by ProfileSyncService, its lifetime exceeds @@ -148,6 +117,7 @@ std::unique_ptr<syncer::SyncErrorFactory> error_handler) { syncer::SyncMergeResult merge_result(type); DCHECK(session_tracker_.Empty()); + DCHECK_EQ(0U, local_tab_pool_.Capacity()); error_handler_ = std::move(error_handler); sync_processor_ = std::move(sync_processor); @@ -183,12 +153,13 @@ InitializeCurrentMachineTag(local_device_->GetLocalSyncCacheGUID()); } - session_tracker_.SetLocalSessionTag(current_machine_tag()); + session_tracker_.SetLocalSessionTag(current_machine_tag_); syncer::SyncChangeList new_changes; // First, we iterate over sync data to update our session_tracker_. - if (!InitFromSyncModel(initial_sync_data, &new_changes)) { + syncer::SyncDataList restored_tabs; + if (!InitFromSyncModel(initial_sync_data, &restored_tabs, &new_changes)) { // The sync db didn't have a header node for us. Create one. sync_pb::EntitySpecifics specifics; sync_pb::SessionSpecifics* base_specifics = specifics.mutable_session(); @@ -205,12 +176,12 @@ #if defined(OS_ANDROID) std::string sync_machine_tag( BuildMachineTag(local_device_->GetLocalSyncCacheGUID())); - if (current_machine_tag().compare(sync_machine_tag) != 0) + if (current_machine_tag_.compare(sync_machine_tag) != 0) DeleteForeignSessionInternal(sync_machine_tag, &new_changes); #endif // Check if anything has changed on the local client side. - AssociateWindows(RELOAD_TABS, &new_changes); + AssociateWindows(RELOAD_TABS, restored_tabs, &new_changes); local_tab_pool_out_of_sync_ = false; merge_result.set_error( @@ -222,6 +193,7 @@ void SessionsSyncManager::AssociateWindows( ReloadTabsOption option, + const syncer::SyncDataList& restored_tabs, syncer::SyncChangeList* change_output) { const std::string local_tag = current_machine_tag(); sync_pb::SessionSpecifics specifics; @@ -289,24 +261,25 @@ if (!synced_tab) continue; - // Placeholder tabs are those without WebContents, either because they - // were never loaded into memory or they were evicted from memory - // (typically only on Android devices). They only have a tab id, window - // id, and a saved synced id (corresponding to the tab node id). Note - // that only placeholders have this sync id, as it's necessary to - // properly reassociate the tab with the entity that was backing it. if (synced_tab->IsPlaceholderTab()) { // For tabs without WebContents update the |tab_id| and |window_id|, // as it could have changed after a session restore. + // Note: We cannot check if a tab is valid if it has no WebContents. + // We assume any such tab is valid and leave the contents of + // corresponding sync node unchanged. if (synced_tab->GetSyncId() > TabNodePool::kInvalidTabNodeID && tab_id > TabNodePool::kInvalidTabID) { AssociateRestoredPlaceholderTab(*synced_tab, tab_id, window_id, - change_output); + restored_tabs, change_output); + found_tabs = true; + window_s.add_tab(tab_id); } - } else if (RELOAD_TABS == option) { - AssociateTab(synced_tab, change_output); + continue; } + if (RELOAD_TABS == option) + AssociateTab(synced_tab, change_output); + // If the tab is valid, it would have been added to the tracker either // by the above AssociateTab call (at association time), or by the // change processor calling AssociateTab for all modified tabs. @@ -330,10 +303,8 @@ } } } - std::set<int> deleted_tab_node_ids; - session_tracker_.CleanupLocalTabs(&deleted_tab_node_ids); - AppendDeletionsForTabNodes(deleted_tab_node_ids, current_machine_tag(), - change_output); + local_tab_pool_.DeleteUnassociatedTabNodes(change_output); + session_tracker_.CleanupSession(local_tag); // Always update the header. Sync takes care of dropping this update // if the entity specifics are identical (i.e windows, client name did @@ -346,63 +317,73 @@ syncer::SyncChange(FROM_HERE, syncer::SyncChange::ACTION_UPDATE, data)); } -void SessionsSyncManager::AssociateTab(SyncedTabDelegate* const tab_delegate, +void SessionsSyncManager::AssociateTab(SyncedTabDelegate* const tab, syncer::SyncChangeList* change_output) { - DCHECK(!tab_delegate->IsPlaceholderTab()); + DCHECK(!tab->IsPlaceholderTab()); + SessionID::id_type tab_id = tab->GetSessionId(); - if (tab_delegate->IsBeingDestroyed()) { - // Do nothing. By not proactively adding the tab to the session, it will be - // removed if necessary during subsequent cleanup. + if (tab->IsBeingDestroyed()) { + // This tab is closing. + TabLinksMap::iterator tab_iter = local_tab_map_.find(tab_id); + if (tab_iter == local_tab_map_.end()) { + // We aren't tracking this tab (for example, sync setting page). + return; + } + local_tab_pool_.FreeTabNode(tab_iter->second->tab_node_id(), change_output); + local_tab_map_.erase(tab_iter); return; } - if (!tab_delegate->ShouldSync(sessions_client_)) + if (!tab->ShouldSync(sessions_client_)) return; - SessionID::id_type tab_id = tab_delegate->GetSessionId(); - DVLOG(1) << "Syncing tab " << tab_id << " from window " - << tab_delegate->GetWindowId(); + TabLinksMap::iterator local_tab_map_iter = local_tab_map_.find(tab_id); + TabLink* tab_link = nullptr; - int tab_node_id = TabNodePool::kInvalidTabNodeID; - bool existing_tab_node = - session_tracker_.GetTabNodeFromLocalTabId(tab_id, &tab_node_id); - CHECK_NE(TabNodePool::kInvalidTabNodeID, tab_node_id) << "crbug.com/673618"; - tab_delegate->SetSyncId(tab_node_id); - sessions::SessionTab* session_tab = - session_tracker_.GetTab(current_machine_tag(), tab_id); + if (local_tab_map_iter == local_tab_map_.end()) { + int tab_node_id = tab->GetSyncId(); + // If there is an old sync node for the tab, reuse it. If this is a new + // tab, get a sync node for it. + if (!local_tab_pool_.IsUnassociatedTabNode(tab_node_id)) { + tab_node_id = local_tab_pool_.GetFreeTabNode(change_output); + tab->SetSyncId(tab_node_id); + } + local_tab_pool_.AssociateTabNode(tab_node_id, tab_id); + tab_link = new TabLink(tab_node_id, tab); + local_tab_map_[tab_id] = make_linked_ptr<TabLink>(tab_link); + } else { + // This tab is already associated with a sync node, reuse it. + // Note: on some platforms the tab object may have changed, so we ensure + // the tab link is up to date. + tab_link = local_tab_map_iter->second.get(); + local_tab_map_iter->second->set_tab(tab); + } + DCHECK(tab_link); + DCHECK_NE(tab_link->tab_node_id(), TabNodePool::kInvalidTabNodeID); + DVLOG(1) << "Reloading tab " << tab_id << " from window " + << tab->GetWindowId(); - // Get the previously synced url. - int old_index = session_tab->normalized_navigation_index(); - GURL old_url; - if (session_tab->navigations.size() > static_cast<size_t>(old_index)) - old_url = session_tab->navigations[old_index].virtual_url(); + // Write to sync model. + sync_pb::EntitySpecifics specifics; + LocalTabDelegateToSpecifics(*tab, specifics.mutable_session()); + syncer::SyncData data = syncer::SyncData::CreateLocalData( + TabNodePool::TabIdToTag(current_machine_tag_, tab_link->tab_node_id()), + current_session_name_, specifics); + change_output->push_back( + syncer::SyncChange(FROM_HERE, syncer::SyncChange::ACTION_UPDATE, data)); - // Update the tracker's session representation. - SetSessionTabFromDelegate(*tab_delegate, base::Time::Now(), session_tab); - SetVariationIds(session_tab); + int current_index = tab->GetCurrentEntryIndex(); + const GURL new_url = tab->GetVirtualURLAtIndex(current_index); + if (new_url != tab_link->url()) { + tab_link->set_url(new_url); + favicon_cache_.OnFaviconVisited(new_url, + tab->GetFaviconURLAtIndex(current_index)); + page_revisit_broadcaster_.OnPageVisit( + new_url, tab->GetTransitionAtIndex(current_index)); + } + session_tracker_.GetSession(current_machine_tag())->modified_time = base::Time::Now(); - - // Write to the sync model itself. - sync_pb::EntitySpecifics specifics; - specifics.mutable_session()->CopyFrom( - SessionTabToSpecifics(*session_tab, current_machine_tag(), tab_node_id)); - syncer::SyncData data = syncer::SyncData::CreateLocalData( - TabNodeIdToTag(current_machine_tag(), tab_node_id), current_session_name_, - specifics); - change_output->push_back(syncer::SyncChange( - FROM_HERE, existing_tab_node ? syncer::SyncChange::ACTION_UPDATE - : syncer::SyncChange::ACTION_ADD, - data)); - - int current_index = tab_delegate->GetCurrentEntryIndex(); - const GURL new_url = tab_delegate->GetVirtualURLAtIndex(current_index); - if (new_url != old_url) { - favicon_cache_.OnFaviconVisited( - new_url, tab_delegate->GetFaviconURLAtIndex(current_index)); - page_revisit_broadcaster_.OnPageVisit( - new_url, tab_delegate->GetTransitionAtIndex(current_index)); - } } bool SessionsSyncManager::RebuildAssociations() { @@ -462,14 +443,21 @@ // "interesting" by going to a valid URL, in which case it needs to be added // to the window's tab information. Similarly, if a tab became // "uninteresting", we remove it from the window's tab information. - AssociateWindows(DONT_RELOAD_TABS, &changes); + AssociateWindows(DONT_RELOAD_TABS, syncer::SyncDataList(), &changes); sync_processor_->ProcessSyncChanges(FROM_HERE, changes); } void SessionsSyncManager::OnFaviconsChanged(const std::set<GURL>& page_urls, const GURL& /* icon_url */) { - for (const GURL& page_url : page_urls) - favicon_cache_.OnPageFaviconUpdated(page_url); + // TODO(zea): consider a separate container for tabs with outstanding favicon + // loads so we don't have to iterate through all tabs comparing urls. + for (const GURL& page_url : page_urls) { + for (TabLinksMap::iterator tab_iter = local_tab_map_.begin(); + tab_iter != local_tab_map_.end(); ++tab_iter) { + if (tab_iter->second->url() == page_url) + favicon_cache_.OnPageFaviconUpdated(page_url); + } + } } void SessionsSyncManager::StopSyncing(syncer::ModelType type) { @@ -482,6 +470,8 @@ sync_processor_.reset(nullptr); error_handler_.reset(); session_tracker_.Clear(); + local_tab_map_.clear(); + local_tab_pool_.Clear(); current_machine_tag_.clear(); current_session_name_.clear(); local_session_header_node_id_ = TabNodePool::kInvalidTabNodeID; @@ -504,17 +494,22 @@ current_machine_tag(), current_session_name_, header_entity); list.push_back(data); - for (auto& win_iter : session->windows) { - for (auto& tab : win_iter.second->tabs) { - // TODO(zea): replace with with the correct tab node id once there's a - // sync specific wrapper for SessionTab. This method is only used in - // tests though, so it's fine for now. crbug.com/662597 - int tab_node_id = 0; + for (auto win_iter = session->windows.begin(); + win_iter != session->windows.end(); ++win_iter) { + for (auto tabs_iter = win_iter->second->tabs.begin(); + tabs_iter != win_iter->second->tabs.end(); ++tabs_iter) { sync_pb::EntitySpecifics entity; - entity.mutable_session()->CopyFrom( - SessionTabToSpecifics(*tab, current_machine_tag(), tab_node_id)); + sync_pb::SessionSpecifics* specifics = entity.mutable_session(); + specifics->mutable_tab()->MergeFrom((*tabs_iter)->ToSyncData()); + specifics->set_session_tag(current_machine_tag_); + + TabLinksMap::const_iterator tab_map_iter = + local_tab_map_.find((*tabs_iter)->tab_id.id()); + DCHECK(tab_map_iter != local_tab_map_.end()); + specifics->set_tab_node_id(tab_map_iter->second->tab_node_id()); syncer::SyncData data = syncer::SyncData::CreateLocalData( - TabNodeIdToTag(current_machine_tag(), tab_node_id), + TabNodePool::TabIdToTag(current_machine_tag_, + specifics->tab_node_id()), current_session_name_, entity); list.push_back(data); } @@ -523,7 +518,7 @@ } bool SessionsSyncManager::GetLocalSession(const SyncedSession** local_session) { - if (current_machine_tag().empty()) + if (current_machine_tag_.empty()) return false; *local_session = session_tracker_.GetSession(current_machine_tag()); return true; @@ -583,7 +578,7 @@ LOG(WARNING) << "Dropping modification to local session."; return syncer::SyncError(); } - UpdateTrackerWithSpecifics( + UpdateTrackerWithForeignSession( session, syncer::SyncDataRemote(it->sync_data()).GetModifiedTime()); break; default: @@ -605,7 +600,7 @@ return syncer::SyncChange( FROM_HERE, SyncChange::ACTION_DELETE, SyncData::CreateLocalDelete( - TabNodeIdToTag(current_machine_tag(), tab.tab_node_id()), + TabNodePool::TabIdToTag(current_machine_tag(), tab.tab_node_id()), syncer::SESSIONS)); } } @@ -621,6 +616,7 @@ bool SessionsSyncManager::InitFromSyncModel( const syncer::SyncDataList& sync_data, + syncer::SyncDataList* restored_tabs, syncer::SyncChangeList* new_changes) { bool found_current_header = false; int bad_foreign_hash_count = 0; @@ -638,7 +634,7 @@ new_changes->push_back(tombstone); } else if (specifics.session_tag() != current_machine_tag()) { if (TagHashFromSpecifics(specifics) == remote.GetClientTagHash()) { - UpdateTrackerWithSpecifics(specifics, remote.GetModifiedTime()); + UpdateTrackerWithForeignSession(specifics, remote.GetModifiedTime()); } else { // In the past, like years ago, we believe that some session data was // created with bad tag hashes. This causes any change this client makes @@ -657,10 +653,6 @@ found_current_header = true; if (specifics.header().has_client_name()) current_session_name_ = specifics.header().client_name(); - - // TODO(zea): crbug.com/639009 update the tracker with the specifics - // from the header node as well. This will be necessary to preserve - // the set of open tabs when a custom tab is opened. } else { if (specifics.has_header() || !specifics.has_tab()) { LOG(WARNING) << "Found more than one session header node with local " @@ -669,13 +661,10 @@ if (tombstone.IsValid()) new_changes->push_back(tombstone); } else { - // This is a valid old tab node, add it to the tracker and associate - // it. - DVLOG(1) << "Associating local tab " << specifics.tab().tab_id() - << " with node " << specifics.tab_node_id(); - session_tracker_.ReassociateLocalTab(specifics.tab_node_id(), - specifics.tab().tab_id()); - UpdateTrackerWithSpecifics(specifics, remote.GetModifiedTime()); + // This is a valid old tab node, add it to the pool so it can be + // reused for reassociation. + local_tab_pool_.AddTabNode(specifics.tab_node_id()); + restored_tabs->push_back(*it); } } } @@ -687,7 +676,7 @@ session_tracker_.LookupAllForeignSessions(&sessions, SyncedSessionTracker::RAW); for (const auto* session : sessions) { - session_tracker_.CleanupForeignSession(session->session_tag); + session_tracker_.CleanupSession(session->session_tag); } UMA_HISTOGRAM_COUNTS_100("Sync.SessionsBadForeignHashOnMergeCount", @@ -696,84 +685,70 @@ return found_current_header; } -void SessionsSyncManager::UpdateTrackerWithSpecifics( +void SessionsSyncManager::UpdateTrackerWithForeignSession( const sync_pb::SessionSpecifics& specifics, const base::Time& modification_time) { - std::string session_tag = specifics.session_tag(); - SyncedSession* session = session_tracker_.GetSession(session_tag); + std::string foreign_session_tag = specifics.session_tag(); + DCHECK_NE(foreign_session_tag, current_machine_tag()); + + SyncedSession* foreign_session = + session_tracker_.GetSession(foreign_session_tag); if (specifics.has_header()) { - // Read in the header data for this session. Header data is + // Read in the header data for this foreign session. Header data is // essentially a collection of windows, each of which has an ordered id list // for their tabs. if (!IsValidSessionHeader(specifics.header())) { - LOG(WARNING) << "Ignoring session node with invalid header " - << "and tag " << session_tag << "."; + LOG(WARNING) << "Ignoring foreign session node with invalid header " + << "and tag " << foreign_session_tag << "."; return; } // Load (or create) the SyncedSession object for this client. const sync_pb::SessionHeader& header = specifics.header(); - PopulateSessionHeaderFromSpecifics(header, modification_time, session); + PopulateSessionHeaderFromSpecifics(header, modification_time, + foreign_session); // Reset the tab/window tracking for this session (must do this before // we start calling PutWindowInSession and PutTabInWindow so that all // unused tabs/windows get cleared by the CleanupSession(...) call). - session_tracker_.ResetSessionTracking(session_tag); + session_tracker_.ResetSessionTracking(foreign_session_tag); // Process all the windows and their tab information. int num_windows = header.window_size(); - DVLOG(1) << "Populating " << session_tag << " with " << num_windows + DVLOG(1) << "Associating " << foreign_session_tag << " with " << num_windows << " windows."; for (int i = 0; i < num_windows; ++i) { const sync_pb::SessionWindow& window_s = header.window(i); SessionID::id_type window_id = window_s.window_id(); - session_tracker_.PutWindowInSession(session_tag, window_id); - BuildSyncedSessionFromSpecifics(session_tag, window_s, modification_time, - session->windows[window_id].get()); + session_tracker_.PutWindowInSession(foreign_session_tag, window_id); + BuildSyncedSessionFromSpecifics( + foreign_session_tag, window_s, modification_time, + foreign_session->windows[window_id].get()); } // Delete any closed windows and unused tabs as necessary. - session_tracker_.CleanupForeignSession(session_tag); + session_tracker_.CleanupSession(foreign_session_tag); } else if (specifics.has_tab()) { const sync_pb::SessionTab& tab_s = specifics.tab(); SessionID::id_type tab_id = tab_s.tab_id(); - DVLOG(1) << "Populating " << session_tag << "'s tab id " << tab_id - << " from node " << specifics.tab_node_id(); - // Ensure the tracker is aware of the tab node id. Deleting foreign sessions - // requires deleting all relevant tab nodes, and it's easier to track the - // tab node ids themselves separately from the tab ids. - // - // Note that TabIDs are not stable across restarts of a client. Consider - // this example with two tabs: - // - // http://a.com TabID1 --> NodeIDA - // http://b.com TabID2 --> NodeIDB - // - // After restart, tab ids are reallocated. e.g, one possibility: - // http://a.com TabID2 --> NodeIDA - // http://b.com TabID1 --> NodeIDB - // - // If that happened on a remote client, here we will see an update to - // TabID1 with tab_node_id changing from NodeIDA to NodeIDB, and TabID2 - // with tab_node_id changing from NodeIDB to NodeIDA. - // - // We can also wind up here if we created this tab as an out-of-order - // update to the header node for this session before actually associating - // the tab itself, so the tab node id wasn't available at the time and - // is currently kInvalidTabNodeID. - // - // In both cases, we can safely throw it into the set of node ids. - session_tracker_.OnTabNodeSeen(session_tag, specifics.tab_node_id()); - sessions::SessionTab* tab = session_tracker_.GetTab(session_tag, tab_id); - if (!tab->timestamp.is_null() && tab->timestamp > modification_time) { - DVLOG(1) << "Ignoring " << session_tag << "'s session tab " << tab_id - << " with earlier modification time: " << tab->timestamp - << " vs " << modification_time; + const sessions::SessionTab* existing_tab; + if (session_tracker_.LookupSessionTab(foreign_session_tag, tab_id, + &existing_tab) && + existing_tab->timestamp > modification_time) { + // Force the tracker to remember this tab node id, even if it isn't + // currently being used. + session_tracker_.GetTab(foreign_session_tag, tab_id, + specifics.tab_node_id()); + DVLOG(1) << "Ignoring " << foreign_session_tag << "'s session tab " + << tab_id << " with earlier modification time"; return; } + sessions::SessionTab* tab = session_tracker_.GetTab( + foreign_session_tag, tab_id, specifics.tab_node_id()); + // Update SessionTab based on protobuf. tab->SetFromSyncData(tab_s, modification_time); @@ -782,11 +757,11 @@ RefreshFaviconVisitTimesFromForeignTab(tab_s, modification_time); // Update the last modified time. - if (session->modified_time < modification_time) - session->modified_time = modification_time; + if (foreign_session->modified_time < modification_time) + foreign_session->modified_time = modification_time; } else { - LOG(WARNING) << "Ignoring session node with missing header/tab " - << "fields and tag " << session_tag << "."; + LOG(WARNING) << "Ignoring foreign session node with missing header/tab " + << "fields and tag " << foreign_session_tag << "."; } } @@ -804,6 +779,8 @@ DVLOG(1) << "Creating session sync guid: " << current_machine_tag_; sync_prefs_->SetSyncSessionsGUID(current_machine_tag_); } + + local_tab_pool_.SetMachineTag(current_machine_tag_); } // static @@ -867,11 +844,11 @@ } } session_window->timestamp = mtime; - session_window->tabs.clear(); + session_window->tabs.resize(specifics.tab_size()); for (int i = 0; i < specifics.tab_size(); i++) { SessionID::id_type tab_id = specifics.tab(i); session_tracker_.PutTabInWindow(session_tag, session_window->window_id.id(), - tab_id); + tab_id, i); } } @@ -913,14 +890,20 @@ } std::set<int> tab_node_ids_to_delete; - session_tracker_.LookupForeignTabNodeIds(tag, &tab_node_ids_to_delete); + session_tracker_.LookupTabNodeIds(tag, &tab_node_ids_to_delete); if (DisassociateForeignSession(tag)) { // Only tell sync to delete the header if there was one. change_output->push_back( syncer::SyncChange(FROM_HERE, SyncChange::ACTION_DELETE, SyncData::CreateLocalDelete(tag, syncer::SESSIONS))); } - AppendDeletionsForTabNodes(tab_node_ids_to_delete, tag, change_output); + for (std::set<int>::const_iterator it = tab_node_ids_to_delete.begin(); + it != tab_node_ids_to_delete.end(); ++it) { + change_output->push_back(syncer::SyncChange( + FROM_HERE, SyncChange::ACTION_DELETE, + SyncData::CreateLocalDelete(TabNodePool::TabIdToTag(tag, *it), + syncer::SESSIONS))); + } if (!sessions_updated_callback_.is_null()) sessions_updated_callback_.Run(); } @@ -929,7 +912,7 @@ const std::string& foreign_session_tag) { DCHECK_NE(foreign_session_tag, current_machine_tag()); DVLOG(1) << "Disassociating session " << foreign_session_tag; - return session_tracker_.DeleteForeignSession(foreign_session_tag); + return session_tracker_.DeleteSession(foreign_session_tag); } bool SessionsSyncManager::GetForeignSession( @@ -975,41 +958,66 @@ return success; } +void SessionsSyncManager::LocalTabDelegateToSpecifics( + const SyncedTabDelegate& tab_delegate, + sync_pb::SessionSpecifics* specifics) { + sessions::SessionTab* session_tab = nullptr; + session_tab = session_tracker_.GetTab(current_machine_tag(), + tab_delegate.GetSessionId(), + tab_delegate.GetSyncId()); + SetSessionTabFromDelegate(tab_delegate, base::Time::Now(), session_tab); + SetVariationIds(session_tab); + sync_pb::SessionTab tab_s = session_tab->ToSyncData(); + specifics->set_session_tag(current_machine_tag_); + specifics->set_tab_node_id(tab_delegate.GetSyncId()); + specifics->mutable_tab()->CopyFrom(tab_s); +} + void SessionsSyncManager::AssociateRestoredPlaceholderTab( const SyncedTabDelegate& tab_delegate, SessionID::id_type new_tab_id, SessionID::id_type new_window_id, + const syncer::SyncDataList& restored_tabs, syncer::SyncChangeList* change_output) { DCHECK_NE(tab_delegate.GetSyncId(), TabNodePool::kInvalidTabNodeID); - - // It's possible the placeholder tab is associated with a tab node that's - // since been deleted. If that's the case, there's no way to reassociate it, - // so just return now without adding the tab to the session tracker. - if (!session_tracker_.IsLocalTabNodeAssociated(tab_delegate.GetSyncId())) { - DVLOG(1) << "Restored placeholder tab's node " << tab_delegate.GetSyncId() - << " deleted."; + // Rewrite the tab using |restored_tabs| to retrieve the specifics. + if (restored_tabs.empty()) { + DLOG(WARNING) << "Can't Update tab ID."; return; } - // Update tracker with the new association (and inform it of the tab node - // in the process). - session_tracker_.ReassociateLocalTab(tab_delegate.GetSyncId(), new_tab_id); + for (syncer::SyncDataList::const_iterator it = restored_tabs.begin(); + it != restored_tabs.end(); ++it) { + if (it->GetSpecifics().session().tab_node_id() != + tab_delegate.GetSyncId()) { + continue; + } - // Update the window id on the SessionTab itself. - sessions::SessionTab* local_tab = - session_tracker_.GetTab(current_machine_tag(), new_tab_id); - local_tab->window_id.set_id(new_window_id); + sync_pb::EntitySpecifics entity; + sync_pb::SessionSpecifics* specifics = entity.mutable_session(); + specifics->CopyFrom(it->GetSpecifics().session()); + DCHECK(specifics->has_tab()); - // Rewrite the specifics based on the reassociated SessionTab to preserve - // the new tab and window ids. - sync_pb::EntitySpecifics entity; - entity.mutable_session()->CopyFrom(SessionTabToSpecifics( - *local_tab, current_machine_tag(), tab_delegate.GetSyncId())); - syncer::SyncData data = syncer::SyncData::CreateLocalData( - TabNodeIdToTag(current_machine_tag(), tab_delegate.GetSyncId()), - current_session_name_, entity); - change_output->push_back( - syncer::SyncChange(FROM_HERE, syncer::SyncChange::ACTION_UPDATE, data)); + // Update tab node pool with the new association. + local_tab_pool_.ReassociateTabNode(tab_delegate.GetSyncId(), new_tab_id); + TabLink* tab_link = new TabLink(tab_delegate.GetSyncId(), &tab_delegate); + local_tab_map_[new_tab_id] = make_linked_ptr<TabLink>(tab_link); + + if (specifics->tab().tab_id() == new_tab_id && + specifics->tab().window_id() == new_window_id) + return; + + // Either the tab_id or window_id changed (e.g due to session restore), so + // update the sync node. + specifics->mutable_tab()->set_tab_id(new_tab_id); + specifics->mutable_tab()->set_window_id(new_window_id); + syncer::SyncData data = syncer::SyncData::CreateLocalData( + TabNodePool::TabIdToTag(current_machine_tag_, specifics->tab_node_id()), + current_session_name_, entity); + change_output->push_back( + syncer::SyncChange(FROM_HERE, syncer::SyncChange::ACTION_UPDATE, data)); + return; + } } // static
diff --git a/components/sync_sessions/sessions_sync_manager.h b/components/sync_sessions/sessions_sync_manager.h index d685c65..66ec40e 100644 --- a/components/sync_sessions/sessions_sync_manager.h +++ b/components/sync_sessions/sessions_sync_manager.h
@@ -30,6 +30,7 @@ #include "components/sync_sessions/revisit/page_revisit_broadcaster.h" #include "components/sync_sessions/synced_session.h" #include "components/sync_sessions/synced_session_tracker.h" +#include "components/sync_sessions/tab_node_pool.h" namespace syncer { class LocalDeviceInfoProvider; @@ -117,6 +118,37 @@ void DoGarbageCollection(); private: + // Keep all the links to local tab data in one place. A tab_node_id and tab + // must be passed at creation. The tab_node_id is not mutable, although + // all other fields are. + class TabLink { + public: + TabLink(int tab_node_id, const SyncedTabDelegate* tab) + : tab_node_id_(tab_node_id), tab_(tab) {} + + void set_tab(const SyncedTabDelegate* tab) { tab_ = tab; } + void set_url(const GURL& url) { url_ = url; } + + int tab_node_id() const { return tab_node_id_; } + const SyncedTabDelegate* tab() const { return tab_; } + const GURL& url() const { return url_; } + + private: + // The id for the sync node this tab is stored in. + const int tab_node_id_; + + // The tab object itself. + const SyncedTabDelegate* tab_; + + // The currently visible url of the tab (used for syncing favicons). + GURL url_; + + DISALLOW_COPY_AND_ASSIGN(TabLink); + }; + + // Container for accessing local tab data by tab id. + typedef std::map<SessionID::id_type, linked_ptr<TabLink>> TabLinksMap; + friend class extensions::ExtensionSessionsTest; friend class SessionsSyncManagerTest; FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, PopulateSessionHeader); @@ -150,16 +182,20 @@ void InitializeCurrentMachineTag(const std::string& cache_guid); - // Load and add window or tab data from synced specifics to our internal + // Load and add window or tab data for a foreign session to our internal // tracking. - void UpdateTrackerWithSpecifics(const sync_pb::SessionSpecifics& specifics, - const base::Time& modification_time); + void UpdateTrackerWithForeignSession( + const sync_pb::SessionSpecifics& specifics, + const base::Time& modification_time); // Returns true if |sync_data| contained a header node for the current - // machine, false otherwise. |new_changes| is a link to the SyncChange - // pipeline that exists in the caller's context. This function will append - // necessary changes for processing later. + // machine, false otherwise. |restored_tabs| is a filtered tab-only + // subset of |sync_data| returned by this function for convenience. + // |new_changes| is a link to the SyncChange pipeline that exists in the + // caller's context. This function will append necessary changes for + // processing later. bool InitFromSyncModel(const syncer::SyncDataList& sync_data, + syncer::SyncDataList* restored_tabs, syncer::SyncChangeList* new_changes); // Helper to construct a deletion SyncChange for a *tab node*. @@ -208,6 +244,11 @@ // RELOAD_TABS will additionally cause a resync of all tabs (same as calling // AssociateTabs with a vector of all tabs). // + // |restored_tabs| is a filtered tab-only subset of initial sync data, if + // available (during MergeDataAndStartSyncing). It can be used to obtain + // baseline SessionSpecifics for tabs we can't fully associate any other + // way because they don't yet have a WebContents. + // // Returns: false if the local session's sync nodes were deleted and // reassociation is necessary, true otherwise. // @@ -216,6 +257,7 @@ // changes for processing later. enum ReloadTabsOption { RELOAD_TABS, DONT_RELOAD_TABS }; void AssociateWindows(ReloadTabsOption option, + const syncer::SyncDataList& restored_tabs, syncer::SyncChangeList* change_output); // Loads and reassociates the local tabs referenced in |tabs|. @@ -244,10 +286,17 @@ // as they may have changed after a session was restored. This method // compares new_tab_id and new_window_id against the previously persisted tab // ID and window ID (from our TabNodePool) and updates them if either differs. + // |restored_tabs| is a filtered tab-only subset of initial sync data, if + // available (during MergeDataAndStartSyncing). It can be used to obtain + // baseline SessionSpecifics for tabs we can't fully associate any other + // way because they don't yet have a WebContents. + // TODO(tim): Bug 98892. We should be able to test this for this on android + // even though we didn't have tests for old API-based sessions sync. void AssociateRestoredPlaceholderTab( const SyncedTabDelegate& tab_delegate, SessionID::id_type new_tab_id, SessionID::id_type new_window_id, + const syncer::SyncDataList& restored_tabs, syncer::SyncChangeList* change_output); // Stops and re-starts syncing to rebuild association mappings. Returns true @@ -274,9 +323,15 @@ // The client of this sync sessions datatype. SyncSessionsClient* const sessions_client_; + // Mapping of current open (local) tabs to their sync identifiers. + TabLinksMap local_tab_map_; + SyncedSessionTracker session_tracker_; FaviconCache favicon_cache_; + // Pool of used/available sync nodes associated with local tabs. + TabNodePool local_tab_pool_; + // Tracks whether our local representation of which sync nodes map to what // tabs (belonging to the current local session) is inconsistent. This can // happen if a foreign client deems our session as "stale" and decides to
diff --git a/components/sync_sessions/synced_session_tracker.cc b/components/sync_sessions/synced_session_tracker.cc index 1470c7f..a74b877c 100644 --- a/components/sync_sessions/synced_session_tracker.cc +++ b/components/sync_sessions/synced_session_tracker.cc
@@ -53,8 +53,6 @@ void SyncedSessionTracker::SetLocalSessionTag( const std::string& local_session_tag) { - DCHECK(local_session_tag_.empty()); - DCHECK(!local_session_tag.empty()); local_session_tag_ = local_session_tag; } @@ -92,9 +90,6 @@ const std::string& tag, SessionID::id_type tab_id, const sessions::SessionTab** tab) const { - if (tab_id == TabNodePool::kInvalidTabID) - return false; - DCHECK(tab); auto tab_map_iter = synced_tab_map_.find(tag); if (tab_map_iter == synced_tab_map_.end()) { @@ -112,9 +107,8 @@ return true; } -void SyncedSessionTracker::LookupForeignTabNodeIds( - const std::string& session_tag, - std::set<int>* tab_node_ids) const { +void SyncedSessionTracker::LookupTabNodeIds(const std::string& session_tag, + std::set<int>* tab_node_ids) { tab_node_ids->clear(); auto session_iter = synced_session_map_.find(session_tag); if (session_iter != synced_session_map_.end()) { @@ -150,9 +144,7 @@ return synced_session_map_[session_tag].get(); } -bool SyncedSessionTracker::DeleteForeignSession( - const std::string& session_tag) { - DCHECK_NE(local_session_tag_, session_tag); +bool SyncedSessionTracker::DeleteSession(const std::string& session_tag) { unmapped_windows_.erase(session_tag); unmapped_tabs_.erase(session_tag); @@ -196,14 +188,13 @@ void SyncedSessionTracker::DeleteForeignTab(const std::string& session_tag, int tab_node_id) { - DCHECK_NE(local_session_tag_, session_tag); auto session_iter = synced_session_map_.find(session_tag); if (session_iter != synced_session_map_.end()) { session_iter->second->tab_node_ids.erase(tab_node_id); } } -void SyncedSessionTracker::CleanupSessionImpl(const std::string& session_tag) { +void SyncedSessionTracker::CleanupSession(const std::string& session_tag) { for (const auto& window_pair : unmapped_windows_[session_tag]) synced_window_map_[session_tag].erase(window_pair.first); unmapped_windows_[session_tag].clear(); @@ -242,19 +233,20 @@ void SyncedSessionTracker::PutTabInWindow(const std::string& session_tag, SessionID::id_type window_id, - SessionID::id_type tab_id) { + SessionID::id_type tab_id, + size_t tab_index) { // We're called here for two reasons. 1) We've received an update to the - // SessionWindow information of a SessionHeader node for a session, + // SessionWindow information of a SessionHeader node for a foreign session, // and 2) The SessionHeader node for our local session changed. In both cases // we need to update our tracking state to reflect the change. // // Because the SessionHeader nodes are separate from the individual tab nodes // and we don't store tab_node_ids in the header / SessionWindow specifics, - // the tab_node_ids are not always available when processing headers. We know - // that we will eventually process (via GetTab) every single tab node in the - // system, so we permit ourselves to just call GetTab and ignore the result, - // creating a placeholder SessionTab in the process. - GetTab(session_tag, tab_id); + // the tab_node_ids are not always available when processing headers. + // We know that we will eventually process (via GetTab) every single tab node + // in the system, so we permit ourselves to use kInvalidTabNodeID here and + // rely on the later update to build the mapping (or a restart). + GetTabImpl(session_tag, tab_id, TabNodePool::kInvalidTabNodeID); // The tab should be unmapped. std::unique_ptr<sessions::SessionTab> tab; @@ -263,30 +255,60 @@ tab = std::move(it->second); unmapped_tabs_[session_tag].erase(it); } - CHECK(tab) << "crbug.com/673618 Attempting to map tab " << tab_id - << " multiple times!"; + DCHECK(tab); tab->window_id.set_id(window_id); DVLOG(1) << " - tab " << tab_id << " added to window " << window_id; DCHECK(GetSession(session_tag)->windows.find(window_id) != GetSession(session_tag)->windows.end()); auto& window_tabs = GetSession(session_tag)->windows[window_id]->tabs; - window_tabs.push_back(std::move(tab)); -} - -void SyncedSessionTracker::OnTabNodeSeen(const std::string& session_tag, - int tab_node_id) { - GetSession(session_tag)->tab_node_ids.insert(tab_node_id); + if (window_tabs.size() <= tab_index) { + window_tabs.resize(tab_index + 1); + } + DCHECK(!window_tabs[tab_index]); + window_tabs[tab_index] = std::move(tab); } sessions::SessionTab* SyncedSessionTracker::GetTab( const std::string& session_tag, - SessionID::id_type tab_id) { - CHECK_NE(TabNodePool::kInvalidTabNodeID, tab_id) << "crbug.com/673618"; + SessionID::id_type tab_id, + int tab_node_id) { + DCHECK_NE(TabNodePool::kInvalidTabNodeID, tab_node_id); + return GetTabImpl(session_tag, tab_id, tab_node_id); +} + +sessions::SessionTab* SyncedSessionTracker::GetTabImpl( + const std::string& session_tag, + SessionID::id_type tab_id, + int tab_node_id) { sessions::SessionTab* tab_ptr = nullptr; auto iter = synced_tab_map_[session_tag].find(tab_id); if (iter != synced_tab_map_[session_tag].end()) { tab_ptr = iter->second; + if (tab_node_id != TabNodePool::kInvalidTabNodeID && + tab_id != TabNodePool::kInvalidTabID) { + // TabIDs are not stable across restarts of a client. Consider this + // example with two tabs: + // + // http://a.com TabID1 --> NodeIDA + // http://b.com TabID2 --> NodeIDB + // + // After restart, tab ids are reallocated. e.g, one possibility: + // http://a.com TabID2 --> NodeIDA + // http://b.com TabID1 --> NodeIDB + // + // If that happend on a remote client, here we will see an update to + // TabID1 with tab_node_id changing from NodeIDA to NodeIDB, and TabID2 + // with tab_node_id changing from NodeIDB to NodeIDA. + // + // We can also wind up here if we created this tab as an out-of-order + // update to the header node for this session before actually associating + // the tab itself, so the tab node id wasn't available at the time and + // is currently kInvalidTabNodeID. + // + // In both cases, we can safely throw it into the set of node ids. + GetSession(session_tag)->tab_node_ids.insert(tab_node_id); + } if (VLOG_IS_ON(1)) { std::string title; @@ -306,6 +328,7 @@ tab->tab_id.set_id(tab_id); synced_tab_map_[session_tag][tab_id] = tab_ptr; unmapped_tabs_[session_tag][tab_id] = std::move(tab); + GetSession(session_tag)->tab_node_ids.insert(tab_node_id); DVLOG(1) << "Getting " << (session_tag == local_session_tag_ ? "local session" : session_tag) @@ -316,99 +339,6 @@ return tab_ptr; } -void SyncedSessionTracker::CleanupForeignSession( - const std::string& session_tag) { - DCHECK_NE(local_session_tag_, session_tag); - CleanupSessionImpl(session_tag); -} - -void SyncedSessionTracker::CleanupLocalTabs(std::set<int>* deleted_node_ids) { - DCHECK(!local_session_tag_.empty()); - for (const auto& tab_pair : unmapped_tabs_[local_session_tag_]) - local_tab_pool_.FreeTab(tab_pair.first); - CleanupSessionImpl(local_session_tag_); - local_tab_pool_.CleanupTabNodes(deleted_node_ids); - for (int tab_node_id : *deleted_node_ids) { - GetSession(local_session_tag_)->tab_node_ids.erase(tab_node_id); - } -} - -bool SyncedSessionTracker::GetTabNodeFromLocalTabId(SessionID::id_type tab_id, - int* tab_node_id) { - DCHECK(!local_session_tag_.empty()); - // Ensure a placeholder SessionTab is in place, if not already. - // Although we don't need a SessionTab to fulfill this request, this forces - // the - // creation of one if it doesn't already exist. This helps to make sure we're - // tracking this |tab_id| if |local_tab_pool_| is, and everyone's data - // structures - // are kept in sync and as consistent as possible. - GetTab(local_session_tag_, tab_id); // Ignore result. - - bool reused_existing_tab = - local_tab_pool_.GetTabNodeForTab(tab_id, tab_node_id); - DCHECK_NE(TabNodePool::kInvalidTabNodeID, *tab_node_id); - GetSession(local_session_tag_)->tab_node_ids.insert(*tab_node_id); - return reused_existing_tab; -} - -bool SyncedSessionTracker::IsLocalTabNodeAssociated(int tab_node_id) { - if (tab_node_id == TabNodePool::kInvalidTabNodeID) - return false; - return local_tab_pool_.GetTabIdFromTabNodeId(tab_node_id) != - TabNodePool::kInvalidTabID; -} - -void SyncedSessionTracker::ReassociateLocalTab(int tab_node_id, - SessionID::id_type new_tab_id) { - DCHECK(!local_session_tag_.empty()); - DCHECK_NE(TabNodePool::kInvalidTabNodeID, tab_node_id); - DCHECK_NE(TabNodePool::kInvalidTabID, new_tab_id); - - SessionID::id_type old_tab_id = - local_tab_pool_.GetTabIdFromTabNodeId(tab_node_id); - local_tab_pool_.ReassociateTabNode(tab_node_id, new_tab_id); - - sessions::SessionTab* tab_ptr = nullptr; - - auto old_tab_iter = synced_tab_map_[local_session_tag_].find(old_tab_id); - if (old_tab_id != TabNodePool::kInvalidTabID && - old_tab_iter != synced_tab_map_[local_session_tag_].end()) { - tab_ptr = old_tab_iter->second; - // Remove the tab from the synced tab map under the old id. - synced_tab_map_[local_session_tag_].erase(old_tab_iter); - } else { - // It's possible a placeholder is already in place for the new tab. If so, - // reuse it, otherwise create a new one (which will default to unmapped). - tab_ptr = GetTab(local_session_tag_, new_tab_id); - } - - // If the old tab is unmapped, update the tab id under which it is indexed. - auto unmapped_tabs_iter = unmapped_tabs_[local_session_tag_].find(old_tab_id); - if (old_tab_id != TabNodePool::kInvalidTabID && - unmapped_tabs_iter != unmapped_tabs_[local_session_tag_].end()) { - std::unique_ptr<sessions::SessionTab> tab = - std::move(unmapped_tabs_iter->second); - DCHECK_EQ(tab_ptr, tab.get()); - unmapped_tabs_[local_session_tag_].erase(unmapped_tabs_iter); - unmapped_tabs_[local_session_tag_][new_tab_id] = std::move(tab); - } - - // Update the tab id. - if (old_tab_id != TabNodePool::kInvalidTabID) { - DVLOG(1) << "Remapped tab " << old_tab_id << " with node " << tab_node_id - << " to tab " << new_tab_id; - } else { - DVLOG(1) << "Mapped new tab node " << tab_node_id << " to tab " - << new_tab_id; - } - tab_ptr->tab_id.set_id(new_tab_id); - - // Add the tab back into the tab map with the new id. - synced_tab_map_[local_session_tag_][new_tab_id] = tab_ptr; - GetSession(local_session_tag_)->tab_node_ids.insert(tab_node_id); -} - void SyncedSessionTracker::Clear() { // Cleanup unmapped tabs and windows. unmapped_windows_.clear(); @@ -422,7 +352,6 @@ synced_window_map_.clear(); synced_tab_map_.clear(); - local_tab_pool_.Clear(); local_session_tag_.clear(); }
diff --git a/components/sync_sessions/synced_session_tracker.h b/components/sync_sessions/synced_session_tracker.h index 05fbac7..35123d7 100644 --- a/components/sync_sessions/synced_session_tracker.h +++ b/components/sync_sessions/synced_session_tracker.h
@@ -40,7 +40,8 @@ explicit SyncedSessionTracker(SyncSessionsClient* sessions_client); ~SyncedSessionTracker(); - // **** Synced session/tab query methods. **** + // We track and distinguish the local session from foreign sessions. + void SetLocalSessionTag(const std::string& local_session_tag); // Fill a preallocated vector with all foreign sessions we're tracking (skips // the local session object). SyncedSession ownership remains within the @@ -50,11 +51,6 @@ bool LookupAllForeignSessions(std::vector<const SyncedSession*>* sessions, SessionLookup lookup) const; - // Fills |tab_node_ids| with the tab node ids (see GetTab) for all the tabs* - // associated with the session having tag |session_tag|. - void LookupForeignTabNodeIds(const std::string& session_tag, - std::set<int>* tab_node_ids) const; - // Attempts to look up the session windows associatd with the session given // by |session_tag|. Ownership of SessionWindows stays within the // SyncedSessionTracker. @@ -80,13 +76,15 @@ // this won't create-if-not-present. bool LookupLocalSession(const SyncedSession** output) const; - // **** Methods for manipulating synced sessions and tabs. **** - // Returns a pointer to the SyncedSession object associated with // |session_tag|. If none exists, creates one. Ownership of the // SyncedSession remains within the SyncedSessionTracker. SyncedSession* GetSession(const std::string& session_tag); + // Deletes the session associated with |session_tag| if it exists. + // Returns true if the session existed and was deleted, false otherwise. + bool DeleteSession(const std::string& session_tag); + // Resets the tracking information for the session specified by |session_tag|. // This involves clearing all the windows and tabs from the session, while // keeping pointers saved in the synced_window_map_ and synced_tab_map_. Once @@ -96,6 +94,19 @@ // tabs not owned. void ResetSessionTracking(const std::string& session_tag); + // Tracks the deletion of a foreign tab by removing the given |tab_node_id| + // from the parent session. Doesn't actually remove any tab objects because + // the header may have or may not have already been updated to no longer + // parent this tab. Regardless, when the header is updated then cleanup will + // remove the actual tab data. However, this method always needs to be called + // upon foreign tab deletion, otherwise LookupTabNodeIds(...) may return + // already deleted tab node ids. + void DeleteForeignTab(const std::string& session_tag, int tab_node_id); + + // Deletes those windows and tabs associated with |session_tag| that are no + // longer owned. See ResetSessionTracking(...). + void CleanupSession(const std::string& session_tag); + // Adds the window with id |window_id| to the session specified by // |session_tag|. If none existed for that session, creates one. Similarly, if // the session did not exist yet, creates it. Ownership of the SessionWindow @@ -111,71 +122,21 @@ // ensure we having mapping information for this session. void PutTabInWindow(const std::string& session_tag, SessionID::id_type window_id, - SessionID::id_type tab_id); + SessionID::id_type tab_id, + size_t tab_index); - // Adds |tab_node_id| to the session specified by |session_tag|, creating that - // session if necessary. This is necessary to ensure that each session has an - // up to date list of tab nodes linked to it for session deletion purposes. - // Note that this won't update the local tab pool, even if the local session - // tag is passed. The tab pool is only updated with new tab nodes when they're - // associated with a tab id (see ReassociateLocalTabNode or - // GetTabNodeFromLocalTabId). - void OnTabNodeSeen(const std::string& session_tag, int tab_node_id); - - // Returns a pointer to the SessionTab object associated with - // |tab_id| for the session specified with |session_tag|. - // Note: Ownership of the SessionTab remains within the SyncedSessionTracker. - // TODO(zea): Replace SessionTab with a Sync specific wrapper. - // crbug.com/662597 + // Returns a pointer to the SessionTab object associated with |tab_id| for + // the session specified with |session_tag|. If none exists, creates one. + // Ownership of the SessionTab remains within the SyncedSessionTracker. + // |tab_node_id| must be a valid node id for the node backing this tab. sessions::SessionTab* GetTab(const std::string& session_tag, - SessionID::id_type tab_id); + SessionID::id_type tab_id, + int tab_node_id); - // **** Methods specific to foreign sessions. **** - - // Tracks the deletion of a foreign tab by removing the given |tab_node_id| - // from the parent session. Doesn't actually remove any tab objects because - // the header may have or may not have already been updated to no longer - // parent this tab. Regardless, when the header is updated then cleanup will - // remove the actual tab data. However, this method always needs to be called - // upon foreign tab deletion, otherwise LookupTabNodeIds(...) may return - // already deleted tab node ids. - void DeleteForeignTab(const std::string& session_tag, int tab_node_id); - - // Deletes the session associated with |session_tag| if it exists. - // Returns true if the session existed and was deleted, false otherwise. - bool DeleteForeignSession(const std::string& session_tag); - - // Deletes those windows and tabs associated with |session_tag| that are no - // longer owned. See ResetSessionTracking(...).. - void CleanupForeignSession(const std::string& session_tag); - - // **** Methods specific to the local session. **** - - // Set the local session tag. Must be called before any other local session - // methods are invoked. - void SetLocalSessionTag(const std::string& local_session_tag); - - // Similar to CleanupForeignSession, but also marks any unmapped tabs as free - // in the tab node pool and fills |deleted_node_ids| with the set of locally - // free tab nodes to be deleted. - void CleanupLocalTabs(std::set<int>* deleted_node_ids); - - // Fills |tab_node_id| with a tab node for |tab_id|. Returns true if an - // existing tab node was found, false if there was none and one had to be - // created. - bool GetTabNodeFromLocalTabId(SessionID::id_type tab_id, int* tab_node_id); - - // Returns whether |tab_node_id| refers to a valid tab node that is associated - // with a tab. - bool IsLocalTabNodeAssociated(int tab_node_id); - - // Reassociates the tab denoted by |tab_node_id| with a new tab id, preserving - // any previous SessionTab object the node was associated with. This is useful - // on restart when sync needs to reassociate tabs from a previous session with - // newly restored tabs (and can be used in conjunction with PutTabInWindow). - void ReassociateLocalTab(int tab_node_id, SessionID::id_type new_tab_id); - - // **** Methods for querying/manipulating overall state ****. + // Fills |tab_node_ids| with the tab node ids (see GetTab) for all the tabs* + // associated with the session having tag |session_tag|. + void LookupTabNodeIds(const std::string& session_tag, + std::set<int>* tab_node_ids); // Free the memory for all dynamically allocated objects and clear the // tracking structures. @@ -199,21 +160,20 @@ } private: - friend class SessionsSyncManagerTest; - friend class SyncedSessionTrackerTest; - - // Implementation of CleanupForeignSession/CleanupLocalTabs. - void CleanupSessionImpl(const std::string& session_tag); + // Implementation for GetTab(...) above, permits invalid tab_node_id. + sessions::SessionTab* GetTabImpl(const std::string& session_tag, + SessionID::id_type tab_id, + int tab_node_id); // The client of the sync sessions datatype. SyncSessionsClient* const sessions_client_; - // The mapping of tab/window to their SessionTab/SessionWindow objects. + // The mapping of tab/window ids to their SessionTab/SessionWindow objects. // The SessionTab/SessionWindow objects referred to may be owned either by the // session in the |synced_session_map_| or be temporarily unmapped and live in // the |unmapped_tabs_|/|unmapped_windows_| collections. // - // Map: session tag -> (tab/window -> SessionTab*/SessionWindow*) + // Map: session tag -> (tab/window id -> SessionTab*/SessionWindow*) std::map<std::string, std::map<SessionID::id_type, sessions::SessionTab*>> synced_tab_map_; std::map<std::string, std::map<SessionID::id_type, sessions::SessionWindow*>> @@ -243,9 +203,6 @@ // sessions. std::string local_session_tag_; - // Pool of used/available sync nodes associated with local tabs. - TabNodePool local_tab_pool_; - DISALLOW_COPY_AND_ASSIGN(SyncedSessionTracker); };
diff --git a/components/sync_sessions/synced_session_tracker_unittest.cc b/components/sync_sessions/synced_session_tracker_unittest.cc index a48cf67..68c1f471 100644 --- a/components/sync_sessions/synced_session_tracker_unittest.cc +++ b/components/sync_sessions/synced_session_tracker_unittest.cc
@@ -17,15 +17,6 @@ const char kValidUrl[] = "http://www.example.com"; const char kInvalidUrl[] = "invalid.url"; -const char kTag[] = "tag"; -const char kTag2[] = "tag2"; -const char kTag3[] = "tag3"; -const char kTitle[] = "title"; -const int kWindow1 = 1; -const int kTabNode = 0; -const int kTab1 = 15; -const int kTab2 = 25; -const int kTab3 = 35; } // namespace @@ -35,7 +26,6 @@ ~SyncedSessionTrackerTest() override {} SyncedSessionTracker* GetTracker() { return &tracker_; } - TabNodePool* GetTabNodePool() { return &tracker_.local_tab_pool_; } private: FakeSyncSessionsClient sessions_client_; @@ -43,33 +33,34 @@ }; TEST_F(SyncedSessionTrackerTest, GetSession) { - SyncedSession* session1 = GetTracker()->GetSession(kTag); - SyncedSession* session2 = GetTracker()->GetSession(kTag2); - ASSERT_EQ(session1, GetTracker()->GetSession(kTag)); + SyncedSession* session1 = GetTracker()->GetSession("tag"); + SyncedSession* session2 = GetTracker()->GetSession("tag2"); + ASSERT_EQ(session1, GetTracker()->GetSession("tag")); ASSERT_NE(session1, session2); // Should clean up memory on its own. } TEST_F(SyncedSessionTrackerTest, GetTabUnmapped) { - sessions::SessionTab* tab = GetTracker()->GetTab(kTag, 0); - ASSERT_EQ(tab, GetTracker()->GetTab(kTag, 0)); + sessions::SessionTab* tab = GetTracker()->GetTab("tag", 0, 0); + ASSERT_EQ(tab, GetTracker()->GetTab("tag", 0, 0)); // Should clean up memory on its own. } TEST_F(SyncedSessionTrackerTest, PutWindowInSession) { - GetTracker()->PutWindowInSession(kTag, 0); - SyncedSession* session = GetTracker()->GetSession(kTag); + GetTracker()->PutWindowInSession("tag", 0); + SyncedSession* session = GetTracker()->GetSession("tag"); ASSERT_EQ(1U, session->windows.size()); // Should clean up memory on its own. } TEST_F(SyncedSessionTrackerTest, PutTabInWindow) { - GetTracker()->PutWindowInSession(kTag, 10); - GetTracker()->PutTabInWindow(kTag, 10, 15); // win id 10, tab id 15 - SyncedSession* session = GetTracker()->GetSession(kTag); + GetTracker()->PutWindowInSession("tag", 10); + GetTracker()->PutTabInWindow("tag", 10, 15, + 0); // win id 10, tab id 15, tab ind 0. + SyncedSession* session = GetTracker()->GetSession("tag"); ASSERT_EQ(1U, session->windows.size()); ASSERT_EQ(1U, session->windows[10]->tabs.size()); - ASSERT_EQ(GetTracker()->GetTab(kTag, 15), + ASSERT_EQ(GetTracker()->GetTab("tag", 15, 1), session->windows[10]->tabs[0].get()); // Should clean up memory on its own. } @@ -78,28 +69,28 @@ std::vector<const SyncedSession*> sessions; ASSERT_FALSE(GetTracker()->LookupAllForeignSessions( &sessions, SyncedSessionTracker::PRESENTABLE)); - GetTracker()->GetSession(kTag); - GetTracker()->PutWindowInSession(kTag, 0); - GetTracker()->PutTabInWindow(kTag, 0, 15); - sessions::SessionTab* tab = GetTracker()->GetTab(kTag, 15); + GetTracker()->GetSession("tag1"); + GetTracker()->PutWindowInSession("tag1", 0); + GetTracker()->PutTabInWindow("tag1", 0, 15, 0); + sessions::SessionTab* tab = GetTracker()->GetTab("tag1", 15, 1); ASSERT_TRUE(tab); tab->navigations.push_back( sessions::SerializedNavigationEntryTestHelper::CreateNavigation(kValidUrl, - kTitle)); - GetTracker()->GetSession(kTag2); - GetTracker()->GetSession(kTag3); - GetTracker()->PutWindowInSession(kTag3, 0); - GetTracker()->PutTabInWindow(kTag3, 0, 15); - tab = GetTracker()->GetTab(kTag3, 15); + "title")); + GetTracker()->GetSession("tag2"); + GetTracker()->GetSession("tag3"); + GetTracker()->PutWindowInSession("tag3", 0); + GetTracker()->PutTabInWindow("tag3", 0, 15, 0); + tab = GetTracker()->GetTab("tag3", 15, 1); ASSERT_TRUE(tab); tab->navigations.push_back( sessions::SerializedNavigationEntryTestHelper::CreateNavigation( - kInvalidUrl, kTitle)); + kInvalidUrl, "title")); ASSERT_TRUE(GetTracker()->LookupAllForeignSessions( &sessions, SyncedSessionTracker::PRESENTABLE)); // Only the session with a valid window and tab gets returned. ASSERT_EQ(1U, sessions.size()); - ASSERT_EQ(kTag, sessions[0]->session_tag); + ASSERT_EQ("tag1", sessions[0]->session_tag); ASSERT_TRUE(GetTracker()->LookupAllForeignSessions( &sessions, SyncedSessionTracker::RAW)); @@ -108,15 +99,15 @@ TEST_F(SyncedSessionTrackerTest, LookupSessionWindows) { std::vector<const sessions::SessionWindow*> windows; - ASSERT_FALSE(GetTracker()->LookupSessionWindows(kTag, &windows)); - GetTracker()->GetSession(kTag); - GetTracker()->PutWindowInSession(kTag, 0); - GetTracker()->PutWindowInSession(kTag, 2); - GetTracker()->GetSession(kTag2); - GetTracker()->PutWindowInSession(kTag2, 0); - GetTracker()->PutWindowInSession(kTag2, 2); - ASSERT_TRUE(GetTracker()->LookupSessionWindows(kTag, &windows)); - ASSERT_EQ(2U, windows.size()); // Only windows from kTag session. + ASSERT_FALSE(GetTracker()->LookupSessionWindows("tag1", &windows)); + GetTracker()->GetSession("tag1"); + GetTracker()->PutWindowInSession("tag1", 0); + GetTracker()->PutWindowInSession("tag1", 2); + GetTracker()->GetSession("tag2"); + GetTracker()->PutWindowInSession("tag2", 0); + GetTracker()->PutWindowInSession("tag2", 2); + ASSERT_TRUE(GetTracker()->LookupSessionWindows("tag1", &windows)); + ASSERT_EQ(2U, windows.size()); // Only windows from tag1 session. ASSERT_NE((sessions::SessionWindow*)nullptr, windows[0]); ASSERT_NE((sessions::SessionWindow*)nullptr, windows[1]); ASSERT_NE(windows[1], windows[0]); @@ -124,39 +115,40 @@ TEST_F(SyncedSessionTrackerTest, LookupSessionTab) { const sessions::SessionTab* tab; - ASSERT_FALSE( - GetTracker()->LookupSessionTab(kTag, TabNodePool::kInvalidTabID, &tab)); - ASSERT_FALSE(GetTracker()->LookupSessionTab(kTag, 5, &tab)); - GetTracker()->GetSession(kTag); - GetTracker()->PutWindowInSession(kTag, 0); - GetTracker()->PutTabInWindow(kTag, 0, 5); - ASSERT_TRUE(GetTracker()->LookupSessionTab(kTag, 5, &tab)); + ASSERT_FALSE(GetTracker()->LookupSessionTab("tag1", 5, &tab)); + GetTracker()->GetSession("tag1"); + GetTracker()->PutWindowInSession("tag1", 0); + GetTracker()->PutTabInWindow("tag1", 0, 5, 0); + ASSERT_TRUE(GetTracker()->LookupSessionTab("tag1", 5, &tab)); ASSERT_NE((sessions::SessionTab*)nullptr, tab); } TEST_F(SyncedSessionTrackerTest, Complex) { + const std::string tag1 = "tag"; + const std::string tag2 = "tag2"; + const std::string tag3 = "tag3"; std::vector<sessions::SessionTab *> tabs1, tabs2; sessions::SessionTab* temp_tab; ASSERT_TRUE(GetTracker()->Empty()); ASSERT_EQ(0U, GetTracker()->num_synced_sessions()); - ASSERT_EQ(0U, GetTracker()->num_synced_tabs(kTag)); - tabs1.push_back(GetTracker()->GetTab(kTag, 0)); - tabs1.push_back(GetTracker()->GetTab(kTag, 1)); - tabs1.push_back(GetTracker()->GetTab(kTag, 2)); - ASSERT_EQ(3U, GetTracker()->num_synced_tabs(kTag)); - ASSERT_EQ(0U, GetTracker()->num_synced_sessions()); - temp_tab = GetTracker()->GetTab(kTag, 0); // Already created. - ASSERT_EQ(3U, GetTracker()->num_synced_tabs(kTag)); - ASSERT_EQ(0U, GetTracker()->num_synced_sessions()); + ASSERT_EQ(0U, GetTracker()->num_synced_tabs(tag1)); + tabs1.push_back(GetTracker()->GetTab(tag1, 0, 0)); + tabs1.push_back(GetTracker()->GetTab(tag1, 1, 1)); + tabs1.push_back(GetTracker()->GetTab(tag1, 2, 2)); + ASSERT_EQ(3U, GetTracker()->num_synced_tabs(tag1)); + ASSERT_EQ(1U, GetTracker()->num_synced_sessions()); + temp_tab = GetTracker()->GetTab(tag1, 0, 0); // Already created. + ASSERT_EQ(3U, GetTracker()->num_synced_tabs(tag1)); + ASSERT_EQ(1U, GetTracker()->num_synced_sessions()); ASSERT_EQ(tabs1[0], temp_tab); - tabs2.push_back(GetTracker()->GetTab(kTag2, 0)); - ASSERT_EQ(1U, GetTracker()->num_synced_tabs(kTag2)); - ASSERT_EQ(0U, GetTracker()->num_synced_sessions()); - ASSERT_FALSE(GetTracker()->DeleteForeignSession(kTag3)); + tabs2.push_back(GetTracker()->GetTab(tag2, 0, 0)); + ASSERT_EQ(1U, GetTracker()->num_synced_tabs(tag2)); + ASSERT_EQ(2U, GetTracker()->num_synced_sessions()); + ASSERT_FALSE(GetTracker()->DeleteSession(tag3)); - SyncedSession* session = GetTracker()->GetSession(kTag); - SyncedSession* session2 = GetTracker()->GetSession(kTag2); - SyncedSession* session3 = GetTracker()->GetSession(kTag3); + SyncedSession* session = GetTracker()->GetSession(tag1); + SyncedSession* session2 = GetTracker()->GetSession(tag2); + SyncedSession* session3 = GetTracker()->GetSession(tag3); session3->device_type = SyncedSession::TYPE_OTHER; ASSERT_EQ(3U, GetTracker()->num_synced_sessions()); @@ -165,25 +157,25 @@ ASSERT_TRUE(session3); ASSERT_NE(session, session2); ASSERT_NE(session2, session3); - ASSERT_TRUE(GetTracker()->DeleteForeignSession(kTag3)); + ASSERT_TRUE(GetTracker()->DeleteSession(tag3)); ASSERT_EQ(2U, GetTracker()->num_synced_sessions()); - GetTracker()->PutWindowInSession(kTag, 0); // Create a window. - GetTracker()->PutTabInWindow(kTag, 0, 2); // No longer unmapped. - ASSERT_EQ(3U, GetTracker()->num_synced_tabs(kTag)); // Has not changed. + GetTracker()->PutWindowInSession(tag1, 0); // Create a window. + GetTracker()->PutTabInWindow(tag1, 0, 2, 0); // No longer unmapped. + ASSERT_EQ(3U, GetTracker()->num_synced_tabs(tag1)); // Has not changed. const sessions::SessionTab* tab_ptr; - ASSERT_TRUE(GetTracker()->LookupSessionTab(kTag, 0, &tab_ptr)); + ASSERT_TRUE(GetTracker()->LookupSessionTab(tag1, 0, &tab_ptr)); ASSERT_EQ(tab_ptr, tabs1[0]); - ASSERT_TRUE(GetTracker()->LookupSessionTab(kTag, 2, &tab_ptr)); + ASSERT_TRUE(GetTracker()->LookupSessionTab(tag1, 2, &tab_ptr)); ASSERT_EQ(tab_ptr, tabs1[2]); - ASSERT_FALSE(GetTracker()->LookupSessionTab(kTag, 3, &tab_ptr)); + ASSERT_FALSE(GetTracker()->LookupSessionTab(tag1, 3, &tab_ptr)); ASSERT_FALSE(tab_ptr); std::vector<const sessions::SessionWindow*> windows; - ASSERT_TRUE(GetTracker()->LookupSessionWindows(kTag, &windows)); + ASSERT_TRUE(GetTracker()->LookupSessionWindows(tag1, &windows)); ASSERT_EQ(1U, windows.size()); - ASSERT_TRUE(GetTracker()->LookupSessionWindows(kTag2, &windows)); + ASSERT_TRUE(GetTracker()->LookupSessionWindows(tag2, &windows)); ASSERT_EQ(0U, windows.size()); // The sessions don't have valid tabs, lookup should not succeed. @@ -195,8 +187,8 @@ ASSERT_EQ(2U, sessions.size()); GetTracker()->Clear(); - ASSERT_EQ(0U, GetTracker()->num_synced_tabs(kTag)); - ASSERT_EQ(0U, GetTracker()->num_synced_tabs(kTag2)); + ASSERT_EQ(0U, GetTracker()->num_synced_tabs(tag1)); + ASSERT_EQ(0U, GetTracker()->num_synced_tabs(tag2)); ASSERT_EQ(0U, GetTracker()->num_synced_sessions()); } @@ -211,101 +203,107 @@ // More attempts than tabs means we'll sometimes get the same tabs, // sometimes have to allocate new tabs. int rand_tab_num = base::RandInt(0, kMaxTabs); - sessions::SessionTab* tab = GetTracker()->GetTab(tag, rand_tab_num + 1); + sessions::SessionTab* tab = + GetTracker()->GetTab(tag, rand_tab_num, rand_tab_num + 1); ASSERT_TRUE(tab); } } } -TEST_F(SyncedSessionTrackerTest, LookupForeignTabNodeIds) { +TEST_F(SyncedSessionTrackerTest, LookupTabNodeIds) { std::set<int> result; + std::string tag1 = "session1"; + std::string tag2 = "session2"; + std::string tag3 = "session3"; - GetTracker()->OnTabNodeSeen(kTag, 1); - GetTracker()->OnTabNodeSeen(kTag, 2); - GetTracker()->LookupForeignTabNodeIds(kTag, &result); + GetTracker()->GetTab(tag1, 1, 1); + GetTracker()->GetTab(tag1, 2, 2); + GetTracker()->LookupTabNodeIds(tag1, &result); EXPECT_EQ(2U, result.size()); EXPECT_FALSE(result.end() == result.find(1)); EXPECT_FALSE(result.end() == result.find(2)); - GetTracker()->LookupForeignTabNodeIds(kTag2, &result); + GetTracker()->LookupTabNodeIds(tag2, &result); EXPECT_TRUE(result.empty()); - GetTracker()->PutWindowInSession(kTag, 0); - GetTracker()->PutTabInWindow(kTag, 0, 3); - GetTracker()->LookupForeignTabNodeIds(kTag, &result); + GetTracker()->PutWindowInSession(tag1, 0); + GetTracker()->PutTabInWindow(tag1, 0, 3, 0); + GetTracker()->LookupTabNodeIds(tag1, &result); EXPECT_EQ(2U, result.size()); - GetTracker()->OnTabNodeSeen(kTag, 3); - GetTracker()->LookupForeignTabNodeIds(kTag, &result); + GetTracker()->GetTab(tag1, 3, 3); + GetTracker()->LookupTabNodeIds(tag1, &result); EXPECT_EQ(3U, result.size()); EXPECT_FALSE(result.end() == result.find(3)); - GetTracker()->OnTabNodeSeen(kTag2, 21); - GetTracker()->OnTabNodeSeen(kTag2, 22); - GetTracker()->LookupForeignTabNodeIds(kTag2, &result); + GetTracker()->GetTab(tag2, 1, 21); + GetTracker()->GetTab(tag2, 2, 22); + GetTracker()->LookupTabNodeIds(tag2, &result); EXPECT_EQ(2U, result.size()); EXPECT_FALSE(result.end() == result.find(21)); EXPECT_FALSE(result.end() == result.find(22)); - GetTracker()->LookupForeignTabNodeIds(kTag, &result); + GetTracker()->LookupTabNodeIds(tag1, &result); EXPECT_EQ(3U, result.size()); EXPECT_FALSE(result.end() == result.find(1)); EXPECT_FALSE(result.end() == result.find(2)); - GetTracker()->LookupForeignTabNodeIds(kTag3, &result); + GetTracker()->LookupTabNodeIds(tag3, &result); EXPECT_TRUE(result.empty()); - GetTracker()->PutWindowInSession(kTag3, 1); - GetTracker()->PutTabInWindow(kTag3, 1, 5); - GetTracker()->LookupForeignTabNodeIds(kTag3, &result); + GetTracker()->PutWindowInSession(tag3, 1); + GetTracker()->PutTabInWindow(tag3, 1, 5, 0); + GetTracker()->LookupTabNodeIds(tag3, &result); EXPECT_TRUE(result.empty()); - EXPECT_FALSE(GetTracker()->DeleteForeignSession(kTag3)); - GetTracker()->LookupForeignTabNodeIds(kTag3, &result); + EXPECT_FALSE(GetTracker()->DeleteSession(tag3)); + GetTracker()->LookupTabNodeIds(tag3, &result); EXPECT_TRUE(result.empty()); - EXPECT_FALSE(GetTracker()->DeleteForeignSession(kTag)); - GetTracker()->LookupForeignTabNodeIds(kTag, &result); + EXPECT_FALSE(GetTracker()->DeleteSession(tag1)); + GetTracker()->LookupTabNodeIds(tag1, &result); EXPECT_TRUE(result.empty()); - GetTracker()->LookupForeignTabNodeIds(kTag2, &result); + GetTracker()->LookupTabNodeIds(tag2, &result); EXPECT_EQ(2U, result.size()); EXPECT_FALSE(result.end() == result.find(21)); EXPECT_FALSE(result.end() == result.find(22)); - GetTracker()->OnTabNodeSeen(kTag2, 21); - GetTracker()->OnTabNodeSeen(kTag2, 23); - GetTracker()->LookupForeignTabNodeIds(kTag2, &result); + GetTracker()->GetTab(tag2, 1, 21); + GetTracker()->GetTab(tag2, 2, 23); + GetTracker()->LookupTabNodeIds(tag2, &result); EXPECT_EQ(3U, result.size()); EXPECT_FALSE(result.end() == result.find(21)); EXPECT_FALSE(result.end() == result.find(22)); EXPECT_FALSE(result.end() == result.find(23)); - EXPECT_FALSE(GetTracker()->DeleteForeignSession(kTag2)); - GetTracker()->LookupForeignTabNodeIds(kTag2, &result); + EXPECT_FALSE(GetTracker()->DeleteSession(tag2)); + GetTracker()->LookupTabNodeIds(tag2, &result); EXPECT_TRUE(result.empty()); } TEST_F(SyncedSessionTrackerTest, SessionTracking) { ASSERT_TRUE(GetTracker()->Empty()); + std::string tag1 = "tag1"; + std::string tag2 = "tag2"; // Create some session information that is stale. - SyncedSession* session1 = GetTracker()->GetSession(kTag); - GetTracker()->PutWindowInSession(kTag, 0); - GetTracker()->PutTabInWindow(kTag, 0, 0); - GetTracker()->PutTabInWindow(kTag, 0, 1); - GetTracker()->GetTab(kTag, 2)->window_id.set_id(0); // Will be unmapped. - GetTracker()->GetTab(kTag, 3)->window_id.set_id(0); // Will be unmapped. - GetTracker()->PutWindowInSession(kTag, 1); - GetTracker()->PutTabInWindow(kTag, 1, 4); - GetTracker()->PutTabInWindow(kTag, 1, 5); + SyncedSession* session1 = GetTracker()->GetSession(tag1); + GetTracker()->PutWindowInSession(tag1, 0); + GetTracker()->PutTabInWindow(tag1, 0, 0, 0); + GetTracker()->PutTabInWindow(tag1, 0, 1, 1); + GetTracker()->GetTab(tag1, 2, 3U)->window_id.set_id(0); // Will be unmapped. + GetTracker()->GetTab(tag1, 3, 4U)->window_id.set_id(0); // Will be unmapped. + GetTracker()->PutWindowInSession(tag1, 1); + GetTracker()->PutTabInWindow(tag1, 1, 4, 0); + GetTracker()->PutTabInWindow(tag1, 1, 5, 1); ASSERT_EQ(2U, session1->windows.size()); ASSERT_EQ(2U, session1->windows[0]->tabs.size()); ASSERT_EQ(2U, session1->windows[1]->tabs.size()); - ASSERT_EQ(6U, GetTracker()->num_synced_tabs(kTag)); + ASSERT_EQ(6U, GetTracker()->num_synced_tabs(tag1)); // Create a session that should not be affected. - SyncedSession* session2 = GetTracker()->GetSession(kTag2); - GetTracker()->PutWindowInSession(kTag2, 2); - GetTracker()->PutTabInWindow(kTag2, 2, 1); + SyncedSession* session2 = GetTracker()->GetSession(tag2); + GetTracker()->PutWindowInSession(tag2, 2); + GetTracker()->PutTabInWindow(tag2, 2, 1, 0); ASSERT_EQ(1U, session2->windows.size()); ASSERT_EQ(1U, session2->windows[2]->tabs.size()); - ASSERT_EQ(1U, GetTracker()->num_synced_tabs(kTag2)); + ASSERT_EQ(1U, GetTracker()->num_synced_tabs(tag2)); // Reset tracking and get the current windows/tabs. // We simulate moving a tab from one window to another, then closing the @@ -313,18 +311,18 @@ // on the remaining window. // New tab, arrived before meta node so unmapped. - GetTracker()->GetTab(kTag, 6); - GetTracker()->ResetSessionTracking(kTag); - GetTracker()->PutWindowInSession(kTag, 0); - GetTracker()->PutTabInWindow(kTag, 0, 0); + GetTracker()->GetTab(tag1, 6, 7U); + GetTracker()->ResetSessionTracking(tag1); + GetTracker()->PutWindowInSession(tag1, 0); + GetTracker()->PutTabInWindow(tag1, 0, 0, 0); // Tab 1 is closed. - GetTracker()->PutTabInWindow(kTag, 0, 2); // No longer unmapped. + GetTracker()->PutTabInWindow(tag1, 0, 2, 1); // No longer unmapped. // Tab 3 was unmapped and does not get used. - GetTracker()->PutTabInWindow(kTag, 0, 4); // Moved from window 1. + GetTracker()->PutTabInWindow(tag1, 0, 4, 2); // Moved from window 1. // Window 1 was closed, along with tab 5. - GetTracker()->PutTabInWindow(kTag, 0, 6); // No longer unmapped. + GetTracker()->PutTabInWindow(tag1, 0, 6, 3); // No longer unmapped. // Session 2 should not be affected. - GetTracker()->CleanupForeignSession(kTag); + GetTracker()->CleanupSession(tag1); // Verify that only those parts of the session not owned have been removed. ASSERT_EQ(1U, session1->windows.size()); @@ -332,162 +330,39 @@ ASSERT_EQ(1U, session2->windows.size()); ASSERT_EQ(1U, session2->windows[2]->tabs.size()); ASSERT_EQ(2U, GetTracker()->num_synced_sessions()); - ASSERT_EQ(4U, GetTracker()->num_synced_tabs(kTag)); - ASSERT_EQ(1U, GetTracker()->num_synced_tabs(kTag2)); + ASSERT_EQ(4U, GetTracker()->num_synced_tabs(tag1)); + ASSERT_EQ(1U, GetTracker()->num_synced_tabs(tag2)); // All memory should be properly deallocated by destructor for the // SyncedSessionTracker. } TEST_F(SyncedSessionTrackerTest, DeleteForeignTab) { - int tab_node_id_1 = 1; - int tab_node_id_2 = 2; + std::string session_tag = "session_tag"; + int tab_id_1 = 1; + int tab_id_2 = 2; + int tab_node_id_3 = 3; + int tab_node_id_4 = 4; std::set<int> result; - GetTracker()->OnTabNodeSeen(kTag, tab_node_id_1); - GetTracker()->OnTabNodeSeen(kTag, tab_node_id_2); + GetTracker()->GetTab(session_tag, tab_id_1, tab_node_id_3); + GetTracker()->GetTab(session_tag, tab_id_1, tab_node_id_4); + GetTracker()->GetTab(session_tag, tab_id_2, tab_node_id_3); + GetTracker()->GetTab(session_tag, tab_id_2, tab_node_id_4); - GetTracker()->LookupForeignTabNodeIds(kTag, &result); + GetTracker()->LookupTabNodeIds(session_tag, &result); EXPECT_EQ(2U, result.size()); - EXPECT_TRUE(result.find(tab_node_id_1) != result.end()); - EXPECT_TRUE(result.find(tab_node_id_2) != result.end()); + EXPECT_TRUE(result.find(tab_node_id_3) != result.end()); + EXPECT_TRUE(result.find(tab_node_id_4) != result.end()); - GetTracker()->DeleteForeignTab(kTag, tab_node_id_1); - GetTracker()->LookupForeignTabNodeIds(kTag, &result); + GetTracker()->DeleteForeignTab(session_tag, tab_node_id_3); + GetTracker()->LookupTabNodeIds(session_tag, &result); EXPECT_EQ(1U, result.size()); - EXPECT_TRUE(result.find(tab_node_id_2) != result.end()); + EXPECT_TRUE(result.find(tab_node_id_4) != result.end()); - GetTracker()->DeleteForeignTab(kTag, tab_node_id_2); - GetTracker()->LookupForeignTabNodeIds(kTag, &result); + GetTracker()->DeleteForeignTab(session_tag, tab_node_id_4); + GetTracker()->LookupTabNodeIds(session_tag, &result); EXPECT_TRUE(result.empty()); } -TEST_F(SyncedSessionTrackerTest, CleanupLocalTabs) { - std::set<int> free_node_ids; - int tab_node_id = TabNodePool::kInvalidTabNodeID; - const int kTabNode1 = 1; - const int kTabNode2 = 2; - const int kTabNode3 = 3; - - GetTracker()->SetLocalSessionTag(kTag); - - // Start with two restored tab nodes. - GetTracker()->ReassociateLocalTab(kTabNode1, kTab1); - GetTracker()->ReassociateLocalTab(kTabNode2, kTab2); - EXPECT_TRUE(GetTabNodePool()->Empty()); - EXPECT_FALSE(GetTabNodePool()->Full()); - EXPECT_EQ(2U, GetTabNodePool()->Capacity()); - - // Associate with no tabs. The tab pool should now be full. - GetTracker()->ResetSessionTracking(kTag); - GetTracker()->CleanupLocalTabs(&free_node_ids); - EXPECT_TRUE(free_node_ids.empty()); - EXPECT_TRUE(GetTabNodePool()->Full()); - - // Associate with only 1 tab open. A tab node should be reused. - GetTracker()->ResetSessionTracking(kTag); - GetTracker()->PutWindowInSession(kTag, kWindow1); - GetTracker()->PutTabInWindow(kTag, kWindow1, kTab1); - EXPECT_TRUE(GetTracker()->GetTabNodeFromLocalTabId(kTab1, &tab_node_id)); - GetTracker()->CleanupLocalTabs(&free_node_ids); - EXPECT_TRUE(free_node_ids.empty()); - - // TabNodePool should have one free tab node and one used. - EXPECT_EQ(2U, GetTabNodePool()->Capacity()); - EXPECT_FALSE(GetTabNodePool()->Empty()); - EXPECT_FALSE(GetTabNodePool()->Full()); - - // Simulate a tab opening, which should use the last free tab node. - EXPECT_TRUE(GetTracker()->GetTabNodeFromLocalTabId(kTab2, &tab_node_id)); - EXPECT_TRUE(GetTabNodePool()->Empty()); - - // Simulate another tab opening, which should create a new associated tab - // node. - EXPECT_FALSE(GetTracker()->GetTabNodeFromLocalTabId(kTab3, &tab_node_id)); - EXPECT_EQ(kTabNode3, tab_node_id); - EXPECT_EQ(3U, GetTabNodePool()->Capacity()); - EXPECT_TRUE(GetTabNodePool()->Empty()); - - // Fetching the same tab should return the same tab node id. - EXPECT_TRUE(GetTracker()->GetTabNodeFromLocalTabId(kTab3, &tab_node_id)); - EXPECT_EQ(kTabNode3, tab_node_id); - EXPECT_TRUE(GetTabNodePool()->Empty()); - - // Associate with no tabs. All tabs should be freed again, and the pool - // should now be full. - GetTracker()->ResetSessionTracking(kTag); - GetTracker()->CleanupLocalTabs(&free_node_ids); - EXPECT_TRUE(free_node_ids.empty()); - EXPECT_TRUE(GetTabNodePool()->Full()); - EXPECT_FALSE(GetTabNodePool()->Empty()); -} - -TEST_F(SyncedSessionTrackerTest, ReassociateTabMapped) { - std::set<int> free_node_ids; - - // First create the tab normally. - GetTracker()->SetLocalSessionTag(kTag); - EXPECT_FALSE(GetTracker()->IsLocalTabNodeAssociated(kTabNode)); - GetTracker()->ReassociateLocalTab(kTabNode, kTab1); - EXPECT_TRUE(GetTracker()->IsLocalTabNodeAssociated(kTabNode)); - - // Map it to a window with the same tab id as it was created with. - GetTracker()->ResetSessionTracking(kTag); - GetTracker()->PutWindowInSession(kTag, kWindow1); - GetTracker()->PutTabInWindow(kTag, kWindow1, kTab1); - GetTracker()->CleanupLocalTabs(&free_node_ids); - SyncedSession* session = GetTracker()->GetSession(kTag); - ASSERT_EQ(1U, session->windows.size()); - ASSERT_EQ(1U, session->windows[kWindow1]->tabs.size()); - ASSERT_EQ(GetTracker()->GetTab(kTag, kTab1), - session->windows[kWindow1]->tabs[0].get()); - - // Then reassociate with a new tab id. - GetTracker()->ReassociateLocalTab(kTabNode, kTab2); - EXPECT_TRUE(GetTracker()->IsLocalTabNodeAssociated(kTabNode)); - - // Reset tracking, and put the new tab id into the window. - GetTracker()->ResetSessionTracking(kTag); - GetTracker()->PutWindowInSession(kTag, kWindow1); - GetTracker()->PutTabInWindow(kTag, kWindow1, kTab2); - GetTracker()->CleanupLocalTabs(&free_node_ids); - EXPECT_TRUE(free_node_ids.empty()); - - // Now that it's been mapped, it should be accessible both via the - // GetSession as well as the GetTab. - ASSERT_EQ(GetTracker()->GetTab(kTag, kTab2), - session->windows[kWindow1]->tabs[0].get()); - ASSERT_EQ(session->tab_node_ids.size(), - session->tab_node_ids.count(kTabNode)); - ASSERT_EQ(1U, GetTabNodePool()->Capacity()); -} - -TEST_F(SyncedSessionTrackerTest, ReassociateTabUnmapped) { - std::set<int> free_node_ids; - - // First create the old tab in an unmapped state. - GetTracker()->SetLocalSessionTag(kTag); - EXPECT_FALSE(GetTracker()->IsLocalTabNodeAssociated(kTabNode)); - GetTracker()->ReassociateLocalTab(kTabNode, kTab1); - EXPECT_TRUE(GetTracker()->IsLocalTabNodeAssociated(kTabNode)); - - // Map it to a window, but reassociated with a new tab id. - GetTracker()->ResetSessionTracking(kTag); - GetTracker()->ReassociateLocalTab(kTabNode, kTab2); - EXPECT_TRUE(GetTracker()->IsLocalTabNodeAssociated(kTabNode)); - GetTracker()->PutWindowInSession(kTag, kWindow1); - GetTracker()->PutTabInWindow(kTag, kWindow1, kTab2); - GetTracker()->CleanupLocalTabs(&free_node_ids); - EXPECT_TRUE(free_node_ids.empty()); - - // Now that it's been mapped, it should be accessible both via the - // GetSession as well as GetTab. - SyncedSession* session = GetTracker()->GetSession(kTag); - ASSERT_EQ(GetTracker()->GetTab(kTag, kTab2), - session->windows[kWindow1]->tabs[0].get()); - ASSERT_EQ(session->tab_node_ids.size(), - session->tab_node_ids.count(kTabNode)); - ASSERT_EQ(1U, GetTabNodePool()->Capacity()); -} - } // namespace sync_sessions
diff --git a/components/sync_sessions/tab_node_pool.cc b/components/sync_sessions/tab_node_pool.cc index f187d23d..4067b92 100644 --- a/components/sync_sessions/tab_node_pool.cc +++ b/components/sync_sessions/tab_node_pool.cc
@@ -4,10 +4,12 @@ #include "components/sync_sessions/tab_node_pool.h" -#include <algorithm> - +#include "base/format_macros.h" #include "base/logging.h" +#include "base/strings/stringprintf.h" #include "components/sync/base/model_type.h" +#include "components/sync/model/sync_change.h" +#include "components/sync/model/sync_data.h" #include "components/sync/protocol/session_specifics.pb.h" #include "components/sync/protocol/sync.pb.h" @@ -24,91 +26,114 @@ TabNodePool::~TabNodePool() {} +// Static +std::string TabNodePool::TabIdToTag(const std::string& machine_tag, + int tab_node_id) { + return base::StringPrintf("%s %d", machine_tag.c_str(), tab_node_id); +} + void TabNodePool::AddTabNode(int tab_node_id) { DCHECK_GT(tab_node_id, kInvalidTabNodeID); DCHECK(nodeid_tabid_map_.find(tab_node_id) == nodeid_tabid_map_.end()); - DVLOG(1) << "Adding tab node " << tab_node_id << " to pool."; - max_used_tab_node_id_ = std::max(max_used_tab_node_id_, tab_node_id); - free_nodes_pool_.insert(tab_node_id); + unassociated_nodes_.insert(tab_node_id); + if (max_used_tab_node_id_ < tab_node_id) + max_used_tab_node_id_ = tab_node_id; } void TabNodePool::AssociateTabNode(int tab_node_id, SessionID::id_type tab_id) { DCHECK_GT(tab_node_id, kInvalidTabNodeID); - DCHECK_GT(tab_id, kInvalidTabID); - - // This is a new node association, the sync node should be free. - // Remove node from free node pool and then associate it with the tab. - std::set<int>::iterator it = free_nodes_pool_.find(tab_node_id); - DCHECK(it != free_nodes_pool_.end()); - free_nodes_pool_.erase(it); - + // Remove sync node if it is in unassociated nodes pool. + std::set<int>::iterator u_it = unassociated_nodes_.find(tab_node_id); + if (u_it != unassociated_nodes_.end()) { + unassociated_nodes_.erase(u_it); + } else { + // This is a new node association, the sync node should be free. + // Remove node from free node pool and then associate it with the tab. + std::set<int>::iterator it = free_nodes_pool_.find(tab_node_id); + DCHECK(it != free_nodes_pool_.end()); + free_nodes_pool_.erase(it); + } DCHECK(nodeid_tabid_map_.find(tab_node_id) == nodeid_tabid_map_.end()); - DVLOG(1) << "Associating tab node " << tab_node_id << " with tab " << tab_id; nodeid_tabid_map_[tab_node_id] = tab_id; - tabid_nodeid_map_[tab_id] = tab_node_id; } -bool TabNodePool::GetTabNodeForTab(SessionID::id_type tab_id, - int* tab_node_id) { - if (tabid_nodeid_map_.find(tab_id) != tabid_nodeid_map_.end()) { - *tab_node_id = tabid_nodeid_map_[tab_id]; - return true; - } - +int TabNodePool::GetFreeTabNode(syncer::SyncChangeList* append_changes) { + DCHECK_GT(machine_tag_.length(), 0U); + DCHECK(append_changes); if (free_nodes_pool_.empty()) { // Tab pool has no free nodes, allocate new one. - *tab_node_id = ++max_used_tab_node_id_; - AddTabNode(*tab_node_id); + int tab_node_id = ++max_used_tab_node_id_; + std::string tab_node_tag = TabIdToTag(machine_tag_, tab_node_id); - AssociateTabNode(*tab_node_id, tab_id); - return false; + // We fill the new node with just enough data so that in case of a crash/bug + // we can identify the node as our own on re-association and reuse it. + sync_pb::EntitySpecifics entity; + sync_pb::SessionSpecifics* specifics = entity.mutable_session(); + specifics->set_session_tag(machine_tag_); + specifics->set_tab_node_id(tab_node_id); + append_changes->push_back(syncer::SyncChange( + FROM_HERE, syncer::SyncChange::ACTION_ADD, + syncer::SyncData::CreateLocalData(tab_node_tag, tab_node_tag, entity))); + + // Grow the pool by 1 since we created a new node. + DVLOG(1) << "Adding sync node " << tab_node_id << " to tab node id pool"; + free_nodes_pool_.insert(tab_node_id); + return tab_node_id; } else { // Return the next free node. - *tab_node_id = *free_nodes_pool_.begin(); - AssociateTabNode(*tab_node_id, tab_id); - return true; + return *free_nodes_pool_.begin(); } } -void TabNodePool::FreeTab(int tab_id) { - DCHECK_GT(tab_id, kInvalidTabID); - TabIDToTabNodeIDMap::iterator it = tabid_nodeid_map_.find(tab_id); - if (it == tabid_nodeid_map_.end()) { - return; // Already freed. - } +void TabNodePool::FreeTabNode(int tab_node_id, + syncer::SyncChangeList* append_changes) { + DCHECK(append_changes); + TabNodeIDToTabIDMap::iterator it = nodeid_tabid_map_.find(tab_node_id); + DCHECK(it != nodeid_tabid_map_.end()); + nodeid_tabid_map_.erase(it); + FreeTabNodeInternal(tab_node_id, append_changes); +} - int tab_node_id = it->second; - DVLOG(1) << "Freeing tab " << tab_id << " at node " << tab_node_id; - nodeid_tabid_map_.erase(nodeid_tabid_map_.find(tab_node_id)); - tabid_nodeid_map_.erase(it); +void TabNodePool::FreeTabNodeInternal(int tab_node_id, + syncer::SyncChangeList* append_changes) { + DCHECK(free_nodes_pool_.find(tab_node_id) == free_nodes_pool_.end()); + DCHECK(append_changes); free_nodes_pool_.insert(tab_node_id); + + // If number of free nodes exceed kFreeNodesHighWatermark, + // delete sync nodes till number reaches kFreeNodesLowWatermark. + // Note: This logic is to mitigate temporary disassociation issues with old + // clients: http://crbug.com/259918. Newer versions do not need this. + if (free_nodes_pool_.size() > kFreeNodesHighWatermark) { + for (std::set<int>::iterator free_it = free_nodes_pool_.begin(); + free_it != free_nodes_pool_.end();) { + const std::string tab_node_tag = TabIdToTag(machine_tag_, *free_it); + append_changes->push_back(syncer::SyncChange( + FROM_HERE, syncer::SyncChange::ACTION_DELETE, + syncer::SyncData::CreateLocalDelete(tab_node_tag, syncer::SESSIONS))); + free_nodes_pool_.erase(free_it++); + if (free_nodes_pool_.size() <= kFreeNodesLowWatermark) { + return; + } + } + } +} + +bool TabNodePool::IsUnassociatedTabNode(int tab_node_id) { + return unassociated_nodes_.find(tab_node_id) != unassociated_nodes_.end(); } void TabNodePool::ReassociateTabNode(int tab_node_id, SessionID::id_type tab_id) { - DCHECK_GT(tab_node_id, kInvalidTabNodeID); - DCHECK_GT(tab_id, kInvalidTabID); - - auto tabid_it = tabid_nodeid_map_.find(tab_id); - if (tabid_it != tabid_nodeid_map_.end()) { - if (tabid_it->second == tab_node_id) { - return; // Already associated properly. - } else { - // Another node is already associated with this tab. Free it. - FreeTab(tab_id); - } - } - - auto nodeid_it = nodeid_tabid_map_.find(tab_node_id); - if (nodeid_it != nodeid_tabid_map_.end()) { - // This node was already associated with another tab. Free it. - FreeTab(nodeid_it->second); + // Remove from list of unassociated sync_nodes if present. + std::set<int>::iterator it = unassociated_nodes_.find(tab_node_id); + if (it != unassociated_nodes_.end()) { + unassociated_nodes_.erase(it); } else { - // This is a new tab node. Add it before association. - AddTabNode(tab_node_id); + // tab_node_id must be an already associated node. + DCHECK(nodeid_tabid_map_.find(tab_node_id) != nodeid_tabid_map_.end()); } - - AssociateTabNode(tab_node_id, tab_id); + nodeid_tabid_map_[tab_node_id] = tab_id; } SessionID::id_type TabNodePool::GetTabIdFromTabNodeId(int tab_node_id) const { @@ -119,33 +144,27 @@ return kInvalidTabID; } -void TabNodePool::CleanupTabNodes(std::set<int>* deleted_node_ids) { - // If number of free nodes exceed kFreeNodesHighWatermark, - // delete sync nodes till number reaches kFreeNodesLowWatermark. - // Note: This logic is to mitigate temporary disassociation issues with old - // clients: http://crbug.com/259918. Newer versions do not need this. - if (free_nodes_pool_.size() > kFreeNodesHighWatermark) { - for (std::set<int>::iterator free_it = free_nodes_pool_.begin(); - free_it != free_nodes_pool_.end();) { - deleted_node_ids->insert(*free_it); - free_nodes_pool_.erase(free_it++); - if (free_nodes_pool_.size() <= kFreeNodesLowWatermark) { - return; - } - } +void TabNodePool::DeleteUnassociatedTabNodes( + syncer::SyncChangeList* append_changes) { + for (std::set<int>::iterator it = unassociated_nodes_.begin(); + it != unassociated_nodes_.end();) { + FreeTabNodeInternal(*it, append_changes); + unassociated_nodes_.erase(it++); } + DCHECK(unassociated_nodes_.empty()); } // Clear tab pool. void TabNodePool::Clear() { + unassociated_nodes_.clear(); free_nodes_pool_.clear(); nodeid_tabid_map_.clear(); - tabid_nodeid_map_.clear(); max_used_tab_node_id_ = kInvalidTabNodeID; } size_t TabNodePool::Capacity() const { - return nodeid_tabid_map_.size() + free_nodes_pool_.size(); + return nodeid_tabid_map_.size() + unassociated_nodes_.size() + + free_nodes_pool_.size(); } bool TabNodePool::Empty() const { @@ -156,4 +175,8 @@ return nodeid_tabid_map_.empty(); } +void TabNodePool::SetMachineTag(const std::string& machine_tag) { + machine_tag_ = machine_tag; +} + } // namespace sync_sessions
diff --git a/components/sync_sessions/tab_node_pool.h b/components/sync_sessions/tab_node_pool.h index 833daf7..caadc4e 100644 --- a/components/sync_sessions/tab_node_pool.h +++ b/components/sync_sessions/tab_node_pool.h
@@ -13,6 +13,11 @@ #include "base/macros.h" #include "components/sessions/core/session_id.h" +#include "components/sync/model/sync_change_processor.h" + +namespace syncer { +class SyncChangeProcessor; +} // namespace syncer namespace sync_sessions { @@ -22,11 +27,17 @@ // - a tab_id: created by session service, unique to this client // - a tab_node_id: the id for a particular sync tab node. This is used // to generate the sync tab node tag through: -// tab_tag = StringPrintf("%s %d", local_session_tag, tab_node_id); +// tab_tag = StringPrintf("%s_%ui", local_session_tag, tab_node_id); // -// A sync node can be in one of the two states: +// A sync node can be in one of the three states: // 1. Associated : Sync node is used and associated with a tab. -// 2. Free : Sync node is unused. +// 2. Unassociated : Sync node is used but currently unassociated with any tab. +// This is true for old nodes that remain from a session +// restart. Nodes are only unassociated temporarily while the +// model associator figures out which tabs belong to which +// nodes. Eventually any remaining unassociated nodes are +// freed. +// 3. Free : Sync node is unused. class TabNodePool { public: @@ -43,37 +54,65 @@ static const int kInvalidTabNodeID; - // Fills |tab_node_id| with a tab node associated with |tab_id|. - // If tab_id is already associated with a tab_node_id, reuses the existing - // association. Otherwise attempts to get the next free tab node and - // associate it with |tab_id|. If none are available, will create a new tab - // node. - // Returns true if a pre-existing tab node could be reused, false if a new one - // had to be created. - bool GetTabNodeForTab(SessionID::id_type tab_id, int* tab_node_id); + // Build a sync tag from tab_node_id. + static std::string TabIdToTag(const std::string& machine_tag, + int tab_node_id); + + // Returns the tab_node_id for the next free tab node. If none are available, + // creates a new tab node and adds it to free nodes pool. The free node can + // then be used to associate with a tab by calling AssociateTabNode. + // Note: The node is considered free until it has been associated. Repeated + // calls to GetFreeTabNode will return the same id until node has been + // associated. + // |change_output| *must* be provided. It is the TabNodePool's link to + // the SyncChange pipeline that exists in the caller context. If the need + // to create nodes arises in the implementation, associated SyncChanges will + // be appended to this list for later application by the caller via the + // SyncChangeProcessor. + int GetFreeTabNode(syncer::SyncChangeList* change_output); + + // Removes association for |tab_node_id| and returns it to the free node pool. + // |change_output| *must* be provided. It is the TabNodePool's link to + // the SyncChange pipeline that exists in the caller's context. If the need + // to delete sync nodes arises in the implementation, associated SyncChanges + // will be appended to this list for later application by the caller via the + // SyncChangeProcessor. + void FreeTabNode(int tab_node_id, syncer::SyncChangeList* change_output); + + // Associates |tab_node_id| with |tab_id|. |tab_node_id| should either be + // unassociated or free. If |tab_node_id| is free, |tab_node_id| is removed + // from the free node pool In order to associate a non free sync node, + // use ReassociateTabNode. + void AssociateTabNode(int tab_node_id, SessionID::id_type tab_id); + + // Adds |tab_node_id| as an unassociated sync node. + // Note: this should only be called when we discover tab sync nodes from + // previous sessions, not for freeing tab nodes we created through + // GetFreeTabNode (use FreeTabNode below for that). + void AddTabNode(int tab_node_id); // Returns the tab_id for |tab_node_id| if it is associated else returns // kInvalidTabID. SessionID::id_type GetTabIdFromTabNodeId(int tab_node_id) const; - // Reassociates |tab_node_id| with |tab_id|. If |tab_node_id| is not already - // known, it is added to the tab node pool before being associated. + // Reassociates |tab_node_id| with |tab_id|. |tab_node_id| must be either + // associated with a tab or in the set of unassociated nodes. void ReassociateTabNode(int tab_node_id, SessionID::id_type tab_id); - // Removes association for |tab_id| and returns its tab node to the free node - // pool. - void FreeTab(int tab_id); + // Returns true if |tab_node_id| is an unassociated tab node. + bool IsUnassociatedTabNode(int tab_node_id); - // Fills |deleted_node_ids| with any free nodes to be deleted as proscribed - // by the free node low/high watermarks, in order to ensure the free node pool - // does not grow too large. - void CleanupTabNodes(std::set<int>* deleted_node_ids); + // Returns any unassociated nodes to the free node pool. + // |change_output| *must* be provided. It is the TabNodePool's link to + // the SyncChange pipeline that exists in the caller's context. + // See FreeTabNode for more detail. + void DeleteUnassociatedTabNodes(syncer::SyncChangeList* change_output); // Clear tab pool. void Clear(); // Return the number of tab nodes this client currently has allocated - // (including both free and associated nodes). + // (including both free, unassociated and associated nodes) size_t Capacity() const; // Return empty status (all tab nodes are in use). @@ -82,36 +121,41 @@ // Return full status (no tab nodes are in use). bool Full(); + void SetMachineTag(const std::string& machine_tag); + private: friend class SyncTabNodePoolTest; typedef std::map<int, SessionID::id_type> TabNodeIDToTabIDMap; - typedef std::map<SessionID::id_type, int> TabIDToTabNodeIDMap; - // Adds |tab_node_id| to the tab node pool. - // Note: this should only be called when we discover tab sync nodes from - // previous sessions, not for freeing tab nodes we created through - // GetTabNodeForTab (use FreeTab for that). - void AddTabNode(int tab_node_id); - - // Associates |tab_node_id| with |tab_id|. |tab_node_id| must be free. In - // order to associated a non-free tab node, ReassociateTabNode must be - // used. - void AssociateTabNode(int tab_node_id, SessionID::id_type tab_id); + // Adds |tab_node_id| to free node pool. + // |change_output| *must* be provided. It is the TabNodePool's link to + // the SyncChange pipeline that exists in the caller's context. + // See FreeTabNode for more detail. + void FreeTabNodeInternal(int tab_node_id, + syncer::SyncChangeList* change_output); // Stores mapping of node ids associated with tab_ids, these are the used // nodes of tab node pool. // The nodes in the map can be returned to free tab node pool by calling - // FreeTab(..). + // FreeTabNode(tab_node_id). TabNodeIDToTabIDMap nodeid_tabid_map_; - TabIDToTabNodeIDMap tabid_nodeid_map_; // The node ids for the set of free sync nodes. std::set<int> free_nodes_pool_; + // The node ids that are added to pool using AddTabNode and are currently + // not associated with any tab. They can be reassociated using + // ReassociateTabNode. + std::set<int> unassociated_nodes_; + // The maximum used tab_node id for a sync node. A new sync node will always // be created with max_used_tab_node_id_ + 1. int max_used_tab_node_id_; + // The machine tag associated with this tab pool. Used in the title of new + // sync nodes. + std::string machine_tag_; + DISALLOW_COPY_AND_ASSIGN(TabNodePool); };
diff --git a/components/sync_sessions/tab_node_pool_unittest.cc b/components/sync_sessions/tab_node_pool_unittest.cc index 591c8b54..cd125a2 100644 --- a/components/sync_sessions/tab_node_pool_unittest.cc +++ b/components/sync_sessions/tab_node_pool_unittest.cc
@@ -6,13 +6,16 @@ #include <vector> +#include "components/sync/model/sync_change.h" +#include "components/sync/protocol/session_specifics.pb.h" +#include "components/sync/protocol/sync.pb.h" #include "testing/gtest/include/gtest/gtest.h" namespace sync_sessions { class SyncTabNodePoolTest : public testing::Test { protected: - SyncTabNodePoolTest() {} + SyncTabNodePoolTest() { pool_.SetMachineTag("tag"); } int GetMaxUsedTabNodeId() const { return pool_.max_used_tab_node_id_; } @@ -29,127 +32,107 @@ namespace { -const int kTabNodeId1 = 10; -const int kTabNodeId2 = 5; -const int kTabNodeId3 = 1000; -const int kTabId1 = 1; -const int kTabId2 = 2; -const int kTabId3 = 3; - TEST_F(SyncTabNodePoolTest, TabNodeIdIncreases) { - std::set<int> deleted_node_ids; - + syncer::SyncChangeList changes; // max_used_tab_node_ always increases. - pool_.ReassociateTabNode(kTabNodeId1, kTabId1); - EXPECT_EQ(kTabNodeId1, GetMaxUsedTabNodeId()); - pool_.ReassociateTabNode(kTabNodeId2, kTabId2); - EXPECT_EQ(kTabNodeId1, GetMaxUsedTabNodeId()); - pool_.ReassociateTabNode(kTabNodeId3, kTabId3); - EXPECT_EQ(kTabNodeId3, GetMaxUsedTabNodeId()); + pool_.AddTabNode(10); + EXPECT_EQ(10, GetMaxUsedTabNodeId()); + pool_.AddTabNode(5); + EXPECT_EQ(10, GetMaxUsedTabNodeId()); + pool_.AddTabNode(1000); + EXPECT_EQ(1000, GetMaxUsedTabNodeId()); + pool_.ReassociateTabNode(1000, 1); + pool_.ReassociateTabNode(5, 2); + pool_.ReassociateTabNode(10, 3); // Freeing a tab node does not change max_used_tab_node_id_. - pool_.FreeTab(kTabId3); - pool_.CleanupTabNodes(&deleted_node_ids); - EXPECT_TRUE(deleted_node_ids.empty()); - pool_.FreeTab(kTabId2); - pool_.CleanupTabNodes(&deleted_node_ids); - EXPECT_TRUE(deleted_node_ids.empty()); - pool_.FreeTab(kTabId1); - pool_.CleanupTabNodes(&deleted_node_ids); - EXPECT_TRUE(deleted_node_ids.empty()); + pool_.FreeTabNode(1000, &changes); + EXPECT_TRUE(changes.empty()); + pool_.FreeTabNode(5, &changes); + EXPECT_TRUE(changes.empty()); + pool_.FreeTabNode(10, &changes); + EXPECT_TRUE(changes.empty()); for (int i = 0; i < 3; ++i) { - int tab_node_id = -1; - EXPECT_TRUE(pool_.GetTabNodeForTab(i + 1, &tab_node_id)); - EXPECT_EQ(kTabNodeId3, GetMaxUsedTabNodeId()); + pool_.AssociateTabNode(pool_.GetFreeTabNode(&changes), i + 1); + EXPECT_EQ(1000, GetMaxUsedTabNodeId()); } - pool_.CleanupTabNodes(&deleted_node_ids); - EXPECT_TRUE(deleted_node_ids.empty()); - EXPECT_EQ(kTabNodeId3, GetMaxUsedTabNodeId()); + EXPECT_TRUE(changes.empty()); + EXPECT_EQ(1000, GetMaxUsedTabNodeId()); EXPECT_TRUE(pool_.Empty()); } -TEST_F(SyncTabNodePoolTest, Reassociation) { - // Reassociate tab node 1 with tab id 1. - pool_.ReassociateTabNode(kTabNodeId1, kTabId1); - EXPECT_EQ(1U, pool_.Capacity()); +TEST_F(SyncTabNodePoolTest, OldTabNodesAddAndRemove) { + syncer::SyncChangeList changes; + // VerifyOldTabNodes are added. + pool_.AddTabNode(1); + pool_.AddTabNode(2); + EXPECT_EQ(2u, pool_.Capacity()); + EXPECT_TRUE(pool_.Empty()); + EXPECT_TRUE(pool_.IsUnassociatedTabNode(1)); + EXPECT_TRUE(pool_.IsUnassociatedTabNode(2)); + pool_.ReassociateTabNode(1, 2); + EXPECT_TRUE(pool_.Empty()); + pool_.AssociateTabNode(2, 3); + EXPECT_FALSE(pool_.IsUnassociatedTabNode(1)); + EXPECT_FALSE(pool_.IsUnassociatedTabNode(2)); + pool_.FreeTabNode(2, &changes); + EXPECT_TRUE(changes.empty()); + // 2 should be returned to free node pool_. + EXPECT_EQ(2u, pool_.Capacity()); + // Should be able to free 1. + pool_.FreeTabNode(1, &changes); + EXPECT_FALSE(pool_.Empty()); + EXPECT_TRUE(pool_.Full()); + EXPECT_EQ(1, pool_.GetFreeTabNode(&changes)); + EXPECT_TRUE(changes.empty()); + pool_.AssociateTabNode(1, 1); + EXPECT_EQ(2, pool_.GetFreeTabNode(&changes)); + EXPECT_TRUE(changes.empty()); + pool_.AssociateTabNode(2, 1); EXPECT_TRUE(pool_.Empty()); EXPECT_FALSE(pool_.Full()); - EXPECT_EQ(kTabId1, pool_.GetTabIdFromTabNodeId(kTabNodeId1)); - EXPECT_EQ(TabNodePool::kInvalidTabNodeID, - pool_.GetTabIdFromTabNodeId(kTabNodeId2)); - - // Introduce a new tab node associated with the same tab. The old tab node - // should get added to the free pool - pool_.ReassociateTabNode(kTabNodeId2, kTabId1); - EXPECT_EQ(2U, pool_.Capacity()); - EXPECT_FALSE(pool_.Empty()); EXPECT_FALSE(pool_.Full()); - EXPECT_EQ(TabNodePool::kInvalidTabNodeID, - pool_.GetTabIdFromTabNodeId(kTabNodeId1)); - EXPECT_EQ(kTabId1, pool_.GetTabIdFromTabNodeId(kTabNodeId2)); - - // Reassociating the same tab node/tab should have no effect. - pool_.ReassociateTabNode(kTabNodeId2, kTabId1); - EXPECT_EQ(2U, pool_.Capacity()); - EXPECT_FALSE(pool_.Empty()); - EXPECT_FALSE(pool_.Full()); - EXPECT_EQ(TabNodePool::kInvalidTabNodeID, - pool_.GetTabIdFromTabNodeId(kTabNodeId1)); - EXPECT_EQ(kTabId1, pool_.GetTabIdFromTabNodeId(kTabNodeId2)); - - // Reassociating the new tab node with a new tab should just update the - // association tables. - pool_.ReassociateTabNode(kTabNodeId2, kTabId2); - EXPECT_EQ(2U, pool_.Capacity()); - EXPECT_FALSE(pool_.Empty()); - EXPECT_FALSE(pool_.Full()); - EXPECT_EQ(TabNodePool::kInvalidTabNodeID, - pool_.GetTabIdFromTabNodeId(kTabNodeId1)); - EXPECT_EQ(kTabId2, pool_.GetTabIdFromTabNodeId(kTabNodeId2)); - - // Reassociating the first tab node should make the pool empty. - pool_.ReassociateTabNode(kTabNodeId1, kTabId1); - EXPECT_EQ(2U, pool_.Capacity()); - EXPECT_TRUE(pool_.Empty()); - EXPECT_FALSE(pool_.Full()); - EXPECT_EQ(kTabId1, pool_.GetTabIdFromTabNodeId(kTabNodeId1)); - EXPECT_EQ(kTabId2, pool_.GetTabIdFromTabNodeId(kTabNodeId2)); } -TEST_F(SyncTabNodePoolTest, ReassociateThenFree) { - std::set<int> deleted_node_ids; - - // Verify old tab nodes are reassociated correctly. - pool_.ReassociateTabNode(kTabNodeId1, kTabId1); - pool_.ReassociateTabNode(kTabNodeId2, kTabId2); - pool_.ReassociateTabNode(kTabNodeId3, kTabId3); +TEST_F(SyncTabNodePoolTest, OldTabNodesReassociation) { + // VerifyOldTabNodes are reassociated correctly. + pool_.AddTabNode(4); + pool_.AddTabNode(5); + pool_.AddTabNode(6); EXPECT_EQ(3u, pool_.Capacity()); EXPECT_TRUE(pool_.Empty()); - // Free tabs 2 and 3. - pool_.FreeTab(kTabId2); - pool_.FreeTab(kTabId3); - pool_.CleanupTabNodes(&deleted_node_ids); - EXPECT_TRUE(deleted_node_ids.empty()); - // Free node pool should have 2 and 3. + EXPECT_TRUE(pool_.IsUnassociatedTabNode(4)); + pool_.ReassociateTabNode(4, 5); + pool_.AssociateTabNode(5, 6); + pool_.AssociateTabNode(6, 7); + // Free 5 and 6. + syncer::SyncChangeList changes; + pool_.FreeTabNode(5, &changes); + pool_.FreeTabNode(6, &changes); + EXPECT_TRUE(changes.empty()); + // 5 and 6 nodes should not be unassociated. + EXPECT_FALSE(pool_.IsUnassociatedTabNode(5)); + EXPECT_FALSE(pool_.IsUnassociatedTabNode(6)); + // Free node pool should have 5 and 6. EXPECT_FALSE(pool_.Empty()); EXPECT_EQ(3u, pool_.Capacity()); // Free all nodes - pool_.FreeTab(kTabId1); - pool_.CleanupTabNodes(&deleted_node_ids); - EXPECT_TRUE(deleted_node_ids.empty()); + pool_.FreeTabNode(4, &changes); + EXPECT_TRUE(changes.empty()); EXPECT_TRUE(pool_.Full()); std::set<int> free_sync_ids; for (int i = 0; i < 3; ++i) { - int tab_node_id = -1; - EXPECT_TRUE(pool_.GetTabNodeForTab(i, &tab_node_id)); - free_sync_ids.insert(tab_node_id); + free_sync_ids.insert(pool_.GetFreeTabNode(&changes)); + // GetFreeTabNode will return the same value till the node is + // reassociated. + pool_.AssociateTabNode(pool_.GetFreeTabNode(&changes), i + 1); } EXPECT_TRUE(pool_.Empty()); EXPECT_EQ(3u, free_sync_ids.size()); - EXPECT_EQ(1u, free_sync_ids.count(kTabNodeId1)); - EXPECT_EQ(1u, free_sync_ids.count(kTabNodeId2)); - EXPECT_EQ(1u, free_sync_ids.count(kTabNodeId3)); + EXPECT_EQ(1u, free_sync_ids.count(4)); + EXPECT_EQ(1u, free_sync_ids.count(5)); + EXPECT_EQ(1u, free_sync_ids.count(6)); } TEST_F(SyncTabNodePoolTest, Init) { @@ -158,49 +141,106 @@ } TEST_F(SyncTabNodePoolTest, AddGet) { + syncer::SyncChangeList changes; int free_nodes[] = {5, 10}; AddFreeTabNodes(2, free_nodes); EXPECT_EQ(2U, pool_.Capacity()); - int tab_node_id = -1; - EXPECT_TRUE(pool_.GetTabNodeForTab(1, &tab_node_id)); - EXPECT_EQ(5, tab_node_id); + EXPECT_EQ(5, pool_.GetFreeTabNode(&changes)); + pool_.AssociateTabNode(5, 1); EXPECT_FALSE(pool_.Empty()); EXPECT_FALSE(pool_.Full()); EXPECT_EQ(2U, pool_.Capacity()); // 5 is now used, should return 10. - EXPECT_TRUE(pool_.GetTabNodeForTab(2, &tab_node_id)); - EXPECT_EQ(10, tab_node_id); + EXPECT_EQ(10, pool_.GetFreeTabNode(&changes)); } -TEST_F(SyncTabNodePoolTest, GetTabNodeForTabCreate) { - int tab_node_id = -1; - EXPECT_FALSE(pool_.GetTabNodeForTab(1, &tab_node_id)); - EXPECT_EQ(0, tab_node_id); +TEST_F(SyncTabNodePoolTest, All) { + syncer::SyncChangeList changes; + EXPECT_TRUE(pool_.Empty()); + EXPECT_TRUE(pool_.Full()); + EXPECT_EQ(0U, pool_.Capacity()); + + // GetFreeTabNode returns the lowest numbered free node. + EXPECT_EQ(0, pool_.GetFreeTabNode(&changes)); + EXPECT_EQ(1U, changes.size()); + EXPECT_FALSE(pool_.Empty()); + EXPECT_TRUE(pool_.Full()); + EXPECT_EQ(1U, pool_.Capacity()); + + // Associate 5, next free node should be 10. + pool_.AssociateTabNode(0, 1); + EXPECT_EQ(1, pool_.GetFreeTabNode(&changes)); + EXPECT_EQ(2U, changes.size()); + changes.clear(); + pool_.AssociateTabNode(1, 2); + EXPECT_TRUE(pool_.Empty()); + EXPECT_FALSE(pool_.Full()); + EXPECT_EQ(2U, pool_.Capacity()); + // Release them in reverse order. + pool_.FreeTabNode(1, &changes); + pool_.FreeTabNode(0, &changes); + EXPECT_EQ(2U, pool_.Capacity()); + EXPECT_FALSE(pool_.Empty()); + EXPECT_TRUE(pool_.Full()); + EXPECT_EQ(0, pool_.GetFreeTabNode(&changes)); + EXPECT_TRUE(changes.empty()); + EXPECT_FALSE(pool_.Empty()); + EXPECT_TRUE(pool_.Full()); + EXPECT_EQ(2U, pool_.Capacity()); + EXPECT_FALSE(pool_.Empty()); + EXPECT_TRUE(pool_.Full()); + pool_.AssociateTabNode(0, 1); + EXPECT_EQ(2U, pool_.Capacity()); + EXPECT_EQ(1, pool_.GetFreeTabNode(&changes)); + EXPECT_TRUE(changes.empty()); + pool_.AssociateTabNode(1, 2); + EXPECT_TRUE(pool_.Empty()); + EXPECT_FALSE(pool_.Full()); + EXPECT_EQ(2U, pool_.Capacity()); + // Release them again. + pool_.FreeTabNode(1, &changes); + pool_.FreeTabNode(0, &changes); + EXPECT_FALSE(pool_.Empty()); + EXPECT_TRUE(pool_.Full()); + EXPECT_EQ(2U, pool_.Capacity()); + pool_.Clear(); + EXPECT_TRUE(pool_.Empty()); + EXPECT_TRUE(pool_.Full()); + EXPECT_EQ(0U, pool_.Capacity()); +} + +TEST_F(SyncTabNodePoolTest, GetFreeTabNodeCreate) { + syncer::SyncChangeList changes; + EXPECT_EQ(0, pool_.GetFreeTabNode(&changes)); + EXPECT_TRUE(changes[0].IsValid()); + EXPECT_EQ(syncer::SyncChange::ACTION_ADD, changes[0].change_type()); + EXPECT_TRUE(changes[0].sync_data().IsValid()); + sync_pb::EntitySpecifics entity = changes[0].sync_data().GetSpecifics(); + sync_pb::SessionSpecifics specifics(entity.session()); + EXPECT_EQ(0, specifics.tab_node_id()); } TEST_F(SyncTabNodePoolTest, TabPoolFreeNodeLimits) { - std::set<int> deleted_node_ids; - // Allocate TabNodePool::kFreeNodesHighWatermark + 1 nodes and verify that // freeing the last node reduces the free node pool size to // kFreeNodesLowWatermark. + syncer::SyncChangeList changes; SessionID session_id; std::vector<int> used_sync_ids; for (size_t i = 1; i <= TabNodePool::kFreeNodesHighWatermark + 1; ++i) { session_id.set_id(i); - int sync_id = -1; - EXPECT_FALSE(pool_.GetTabNodeForTab(i, &sync_id)); + int sync_id = pool_.GetFreeTabNode(&changes); + pool_.AssociateTabNode(sync_id, i); used_sync_ids.push_back(sync_id); } // Free all except one node. + int last_sync_id = used_sync_ids.back(); used_sync_ids.pop_back(); - for (size_t i = 1; i <= used_sync_ids.size(); ++i) { - pool_.FreeTab(i); - pool_.CleanupTabNodes(&deleted_node_ids); - EXPECT_TRUE(deleted_node_ids.empty()); + for (size_t i = 0; i < used_sync_ids.size(); ++i) { + pool_.FreeTabNode(used_sync_ids[i], &changes); } // Except one node all nodes should be in FreeNode pool. @@ -211,11 +251,7 @@ // Freeing the last sync node should drop the free nodes to // kFreeNodesLowWatermark. - pool_.FreeTab(TabNodePool::kFreeNodesHighWatermark + 1); - pool_.CleanupTabNodes(&deleted_node_ids); - EXPECT_EQ(TabNodePool::kFreeNodesHighWatermark + 1 - - TabNodePool::kFreeNodesLowWatermark, - deleted_node_ids.size()); + pool_.FreeTabNode(last_sync_id, &changes); EXPECT_FALSE(pool_.Empty()); EXPECT_TRUE(pool_.Full()); EXPECT_EQ(TabNodePool::kFreeNodesLowWatermark, pool_.Capacity());
diff --git a/components/variations/variations_associated_data.cc b/components/variations/variations_associated_data.cc index ec696a3..0dffe8f 100644 --- a/components/variations/variations_associated_data.cc +++ b/components/variations/variations_associated_data.cc
@@ -8,12 +8,11 @@ #include <utility> #include <vector> -#include "base/feature_list.h" #include "base/macros.h" #include "base/memory/singleton.h" #include "base/metrics/field_trial.h" #include "base/metrics/field_trial_param_associator.h" -#include "base/strings/string_number_conversions.h" +#include "base/metrics/field_trial_params.h" #include "base/strings/string_split.h" #include "components/variations/variations_http_header_provider.h" @@ -154,107 +153,48 @@ const std::string& trial_name, const std::string& group_name, const std::map<std::string, std::string>& params) { - return base::FieldTrialParamAssociator::GetInstance() - ->AssociateFieldTrialParams(trial_name, group_name, params); + return base::AssociateFieldTrialParams(trial_name, group_name, params); } bool GetVariationParams(const std::string& trial_name, std::map<std::string, std::string>* params) { - return base::FieldTrialParamAssociator::GetInstance()->GetFieldTrialParams( - trial_name, params); + return base::GetFieldTrialParams(trial_name, params); } bool GetVariationParamsByFeature(const base::Feature& feature, std::map<std::string, std::string>* params) { - if (!base::FeatureList::IsEnabled(feature)) - return false; - - base::FieldTrial* trial = base::FeatureList::GetFieldTrial(feature); - if (!trial) - return false; - - return GetVariationParams(trial->trial_name(), params); + return base::GetFieldTrialParamsByFeature(feature, params); } std::string GetVariationParamValue(const std::string& trial_name, const std::string& param_name) { - std::map<std::string, std::string> params; - if (GetVariationParams(trial_name, ¶ms)) { - std::map<std::string, std::string>::iterator it = params.find(param_name); - if (it != params.end()) - return it->second; - } - return std::string(); + return base::GetFieldTrialParamValue(trial_name, param_name); } std::string GetVariationParamValueByFeature(const base::Feature& feature, const std::string& param_name) { - if (!base::FeatureList::IsEnabled(feature)) - return std::string(); - - base::FieldTrial* trial = base::FeatureList::GetFieldTrial(feature); - if (!trial) - return std::string(); - - return GetVariationParamValue(trial->trial_name(), param_name); + return base::GetFieldTrialParamValueByFeature(feature, param_name); } int GetVariationParamByFeatureAsInt(const base::Feature& feature, const std::string& param_name, int default_value) { - std::string value_as_string = - GetVariationParamValueByFeature(feature, param_name); - int value_as_int = 0; - if (!base::StringToInt(value_as_string, &value_as_int)) { - if (!value_as_string.empty()) { - DLOG(WARNING) << "Failed to parse variation param " << param_name - << " with string value " << value_as_string - << " under feature " << feature.name - << " into an int. Falling back to default value of " - << default_value; - } - value_as_int = default_value; - } - return value_as_int; + return base::GetFieldTrialParamByFeatureAsInt(feature, param_name, + default_value); } double GetVariationParamByFeatureAsDouble(const base::Feature& feature, const std::string& param_name, double default_value) { - std::string value_as_string = - GetVariationParamValueByFeature(feature, param_name); - double value_as_double = 0; - if (!base::StringToDouble(value_as_string, &value_as_double)) { - if (!value_as_string.empty()) { - DLOG(WARNING) << "Failed to parse variation param " << param_name - << " with string value " << value_as_string - << " under feature " << feature.name - << " into a double. Falling back to default value of " - << default_value; - } - value_as_double = default_value; - } - return value_as_double; + return base::GetFieldTrialParamByFeatureAsDouble(feature, param_name, + default_value); } bool GetVariationParamByFeatureAsBool(const base::Feature& feature, const std::string& param_name, bool default_value) { - std::string value_as_string = - variations::GetVariationParamValueByFeature(feature, param_name); - if (value_as_string == "true") - return true; - if (value_as_string == "false") - return false; - - if (!value_as_string.empty()) { - DLOG(WARNING) << "Failed to parse variation param " << param_name - << " with string value " << value_as_string - << " under feature " << feature.name - << " into a bool. Falling back to default value of " - << default_value; - } - return default_value; + return base::GetFieldTrialParamByFeatureAsBool(feature, param_name, + default_value); } // Functions below are exposed for testing explicitly behind this namespace.
diff --git a/components/variations/variations_associated_data.h b/components/variations/variations_associated_data.h index 8b1b25f..6eb51f3e 100644 --- a/components/variations/variations_associated_data.h +++ b/components/variations/variations_associated_data.h
@@ -110,79 +110,38 @@ VariationID GetGoogleVariationIDFromHashes(IDCollectionKey key, const ActiveGroupId& active_group); -// Associates the specified set of key-value |params| with the variation -// specified by |trial_name| and |group_name|. Fails and returns false if the -// specified variation already has params associated with it or the field trial -// is already active (group() has been called on it). Thread safe. +// Deprecated. Use base::AssociateFieldTrialParams() instead. bool AssociateVariationParams(const std::string& trial_name, const std::string& group_name, const std::map<std::string, std::string>& params); -// Retrieves the set of key-value |params| for the variation associated with -// the specified field trial, based on its selected group. If the field trial -// does not exist or its selected group does not have any parameters associated -// with it, returns false and does not modify |params|. Calling this function -// will result in the field trial being marked as active if found (i.e. group() -// will be called on it), if it wasn't already. Currently, this information is -// only available from the browser process. Thread safe. +// Deprecated. Use base::GetFieldTrialParams() instead. bool GetVariationParams(const std::string& trial_name, std::map<std::string, std::string>* params); -// Retrieves the set of key-value |params| for the variation associated with the -// specified |feature|. A feature is associated with at most one variation, -// through the variation's associated field trial, and selected group. See -// base/feature_list.h for more information on features. If the feature is not -// enabled, or if there's no associated variation params, returns false and does -// not modify |params|. Calling this function will result in the associated -// field trial being marked as active if found (i.e. group() will be called on -// it), if it wasn't already. Currently, this information is only available from -// the browser process. Thread safe. +// Deprecated. Use base::GetFieldTrialParamsByFeature() instead. bool GetVariationParamsByFeature(const base::Feature& feature, std::map<std::string, std::string>* params); -// Retrieves a specific parameter value corresponding to |param_name| for the -// variation associated with the specified field trial, based on its selected -// group. If the field trial does not exist or the specified parameter does not -// exist, returns an empty string. Calling this function will result in the -// field trial being marked as active if found (i.e. group() will be called on -// it), if it wasn't already. Currently, this information is only available from -// the browser process. Thread safe. +// Deprecated. Use base::GetFieldTrialParamValue() instead. std::string GetVariationParamValue(const std::string& trial_name, const std::string& param_name); -// Retrieves a specific parameter value corresponding to |param_name| for the -// variation associated with the specified |feature|. A feature is associated -// with at most one variation, through the variation's associated field trial, -// and selected group. See base/feature_list.h for more information on -// features. If the feature is not enabled, or the specified parameter does not -// exist, returns an empty string. Calling this function will result in the -// associated field trial being marked as active if found (i.e. group() will be -// called on it), if it wasn't already. Currently, this information is only -// available from the browser process. Thread safe. +// Deprecated. Use base::GetFieldTrialParamValueByFeature() instead. std::string GetVariationParamValueByFeature(const base::Feature& feature, const std::string& param_name); -// Same as GetVariationParamValueByFeature(). On top of that, it converts the -// string value into an int using base::StringToInt() and returns it, if -// successful. Otherwise, it returns |default_value|. If the string value is not -// empty and the conversion does not succeed, it produces a warning to LOG. +// Deprecated. Use base::GetFieldTrialParamByFeatureAsInt() instead. int GetVariationParamByFeatureAsInt(const base::Feature& feature, const std::string& param_name, int default_value); -// Same as GetVariationParamValueByFeature(). On top of that, it converts the -// string value into a double using base::StringToDouble() and returns it, if -// successful. Otherwise, it returns |default_value|. If the string value is not -// empty and the conversion does not succeed, it produces a warning to LOG. +// Deprecated. Use base::GetFieldTrialParamByFeatureAsDouble() instead. double GetVariationParamByFeatureAsDouble(const base::Feature& feature, const std::string& param_name, double default_value); -// Same as GetVariationParamValueByFeature(). On top of that, it converts the -// string value into a boolean and returns it, if successful. Otherwise, it -// returns |default_value|. The only string representations accepted here are -// "true" and "false". If the string value is not empty and the conversion does -// not succeed, it produces a warning to LOG. +// Deprecated. Use base::GetFieldTrialParamByFeatureAsBool() instead. bool GetVariationParamByFeatureAsBool(const base::Feature& feature, const std::string& param_name, bool default_value);
diff --git a/components/variations/variations_associated_data_unittest.cc b/components/variations/variations_associated_data_unittest.cc index 2217bd5..221be57a 100644 --- a/components/variations/variations_associated_data_unittest.cc +++ b/components/variations/variations_associated_data_unittest.cc
@@ -4,10 +4,8 @@ #include "components/variations/variations_associated_data.h" -#include "base/feature_list.h" #include "base/macros.h" #include "base/metrics/field_trial.h" -#include "base/test/scoped_feature_list.h" #include "testing/gtest/include/gtest/gtest.h" namespace variations { @@ -46,21 +44,10 @@ // Ensure that the maps are cleared between tests, since they are stored as // process singletons. testing::ClearAllVariationIDs(); - testing::ClearAllVariationParams(); - } - - void CreateFeatureWithTrial(const base::Feature& feature, - base::FeatureList::OverrideState override_state, - base::FieldTrial* trial) { - std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList); - feature_list->RegisterFieldTrialOverride(feature.name, override_state, - trial); - scoped_feature_list_.InitWithFeatureList(std::move(feature_list)); } private: base::FieldTrialList field_trial_list_; - base::test::ScopedFeatureList scoped_feature_list_; DISALLOW_COPY_AND_ASSIGN(VariationsAssociatedDataTest); }; @@ -216,276 +203,4 @@ GetIDForTrial(CHROME_SYNC_SERVICE, trial_true.get())); } -TEST_F(VariationsAssociatedDataTest, AssociateVariationParams) { - const std::string kTrialName = "AssociateVariationParams"; - - { - std::map<std::string, std::string> params; - params["a"] = "10"; - params["b"] = "test"; - ASSERT_TRUE(AssociateVariationParams(kTrialName, "A", params)); - } - { - std::map<std::string, std::string> params; - params["a"] = "5"; - ASSERT_TRUE(AssociateVariationParams(kTrialName, "B", params)); - } - - base::FieldTrialList::CreateFieldTrial(kTrialName, "B"); - EXPECT_EQ("5", GetVariationParamValue(kTrialName, "a")); - EXPECT_EQ(std::string(), GetVariationParamValue(kTrialName, "b")); - EXPECT_EQ(std::string(), GetVariationParamValue(kTrialName, "x")); - - std::map<std::string, std::string> params; - EXPECT_TRUE(GetVariationParams(kTrialName, ¶ms)); - EXPECT_EQ(1U, params.size()); - EXPECT_EQ("5", params["a"]); -} - -TEST_F(VariationsAssociatedDataTest, AssociateVariationParams_Fail) { - const std::string kTrialName = "AssociateVariationParams_Fail"; - const std::string kGroupName = "A"; - - std::map<std::string, std::string> params; - params["a"] = "10"; - ASSERT_TRUE(AssociateVariationParams(kTrialName, kGroupName, params)); - params["a"] = "1"; - params["b"] = "2"; - ASSERT_FALSE(AssociateVariationParams(kTrialName, kGroupName, params)); - - base::FieldTrialList::CreateFieldTrial(kTrialName, kGroupName); - EXPECT_EQ("10", GetVariationParamValue(kTrialName, "a")); - EXPECT_EQ(std::string(), GetVariationParamValue(kTrialName, "b")); -} - -TEST_F(VariationsAssociatedDataTest, AssociateVariationParams_TrialActiveFail) { - const std::string kTrialName = "AssociateVariationParams_TrialActiveFail"; - base::FieldTrialList::CreateFieldTrial(kTrialName, "A"); - ASSERT_EQ("A", base::FieldTrialList::FindFullName(kTrialName)); - - std::map<std::string, std::string> params; - params["a"] = "10"; - EXPECT_FALSE(AssociateVariationParams(kTrialName, "B", params)); - EXPECT_FALSE(AssociateVariationParams(kTrialName, "A", params)); -} - -TEST_F(VariationsAssociatedDataTest, - AssociateVariationParams_DoesntActivateTrial) { - const std::string kTrialName = "AssociateVariationParams_DoesntActivateTrial"; - - ASSERT_FALSE(base::FieldTrialList::IsTrialActive(kTrialName)); - scoped_refptr<base::FieldTrial> trial( - CreateFieldTrial(kTrialName, 100, "A", NULL)); - ASSERT_FALSE(base::FieldTrialList::IsTrialActive(kTrialName)); - - std::map<std::string, std::string> params; - params["a"] = "10"; - EXPECT_TRUE(AssociateVariationParams(kTrialName, "A", params)); - ASSERT_FALSE(base::FieldTrialList::IsTrialActive(kTrialName)); -} - -TEST_F(VariationsAssociatedDataTest, GetVariationParams_NoTrial) { - const std::string kTrialName = "GetVariationParams_NoParams"; - - std::map<std::string, std::string> params; - EXPECT_FALSE(GetVariationParams(kTrialName, ¶ms)); - EXPECT_EQ(std::string(), GetVariationParamValue(kTrialName, "x")); - EXPECT_EQ(std::string(), GetVariationParamValue(kTrialName, "y")); -} - -TEST_F(VariationsAssociatedDataTest, GetVariationParams_NoParams) { - const std::string kTrialName = "GetVariationParams_NoParams"; - - base::FieldTrialList::CreateFieldTrial(kTrialName, "A"); - - std::map<std::string, std::string> params; - EXPECT_FALSE(GetVariationParams(kTrialName, ¶ms)); - EXPECT_EQ(std::string(), GetVariationParamValue(kTrialName, "x")); - EXPECT_EQ(std::string(), GetVariationParamValue(kTrialName, "y")); -} - -TEST_F(VariationsAssociatedDataTest, GetVariationParams_ActivatesTrial) { - const std::string kTrialName = "GetVariationParams_ActivatesTrial"; - - ASSERT_FALSE(base::FieldTrialList::IsTrialActive(kTrialName)); - scoped_refptr<base::FieldTrial> trial( - CreateFieldTrial(kTrialName, 100, "A", NULL)); - ASSERT_FALSE(base::FieldTrialList::IsTrialActive(kTrialName)); - - std::map<std::string, std::string> params; - EXPECT_FALSE(GetVariationParams(kTrialName, ¶ms)); - ASSERT_TRUE(base::FieldTrialList::IsTrialActive(kTrialName)); -} - -TEST_F(VariationsAssociatedDataTest, GetVariationParamValue_ActivatesTrial) { - const std::string kTrialName = "GetVariationParamValue_ActivatesTrial"; - - ASSERT_FALSE(base::FieldTrialList::IsTrialActive(kTrialName)); - scoped_refptr<base::FieldTrial> trial( - CreateFieldTrial(kTrialName, 100, "A", NULL)); - ASSERT_FALSE(base::FieldTrialList::IsTrialActive(kTrialName)); - - std::map<std::string, std::string> params; - EXPECT_EQ(std::string(), GetVariationParamValue(kTrialName, "x")); - ASSERT_TRUE(base::FieldTrialList::IsTrialActive(kTrialName)); -} - -TEST_F(VariationsAssociatedDataTest, GetVariationParamsByFeature) { - const std::string kTrialName = "GetVariationParamsByFeature"; - const base::Feature kFeature{"TestFeature", - base::FEATURE_DISABLED_BY_DEFAULT}; - - std::map<std::string, std::string> params; - params["x"] = "1"; - variations::AssociateVariationParams(kTrialName, "A", params); - scoped_refptr<base::FieldTrial> trial( - CreateFieldTrial(kTrialName, 100, "A", NULL)); - - CreateFeatureWithTrial(kFeature, base::FeatureList::OVERRIDE_ENABLE_FEATURE, - trial.get()); - - std::map<std::string, std::string> actualParams; - EXPECT_TRUE(GetVariationParamsByFeature(kFeature, &actualParams)); - EXPECT_EQ(params, actualParams); -} - -TEST_F(VariationsAssociatedDataTest, GetVariationParamValueByFeature) { - const std::string kTrialName = "GetVariationParamsByFeature"; - const base::Feature kFeature{"TestFeature", - base::FEATURE_DISABLED_BY_DEFAULT}; - - std::map<std::string, std::string> params; - params["x"] = "1"; - variations::AssociateVariationParams(kTrialName, "A", params); - scoped_refptr<base::FieldTrial> trial( - CreateFieldTrial(kTrialName, 100, "A", NULL)); - - CreateFeatureWithTrial(kFeature, base::FeatureList::OVERRIDE_ENABLE_FEATURE, - trial.get()); - - std::map<std::string, std::string> actualParams; - EXPECT_EQ(params["x"], GetVariationParamValueByFeature(kFeature, "x")); -} - -TEST_F(VariationsAssociatedDataTest, GetVariationParamsByFeature_Disable) { - const std::string kTrialName = "GetVariationParamsByFeature"; - const base::Feature kFeature{"TestFeature", - base::FEATURE_DISABLED_BY_DEFAULT}; - - std::map<std::string, std::string> params; - params["x"] = "1"; - variations::AssociateVariationParams(kTrialName, "A", params); - scoped_refptr<base::FieldTrial> trial( - CreateFieldTrial(kTrialName, 100, "A", NULL)); - - CreateFeatureWithTrial(kFeature, base::FeatureList::OVERRIDE_DISABLE_FEATURE, - trial.get()); - - std::map<std::string, std::string> actualParams; - EXPECT_FALSE(GetVariationParamsByFeature(kFeature, &actualParams)); -} - -TEST_F(VariationsAssociatedDataTest, GetVariationParamValueByFeature_Disable) { - const std::string kTrialName = "GetVariationParamsByFeature"; - const base::Feature kFeature{"TestFeature", - base::FEATURE_DISABLED_BY_DEFAULT}; - - std::map<std::string, std::string> params; - params["x"] = "1"; - variations::AssociateVariationParams(kTrialName, "A", params); - scoped_refptr<base::FieldTrial> trial( - CreateFieldTrial(kTrialName, 100, "A", NULL)); - - CreateFeatureWithTrial(kFeature, base::FeatureList::OVERRIDE_DISABLE_FEATURE, - trial.get()); - - std::map<std::string, std::string> actualParams; - EXPECT_EQ(std::string(), GetVariationParamValueByFeature(kFeature, "x")); -} - -TEST_F(VariationsAssociatedDataTest, GetVariationParamByFeatureAsInt) { - const std::string kTrialName = "GetVariationParamsByFeature"; - const base::Feature kFeature{"TestFeature", - base::FEATURE_DISABLED_BY_DEFAULT}; - - std::map<std::string, std::string> params; - params["a"] = "1"; - params["b"] = "1.5"; - params["c"] = "foo"; - params["d"] = ""; - // "e" is not registered - variations::AssociateVariationParams(kTrialName, "A", params); - scoped_refptr<base::FieldTrial> trial( - CreateFieldTrial(kTrialName, 100, "A", NULL)); - - CreateFeatureWithTrial(kFeature, base::FeatureList::OVERRIDE_ENABLE_FEATURE, - trial.get()); - - std::map<std::string, std::string> actualParams; - EXPECT_EQ(1, GetVariationParamByFeatureAsInt(kFeature, "a", 0)); - EXPECT_EQ(0, GetVariationParamByFeatureAsInt(kFeature, "b", 0)); // invalid - EXPECT_EQ(0, GetVariationParamByFeatureAsInt(kFeature, "c", 0)); // invalid - EXPECT_EQ(0, GetVariationParamByFeatureAsInt(kFeature, "d", 0)); // empty - EXPECT_EQ(0, GetVariationParamByFeatureAsInt(kFeature, "e", 0)); // empty -} - -TEST_F(VariationsAssociatedDataTest, GetVariationParamByFeatureAsDouble) { - const std::string kTrialName = "GetVariationParamsByFeature"; - const base::Feature kFeature{"TestFeature", - base::FEATURE_DISABLED_BY_DEFAULT}; - - std::map<std::string, std::string> params; - params["a"] = "1"; - params["b"] = "1.5"; - params["c"] = "1.0e-10"; - params["d"] = "foo"; - params["e"] = ""; - // "f" is not registered - variations::AssociateVariationParams(kTrialName, "A", params); - scoped_refptr<base::FieldTrial> trial( - CreateFieldTrial(kTrialName, 100, "A", NULL)); - - CreateFeatureWithTrial(kFeature, base::FeatureList::OVERRIDE_ENABLE_FEATURE, - trial.get()); - - std::map<std::string, std::string> actualParams; - EXPECT_EQ(1, GetVariationParamByFeatureAsDouble(kFeature, "a", 0)); - EXPECT_EQ(1.5, GetVariationParamByFeatureAsDouble(kFeature, "b", 0)); - EXPECT_EQ(1.0e-10, GetVariationParamByFeatureAsDouble(kFeature, "c", 0)); - EXPECT_EQ(0, - GetVariationParamByFeatureAsDouble(kFeature, "d", 0)); // invalid - EXPECT_EQ(0, GetVariationParamByFeatureAsDouble(kFeature, "e", 0)); // empty - EXPECT_EQ(0, GetVariationParamByFeatureAsDouble(kFeature, "f", 0)); // empty -} - -TEST_F(VariationsAssociatedDataTest, GetVariationParamByFeatureAsBool) { - const std::string kTrialName = "GetVariationParamsByFeature"; - const base::Feature kFeature{"TestFeature", - base::FEATURE_DISABLED_BY_DEFAULT}; - - std::map<std::string, std::string> params; - params["a"] = "true"; - params["b"] = "false"; - params["c"] = "1"; - params["d"] = "False"; - params["e"] = ""; - // "f" is not registered - variations::AssociateVariationParams(kTrialName, "A", params); - scoped_refptr<base::FieldTrial> trial( - CreateFieldTrial(kTrialName, 100, "A", NULL)); - - CreateFeatureWithTrial(kFeature, base::FeatureList::OVERRIDE_ENABLE_FEATURE, - trial.get()); - - std::map<std::string, std::string> actualParams; - EXPECT_TRUE(GetVariationParamByFeatureAsBool(kFeature, "a", false)); - EXPECT_FALSE(GetVariationParamByFeatureAsBool(kFeature, "b", true)); - EXPECT_FALSE( - GetVariationParamByFeatureAsBool(kFeature, "c", false)); // invalid - EXPECT_TRUE( - GetVariationParamByFeatureAsBool(kFeature, "d", true)); // invalid - EXPECT_TRUE(GetVariationParamByFeatureAsBool(kFeature, "e", true)); // empty - EXPECT_TRUE(GetVariationParamByFeatureAsBool(kFeature, "f", true)); // empty -} - } // namespace variations
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index dfbd4e2..e407460c 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn
@@ -78,6 +78,7 @@ "//device/screen_orientation/public/interfaces", "//device/sensors/public/cpp", "//device/vibration", + "//device/vr", "//device/wake_lock", "//google_apis", "//gpu", @@ -1197,6 +1198,7 @@ "renderer_host/render_widget_host_view_base.h", "renderer_host/render_widget_host_view_base_observer.cc", "renderer_host/render_widget_host_view_base_observer.h", + "renderer_host/render_widget_host_view_frame_subscriber.h", "renderer_host/render_widget_host_view_mac.h", "renderer_host/render_widget_host_view_mac.mm", "renderer_host/render_widget_host_view_mac_dictionary_helper.h", @@ -2007,12 +2009,6 @@ deps += [ "//ui/ozone" ] } - if (enable_webvr) { - deps += [ "//device/vr" ] - } else { - deps += [ "//device/vr:mojo_only" ] - } - if (enable_ipc_fuzzer) { configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_config" ] }
diff --git a/content/browser/battery_status/battery_monitor_integration_browsertest.cc b/content/browser/battery_status/battery_monitor_integration_browsertest.cc index 9856a66..5db921f 100644 --- a/content/browser/battery_status/battery_monitor_integration_browsertest.cc +++ b/content/browser/battery_status/battery_monitor_integration_browsertest.cc
@@ -39,7 +39,7 @@ device::BatteryStatus g_battery_status; // Global list of test battery monitors to notify when |g_battery_status| // changes. -base::LazyInstance<BatteryUpdateCallbackList> g_callback_list = +base::LazyInstance<BatteryUpdateCallbackList>::Leaky g_callback_list = LAZY_INSTANCE_INITIALIZER; // Updates the global battery state and notifies existing test monitors.
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index e12d29d5..a30bab3 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc
@@ -1260,6 +1260,10 @@ device_monitor_mac_.reset(); #endif + if (BrowserGpuChannelHostFactory::instance()) { + BrowserGpuChannelHostFactory::instance()->CloseChannel(); + } + // Shutdown the Service Manager and IPC. service_manager_context_.reset(); mojo_ipc_support_.reset();
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc index b9876e8..7a3f339a 100644 --- a/content/browser/gpu/browser_gpu_channel_host_factory.cc +++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
@@ -198,6 +198,14 @@ finished_ = true; } +void BrowserGpuChannelHostFactory::CloseChannel() { + DCHECK(instance_); + if (instance_->gpu_channel_) { + instance_->gpu_channel_->DestroyChannel(); + instance_->gpu_channel_ = nullptr; + } +} + bool BrowserGpuChannelHostFactory::CanUseForTesting() { return GpuDataManager::GetInstance()->GpuAccessAllowed(NULL); }
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.h b/content/browser/gpu/browser_gpu_channel_host_factory.h index c01f04e..c1388b7 100644 --- a/content/browser/gpu/browser_gpu_channel_host_factory.h +++ b/content/browser/gpu/browser_gpu_channel_host_factory.h
@@ -40,6 +40,10 @@ gpu::GpuChannelHost* GetGpuChannel(); int GetGpuChannelId() { return gpu_client_id_; } + // Closes the channel to the GPU process. This should be called before the IO + // thread stops. + void CloseChannel(); + // Used to skip GpuChannelHost tests when there can be no GPU process. static bool CanUseForTesting();
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc index 0966386..c61d97f 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc
@@ -33,6 +33,7 @@ #include "content/browser/gpu/gpu_process_host_ui_shim.h" #include "content/browser/gpu/shader_cache_factory.h" #include "content/browser/renderer_host/render_widget_host_impl.h" +#include "content/browser/renderer_host/render_widget_host_view_frame_subscriber.h" #include "content/browser/service_manager/service_manager_context.h" #include "content/common/child_process_host_impl.h" #include "content/common/establish_channel_params.h" @@ -45,7 +46,6 @@ #include "content/public/browser/gpu_utils.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_widget_host_view.h" -#include "content/public/browser/render_widget_host_view_frame_subscriber.h" #include "content/public/common/connection_filter.h" #include "content/public/common/content_client.h" #include "content/public/common/content_switches.h"
diff --git a/content/browser/media/capture/web_contents_video_capture_device.cc b/content/browser/media/capture/web_contents_video_capture_device.cc index 5be935ef..336ec0ee 100644 --- a/content/browser/media/capture/web_contents_video_capture_device.cc +++ b/content/browser/media/capture/web_contents_video_capture_device.cc
@@ -23,10 +23,10 @@ #include "content/browser/media/capture/window_activity_tracker.h" #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/browser/renderer_host/render_widget_host_view_base.h" +#include "content/browser/renderer_host/render_widget_host_view_frame_subscriber.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_widget_host_view.h" -#include "content/public/browser/render_widget_host_view_frame_subscriber.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_media_capture_id.h" #include "media/base/video_frame_metadata.h" @@ -60,15 +60,9 @@ oracle_proxy_(std::move(oracle)), cursor_renderer_(cursor_renderer), window_activity_tracker_(tracker), + source_id_for_copy_request_(base::UnguessableToken::Create()), weak_ptr_factory_(this) {} - bool ShouldCaptureFrame( - const gfx::Rect& damage_rect, - base::TimeTicks present_time, - scoped_refptr<media::VideoFrame>* storage, - RenderWidgetHostViewFrameSubscriber::DeliverFrameCallback* - deliver_frame_cb) override; - static void DidCaptureFrame( base::WeakPtr<FrameSubscriber> frame_subscriber_, const media::ThreadSafeCaptureOracle::CaptureFrameCallback& @@ -80,6 +74,15 @@ bool IsUserInteractingWithContent(); + // RenderWidgetHostViewFrameSubscriber implementation: + bool ShouldCaptureFrame( + const gfx::Rect& damage_rect, + base::TimeTicks present_time, + scoped_refptr<media::VideoFrame>* storage, + RenderWidgetHostViewFrameSubscriber::DeliverFrameCallback* + deliver_frame_cb) override; + const base::UnguessableToken& GetSourceIdForCopyRequest() override; + private: const media::VideoCaptureOracle::Event event_type_; const scoped_refptr<media::ThreadSafeCaptureOracle> oracle_proxy_; @@ -89,6 +92,7 @@ // We need a weak pointer since FrameSubscriber is owned externally and // may outlive the ui activity tracker. const base::WeakPtr<WindowActivityTracker> window_activity_tracker_; + base::UnguessableToken source_id_for_copy_request_; base::WeakPtrFactory<FrameSubscriber> weak_ptr_factory_; }; @@ -243,28 +247,6 @@ DISALLOW_COPY_AND_ASSIGN(WebContentsCaptureMachine); }; -bool FrameSubscriber::ShouldCaptureFrame( - const gfx::Rect& damage_rect, - base::TimeTicks present_time, - scoped_refptr<media::VideoFrame>* storage, - DeliverFrameCallback* deliver_frame_cb) { - TRACE_EVENT1("gpu.capture", "FrameSubscriber::ShouldCaptureFrame", "instance", - this); - - media::ThreadSafeCaptureOracle::CaptureFrameCallback capture_frame_cb; - if (!oracle_proxy_->ObserveEventAndDecideCapture( - event_type_, damage_rect, present_time, storage, &capture_frame_cb)) { - return false; - } - - DCHECK(*storage); - DCHECK(!capture_frame_cb.is_null()); - *deliver_frame_cb = - base::Bind(&FrameSubscriber::DidCaptureFrame, - weak_ptr_factory_.GetWeakPtr(), capture_frame_cb, *storage); - return true; -} - void FrameSubscriber::DidCaptureFrame( base::WeakPtr<FrameSubscriber> frame_subscriber_, const media::ThreadSafeCaptureOracle::CaptureFrameCallback& @@ -310,6 +292,32 @@ return interactive_mode; } +bool FrameSubscriber::ShouldCaptureFrame( + const gfx::Rect& damage_rect, + base::TimeTicks present_time, + scoped_refptr<media::VideoFrame>* storage, + DeliverFrameCallback* deliver_frame_cb) { + TRACE_EVENT1("gpu.capture", "FrameSubscriber::ShouldCaptureFrame", "instance", + this); + + media::ThreadSafeCaptureOracle::CaptureFrameCallback capture_frame_cb; + if (!oracle_proxy_->ObserveEventAndDecideCapture( + event_type_, damage_rect, present_time, storage, &capture_frame_cb)) { + return false; + } + + DCHECK(*storage); + DCHECK(!capture_frame_cb.is_null()); + *deliver_frame_cb = + base::Bind(&FrameSubscriber::DidCaptureFrame, + weak_ptr_factory_.GetWeakPtr(), capture_frame_cb, *storage); + return true; +} + +const base::UnguessableToken& FrameSubscriber::GetSourceIdForCopyRequest() { + return source_id_for_copy_request_; +} + ContentCaptureSubscription::ContentCaptureSubscription( base::WeakPtr<RenderWidgetHostViewBase> source_view, scoped_refptr<media::ThreadSafeCaptureOracle> oracle_proxy,
diff --git a/content/browser/media/capture/web_contents_video_capture_device_unittest.cc b/content/browser/media/capture/web_contents_video_capture_device_unittest.cc index d1ee07a..0fb5bd9 100644 --- a/content/browser/media/capture/web_contents_video_capture_device_unittest.cc +++ b/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
@@ -22,8 +22,8 @@ #include "content/browser/frame_host/render_frame_host_impl.h" #include "content/browser/renderer_host/render_view_host_factory.h" #include "content/browser/renderer_host/render_widget_host_impl.h" +#include "content/browser/renderer_host/render_widget_host_view_frame_subscriber.h" #include "content/browser/web_contents/web_contents_impl.h" -#include "content/public/browser/render_widget_host_view_frame_subscriber.h" #include "content/public/browser/web_contents_media_capture_id.h" #include "content/public/test/mock_render_process_host.h" #include "content/public/test/test_browser_context.h"
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc index 5155431..6fa63cc 100644 --- a/content/browser/renderer_host/delegated_frame_host.cc +++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -25,8 +25,8 @@ #include "components/display_compositor/gl_helper.h" #include "content/browser/compositor/surface_utils.h" #include "content/browser/gpu/compositor_util.h" +#include "content/browser/renderer_host/render_widget_host_view_frame_subscriber.h" #include "content/browser/renderer_host/resize_lock.h" -#include "content/public/browser/render_widget_host_view_frame_subscriber.h" #include "content/public/common/content_switches.h" #include "media/base/video_frame.h" #include "media/base/video_util.h" @@ -364,7 +364,7 @@ // DelegatedFrameHost (e.g., a call to CopyFromCompositingSurface() for // screenshots) since those copy requests do not specify |frame_subscriber()| // as a source. - request->set_source(frame_subscriber()); + request->set_source(frame_subscriber()->GetSourceIdForCopyRequest()); if (subscriber_texture.get()) { request->SetTextureMailbox(cc::TextureMailbox( subscriber_texture->mailbox(), subscriber_texture->sync_token(),
diff --git a/content/browser/renderer_host/offscreen_canvas_surface_manager_unittest.cc b/content/browser/renderer_host/offscreen_canvas_surface_manager_unittest.cc index 6208564..a00a043c 100644 --- a/content/browser/renderer_host/offscreen_canvas_surface_manager_unittest.cc +++ b/content/browser/renderer_host/offscreen_canvas_surface_manager_unittest.cc
@@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/message_loop/message_loop.h" #include "content/browser/compositor/test/no_transport_image_transport_factory.h" #include "content/browser/renderer_host/offscreen_canvas_surface_impl.h" #include "content/browser/renderer_host/offscreen_canvas_surface_manager.h"
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 4546d52..9729ee9 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -115,6 +115,7 @@ #include "content/browser/renderer_host/render_view_host_impl.h" #include "content/browser/renderer_host/render_widget_helper.h" #include "content/browser/renderer_host/render_widget_host_impl.h" +#include "content/browser/renderer_host/render_widget_host_view_frame_subscriber.h" #include "content/browser/renderer_host/text_input_client_message_filter.h" #include "content/browser/resolve_proxy_msg_helper.h" #include "content/browser/service_worker/service_worker_context_wrapper.h" @@ -148,7 +149,6 @@ #include "content/public/browser/render_process_host_observer.h" #include "content/public/browser/render_widget_host.h" #include "content/public/browser/render_widget_host_iterator.h" -#include "content/public/browser/render_widget_host_view_frame_subscriber.h" #include "content/public/browser/resource_context.h" #include "content/public/browser/user_metrics.h" #include "content/public/browser/worker_service.h"
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 024d90d..da12730 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -43,6 +43,7 @@ #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/browser/renderer_host/render_widget_host_input_event_router.h" #include "content/browser/renderer_host/render_widget_host_view_event_handler.h" +#include "content/browser/renderer_host/render_widget_host_view_frame_subscriber.h" #include "content/browser/renderer_host/ui_events_helper.h" #include "content/common/content_switches_internal.h" #include "content/common/input_messages.h" @@ -53,7 +54,6 @@ #include "content/public/browser/content_browser_client.h" #include "content/public/browser/overscroll_configuration.h" #include "content/public/browser/render_view_host.h" -#include "content/public/browser/render_widget_host_view_frame_subscriber.h" #include "content/public/browser/user_metrics.h" #include "content/public/common/child_process_host.h" #include "content/public/common/content_switches.h"
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc index e8e354dc..36665017 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -43,6 +43,7 @@ #include "content/browser/renderer_host/render_widget_host_delegate.h" #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/browser/renderer_host/render_widget_host_view_event_handler.h" +#include "content/browser/renderer_host/render_widget_host_view_frame_subscriber.h" #include "content/browser/renderer_host/resize_lock.h" #include "content/browser/renderer_host/text_input_manager.h" #include "content/browser/web_contents/web_contents_view_aura.h" @@ -52,7 +53,6 @@ #include "content/common/text_input_state.h" #include "content/common/view_messages.h" #include "content/public/browser/render_widget_host_view.h" -#include "content/public/browser/render_widget_host_view_frame_subscriber.h" #include "content/public/browser/web_contents_view_delegate.h" #include "content/public/common/context_menu_params.h" #include "content/public/test/mock_render_process_host.h" @@ -269,7 +269,10 @@ class FakeFrameSubscriber : public RenderWidgetHostViewFrameSubscriber { public: FakeFrameSubscriber(gfx::Size size, base::Callback<void(bool)> callback) - : size_(size), callback_(callback), should_capture_(true) {} + : size_(size), + callback_(callback), + should_capture_(true), + source_id_for_copy_request_(base::UnguessableToken::Create()) {} bool ShouldCaptureFrame(const gfx::Rect& damage_rect, base::TimeTicks present_time, @@ -285,6 +288,10 @@ return true; } + const base::UnguessableToken& GetSourceIdForCopyRequest() override { + return source_id_for_copy_request_; + } + base::TimeTicks last_present_time() const { return last_present_time_; } void set_should_capture(bool should_capture) { @@ -303,6 +310,7 @@ base::Callback<void(bool)> callback_; base::TimeTicks last_present_time_; bool should_capture_; + base::UnguessableToken source_id_for_copy_request_; }; class FakeWindowEventDispatcher : public aura::WindowEventDispatcher {
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc index 8e8f7905..d09da07 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -13,9 +13,9 @@ #include "content/browser/renderer_host/render_widget_host_delegate.h" #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/browser/renderer_host/render_widget_host_view_base_observer.h" +#include "content/browser/renderer_host/render_widget_host_view_frame_subscriber.h" #include "content/browser/renderer_host/text_input_manager.h" #include "content/common/content_switches_internal.h" -#include "content/public/browser/render_widget_host_view_frame_subscriber.h" #include "ui/display/display.h" #include "ui/display/screen.h" #include "ui/gfx/geometry/point_conversions.h"
diff --git a/content/browser/renderer_host/render_widget_host_view_browsertest.cc b/content/browser/renderer_host/render_widget_host_view_browsertest.cc index b2f1ae9..dea46c6c 100644 --- a/content/browser/renderer_host/render_widget_host_view_browsertest.cc +++ b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
@@ -19,9 +19,9 @@ #include "content/browser/renderer_host/dip_util.h" #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/browser/renderer_host/render_widget_host_view_base.h" +#include "content/browser/renderer_host/render_widget_host_view_frame_subscriber.h" #include "content/public/browser/gpu_data_manager.h" #include "content/public/browser/render_view_host.h" -#include "content/public/browser/render_widget_host_view_frame_subscriber.h" #include "content/public/browser/web_contents.h" #include "content/public/common/content_paths.h" #include "content/public/common/content_switches.h" @@ -250,9 +250,9 @@ class FakeFrameSubscriber : public RenderWidgetHostViewFrameSubscriber { public: FakeFrameSubscriber( - RenderWidgetHostViewFrameSubscriber::DeliverFrameCallback callback) - : callback_(callback) { - } + RenderWidgetHostViewFrameSubscriber::DeliverFrameCallback callback) + : callback_(callback), + source_id_for_copy_request_(base::UnguessableToken::Create()) {} bool ShouldCaptureFrame(const gfx::Rect& damage_rect, base::TimeTicks present_time, @@ -271,8 +271,13 @@ return true; } + const base::UnguessableToken& GetSourceIdForCopyRequest() override { + return source_id_for_copy_request_; + } + private: DeliverFrameCallback callback_; + base::UnguessableToken source_id_for_copy_request_; }; // Disable tests for Android as it has an incomplete implementation.
diff --git a/content/public/browser/render_widget_host_view_frame_subscriber.h b/content/browser/renderer_host/render_widget_host_view_frame_subscriber.h similarity index 86% rename from content/public/browser/render_widget_host_view_frame_subscriber.h rename to content/browser/renderer_host/render_widget_host_view_frame_subscriber.h index 6485c7da..4211ef7 100644 --- a/content/public/browser/render_widget_host_view_frame_subscriber.h +++ b/content/browser/renderer_host/render_widget_host_view_frame_subscriber.h
@@ -2,11 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_FRAME_SUBSCRIBER_H_ -#define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_FRAME_SUBSCRIBER_H_ +#ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_FRAME_SUBSCRIBER_H_ +#define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_FRAME_SUBSCRIBER_H_ #include "base/callback.h" #include "base/time/time.h" +#include "cc/output/copy_output_request.h" namespace gfx { class Rect; @@ -44,7 +45,8 @@ // captured content resides, with the rest of the VideoFrame blacked out. typedef base::Callback<void(base::TimeTicks /* timestamp */, const gfx::Rect& /* region_in_frame */, - bool /* frame_captured */)> DeliverFrameCallback; + bool /* frame_captured */)> + DeliverFrameCallback; // Called when a new frame is going to be presented at time // |present_time| with |damage_rect| being the region of the frame that has @@ -68,8 +70,10 @@ base::TimeTicks present_time, scoped_refptr<media::VideoFrame>* storage, DeliverFrameCallback* callback) = 0; + + virtual const base::UnguessableToken& GetSourceIdForCopyRequest() = 0; }; } // namespace content -#endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_FRAME_SUBSCRIBER_H_ +#endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_FRAME_SUBSCRIBER_H_
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm index f7435a2..31939d7 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -47,6 +47,7 @@ #include "content/browser/renderer_host/render_widget_helper.h" #include "content/browser/renderer_host/render_widget_host_delegate.h" #include "content/browser/renderer_host/render_widget_host_input_event_router.h" +#include "content/browser/renderer_host/render_widget_host_view_frame_subscriber.h" #import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_helper.h" #import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.h" #import "content/browser/renderer_host/text_input_client_mac.h" @@ -61,7 +62,6 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/native_web_keyboard_event.h" #include "content/public/browser/render_widget_host.h" -#include "content/public/browser/render_widget_host_view_frame_subscriber.h" #import "content/public/browser/render_widget_host_view_mac_delegate.h" #include "content/public/browser/web_contents.h" #include "gpu/ipc/common/gpu_messages.h"
diff --git a/content/child/service_worker/service_worker_dispatcher_unittest.cc b/content/child/service_worker/service_worker_dispatcher_unittest.cc index 858df6f..0452229 100644 --- a/content/child/service_worker/service_worker_dispatcher_unittest.cc +++ b/content/child/service_worker/service_worker_dispatcher_unittest.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/macros.h" +#include "base/message_loop/message_loop.h" #include "content/child/service_worker/service_worker_dispatcher.h" #include "content/child/service_worker/service_worker_handle_reference.h" #include "content/child/service_worker/service_worker_provider_context.h"
diff --git a/content/public/browser/BUILD.gn b/content/public/browser/BUILD.gn index 5336b7a4..d52e4d2 100644 --- a/content/public/browser/BUILD.gn +++ b/content/public/browser/BUILD.gn
@@ -200,7 +200,6 @@ "render_view_host.h", "render_widget_host.h", "render_widget_host_view.h", - "render_widget_host_view_frame_subscriber.h", "render_widget_host_view_mac_delegate.h", "renderer_unresponsive_type.h", "resource_context.h",
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn index 59e4884e..8bdcc97 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn
@@ -433,7 +433,6 @@ "//device/sensors/public/cpp", "//device/usb/public/interfaces", "//device/vibration:mojo_bindings", - "//device/vr:mojo_bindings", "//gin", "//gpu", "//gpu/command_buffer/client:gles2_interface",
diff --git a/content/renderer/gpu/compositor_external_begin_frame_source.h b/content/renderer/gpu/compositor_external_begin_frame_source.h index 7075023e..2fe441c 100644 --- a/content/renderer/gpu/compositor_external_begin_frame_source.h +++ b/content/renderer/gpu/compositor_external_begin_frame_source.h
@@ -10,6 +10,7 @@ #include "base/compiler_specific.h" #include "base/macros.h" #include "base/memory/ref_counted.h" +#include "base/threading/non_thread_safe.h" #include "cc/scheduler/begin_frame_source.h" #include "content/renderer/gpu/compositor_forwarding_message_filter.h"
diff --git a/content/renderer/media/render_media_log_unittest.cc b/content/renderer/media/render_media_log_unittest.cc index 60d3139..905bec5 100644 --- a/content/renderer/media/render_media_log_unittest.cc +++ b/content/renderer/media/render_media_log_unittest.cc
@@ -5,6 +5,7 @@ #include <tuple> #include "base/macros.h" +#include "base/message_loop/message_loop.h" #include "base/test/simple_test_tick_clock.h" #include "base/test/test_mock_time_task_runner.h" #include "content/common/view_messages.h"
diff --git a/content/renderer/pepper/content_decryptor_delegate.cc b/content/renderer/pepper/content_decryptor_delegate.cc index aca96613..88126db9 100644 --- a/content/renderer/pepper/content_decryptor_delegate.cc +++ b/content/renderer/pepper/content_decryptor_delegate.cc
@@ -830,8 +830,13 @@ StringVar* session_id_string = StringVar::FromPPVar(session_id); DCHECK(session_id_string); - session_expiration_update_cb_.Run(session_id_string->value(), - ppapi::PPTimeToTime(new_expiry_time)); + // PPTimeToTime() converts exact 0 to base::Time::UnixEpoch, which is not + // desired here. We want to convert 0.0 to a null base::Time. + base::Time expiry_time; + if (new_expiry_time != 0.0) + expiry_time = ppapi::PPTimeToTime(new_expiry_time); + + session_expiration_update_cb_.Run(session_id_string->value(), expiry_time); } void ContentDecryptorDelegate::OnSessionClosed(PP_Var session_id) {
diff --git a/content/renderer/presentation/presentation_dispatcher.cc b/content/renderer/presentation/presentation_dispatcher.cc index 15753c3e..a5b4562f 100644 --- a/content/renderer/presentation/presentation_dispatcher.cc +++ b/content/renderer/presentation/presentation_dispatcher.cc
@@ -11,6 +11,7 @@ #include "base/bind.h" #include "base/logging.h" #include "base/memory/ptr_util.h" +#include "base/stl_util.h" #include "base/threading/thread_task_runner_handle.h" #include "content/public/common/presentation_constants.h" #include "content/public/renderer/render_frame.h"
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py index 4fc1674b..6beb835 100644 --- a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py +++ b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
@@ -353,6 +353,8 @@ ['win', 'passthrough', 'd3d11'], bug=671217) # angle bug ID self.Fail('WebglExtension_OES_texture_half_float_linear', ['win', 'passthrough', 'd3d11'], bug=1523) # angle bug ID + self.Fail('WebglExtension_WEBGL_draw_buffers', + ['win', 'passthrough', 'd3d11'], bug=1523) # angle bug ID # Win / Intel / Passthrough command decoder self.Flaky('conformance/renderbuffers/framebuffer-state-restoration.html',
diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn index e921374e..6b45c9d 100644 --- a/crypto/BUILD.gn +++ b/crypto/BUILD.gn
@@ -18,8 +18,6 @@ "crypto_export.h", "cssm_init.cc", "cssm_init.h", - "curve25519.cc", - "curve25519.h", "ec_private_key.cc", "ec_private_key.h", "ec_signature_creator.cc", @@ -134,7 +132,6 @@ test("crypto_unittests") { sources = [ "aead_unittest.cc", - "curve25519_unittest.cc", "ec_private_key_unittest.cc", "ec_signature_creator_unittest.cc", "encryptor_unittest.cc",
diff --git a/crypto/curve25519.cc b/crypto/curve25519.cc deleted file mode 100644 index e540927..0000000 --- a/crypto/curve25519.cc +++ /dev/null
@@ -1,27 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "crypto/curve25519.h" - -#include <stdint.h> - -#include "third_party/boringssl/src/include/openssl/curve25519.h" - -namespace crypto { - -namespace curve25519 { - -bool ScalarMult(const uint8_t* private_key, - const uint8_t* peer_public_key, - uint8_t* shared_key) { - return !!X25519(shared_key, private_key, peer_public_key); -} - -void ScalarBaseMult(const uint8_t* private_key, uint8_t* public_key) { - X25519_public_from_private(public_key, private_key); -} - -} // namespace curve25519 - -} // namespace crypto
diff --git a/crypto/curve25519.h b/crypto/curve25519.h deleted file mode 100644 index 534f0bfa..0000000 --- a/crypto/curve25519.h +++ /dev/null
@@ -1,56 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CRYPTO_CURVE25519_H -#define CRYPTO_CURVE25519_H - -#include <stddef.h> -#include <stdint.h> - -#include "crypto/crypto_export.h" - -namespace crypto { - -// Curve25519 implements the elliptic curve group known as Curve25519, as -// described in "Curve 25519: new Diffie-Hellman Speed Records", -// by D.J. Bernstein. Additional information is available at -// http://cr.yp.to/ecdh.html. -// -// TODO(davidben): Once iOS is switched to BoringSSL (https://crbug.com/338886), -// remove this file altogether and switch callers to using BoringSSL's -// curve25519.h directly. -namespace curve25519 { - -// kBytes is the number of bytes in the result of the Diffie-Hellman operation, -// which is an element of GF(2^255-19). -static const size_t kBytes = 32; - -// kScalarBytes is the number of bytes in an element of the scalar field: -// GF(2^252 + 27742317777372353535851937790883648493). -static const size_t kScalarBytes = 32; - -// ScalarMult computes the |shared_key| from |private_key| and -// |peer_public_key|. This method is a wrapper for |curve25519_donna()|. It -// calls that function with |private_key| as |secret| and |peer_public_key| as -// basepoint. |private_key| should be of length |kScalarBytes| and -// |peer_public_key| should be of length |kBytes|. It returns true on success -// and false if |peer_public_key| was invalid. -// See the "Computing shared secrets" section of http://cr.yp.to/ecdh.html. -CRYPTO_EXPORT bool ScalarMult(const uint8_t* private_key, - const uint8_t* peer_public_key, - uint8_t* shared_key); - -// ScalarBaseMult computes the |public_key| from |private_key|. This method is a -// wrapper for |curve25519_donna()|. It calls that function with |private_key| -// as |secret| and |kBasePoint| as basepoint. |private_key| should be of length -// |kScalarBytes|. See "Computing public keys" section of -// http://cr.yp.to/ecdh.html. -CRYPTO_EXPORT void ScalarBaseMult(const uint8_t* private_key, - uint8_t* public_key); - -} // namespace curve25519 - -} // namespace crypto - -#endif // CRYPTO_CURVE25519_H
diff --git a/crypto/curve25519_unittest.cc b/crypto/curve25519_unittest.cc deleted file mode 100644 index 15a9981..0000000 --- a/crypto/curve25519_unittest.cc +++ /dev/null
@@ -1,59 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "crypto/curve25519.h" - -#include <stdint.h> - -#include <string> - -#include "crypto/random.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace crypto { - -// Test that the basic shared key exchange identity holds: that both parties end -// up with the same shared key. This test starts with a fixed private key for -// two parties: alice and bob. Runs ScalarBaseMult and ScalarMult to compute -// public key and shared key for alice and bob. It asserts that alice and bob -// have the same shared key. -TEST(Curve25519, SharedKeyIdentity) { - uint8_t alice_private_key[curve25519::kScalarBytes] = {3}; - uint8_t bob_private_key[curve25519::kScalarBytes] = {5}; - - // Get public key for alice and bob. - uint8_t alice_public_key[curve25519::kBytes]; - curve25519::ScalarBaseMult(alice_private_key, alice_public_key); - - uint8_t bob_public_key[curve25519::kBytes]; - curve25519::ScalarBaseMult(bob_private_key, bob_public_key); - - // Get the shared key for alice, by using alice's private key and bob's - // public key. - uint8_t alice_shared_key[curve25519::kBytes]; - curve25519::ScalarMult(alice_private_key, bob_public_key, alice_shared_key); - - // Get the shared key for bob, by using bob's private key and alice's public - // key. - uint8_t bob_shared_key[curve25519::kBytes]; - curve25519::ScalarMult(bob_private_key, alice_public_key, bob_shared_key); - - // Computed shared key of alice and bob should be the same. - ASSERT_EQ(0, memcmp(alice_shared_key, bob_shared_key, curve25519::kBytes)); -} - -TEST(Curve25519, SmallOrder) { - static const uint8_t kSmallOrderPoint[32] = { - 0xe0, 0xeb, 0x7a, 0x7c, 0x3b, 0x41, 0xb8, 0xae, 0x16, 0x56, 0xe3, - 0xfa, 0xf1, 0x9f, 0xc4, 0x6a, 0xda, 0x09, 0x8d, 0xeb, 0x9c, 0x32, - 0xb1, 0xfd, 0x86, 0x62, 0x05, 0x16, 0x5f, 0x49, 0xb8, - }; - - uint8_t out[32], private_key[32]; - memset(private_key, 0x11, sizeof(private_key)); - - EXPECT_FALSE(curve25519::ScalarMult(private_key, kSmallOrderPoint, out)); -} - -} // namespace crypto
diff --git a/device/bluetooth/device_unittest.cc b/device/bluetooth/device_unittest.cc index 51e150ef..c2ca53f 100644 --- a/device/bluetooth/device_unittest.cc +++ b/device/bluetooth/device_unittest.cc
@@ -141,6 +141,7 @@ EXPECT_EQ(expected_success_callback_calls_, actual_success_callback_calls_); EXPECT_EQ(message_pipe_closed_, expect_device_service_deleted_); proxy_.reset(); + base::RunLoop().RunUntilIdle(); } protected:
diff --git a/device/u2f/u2f_apdu_command.cc b/device/u2f/u2f_apdu_command.cc index cd85482..2bb8efe 100644 --- a/device/u2f/u2f_apdu_command.cc +++ b/device/u2f/u2f_apdu_command.cc
@@ -9,8 +9,10 @@ scoped_refptr<U2fApduCommand> U2fApduCommand::CreateFromMessage( const std::vector<uint8_t>& message) { uint16_t data_length = 0; - size_t index = 0, response_length = 0; + size_t index = 0; + size_t response_length = 0; std::vector<uint8_t> data; + std::vector<uint8_t> suffix; if (message.size() < kApduMinHeader || message.size() > kApduMaxLength) return nullptr; @@ -59,14 +61,18 @@ // Defined in ISO7816-4 if (response_length == 0) response_length = kApduMaxResponseLength; + // Non-ISO7816-4 special legacy case where 2 suffix bytes are passed + // along with a version message + if (data_length == 0 && ins == kInsU2fVersion) + suffix = {0x0, 0x0}; } else { return nullptr; } break; } - return make_scoped_refptr( - new U2fApduCommand(cla, ins, p1, p2, response_length, std::move(data))); + return make_scoped_refptr(new U2fApduCommand( + cla, ins, p1, p2, response_length, std::move(data), std::move(suffix))); } // static @@ -98,6 +104,8 @@ encoded.push_back((response_length_ >> 8) & 0xff); encoded.push_back(response_length_ & 0xff); } + // Add suffix, if required, for legacy compatibility + encoded.insert(encoded.end(), suffix_.begin(), suffix_.end()); return encoded; } @@ -109,14 +117,76 @@ uint8_t p1, uint8_t p2, size_t response_length, - std::vector<uint8_t> data) + std::vector<uint8_t> data, + std::vector<uint8_t> suffix) : cla_(cla), ins_(ins), p1_(p1), p2_(p2), response_length_(response_length), - data_(std::move(data)) {} + data_(std::move(data)), + suffix_(std::move(suffix)) {} U2fApduCommand::~U2fApduCommand() {} +// static +scoped_refptr<U2fApduCommand> U2fApduCommand::CreateRegister( + const std::vector<uint8_t>& appid_digest, + const std::vector<uint8_t>& challenge_digest) { + if (appid_digest.size() != kAppIdDigestLen || + challenge_digest.size() != kChallengeDigestLen) { + return nullptr; + } + + scoped_refptr<U2fApduCommand> command = Create(); + std::vector<uint8_t> data(challenge_digest.begin(), challenge_digest.end()); + data.insert(data.end(), appid_digest.begin(), appid_digest.end()); + command->set_ins(kInsU2fEnroll); + command->set_p1(kP1TupRequiredConsumed); + command->set_data(data); + return command; +} + +// static +scoped_refptr<U2fApduCommand> U2fApduCommand::CreateVersion() { + scoped_refptr<U2fApduCommand> command = Create(); + command->set_ins(kInsU2fVersion); + command->set_response_length(kApduMaxResponseLength); + return command; +} + +// static +scoped_refptr<U2fApduCommand> U2fApduCommand::CreateLegacyVersion() { + scoped_refptr<U2fApduCommand> command = Create(); + command->set_ins(kInsU2fVersion); + command->set_response_length(kApduMaxResponseLength); + // Early U2F drafts defined the U2F version command in extended + // length ISO 7816-4 format so 2 additional 0x0 bytes are necessary. + // https://fidoalliance.org/specs/fido-u2f-v1.1-id-20160915/fido-u2f-raw-message-formats-v1.1-id-20160915.html#implementation-considerations + command->set_suffix(std::vector<uint8_t>(2, 0)); + return command; +} + +// static +scoped_refptr<U2fApduCommand> U2fApduCommand::CreateSign( + const std::vector<uint8_t>& appid_digest, + const std::vector<uint8_t>& challenge_digest, + const std::vector<uint8_t>& key_handle) { + if (appid_digest.size() != kAppIdDigestLen || + challenge_digest.size() != kChallengeDigestLen || + key_handle.size() > kMaxKeyHandleLength) { + return nullptr; + } + + scoped_refptr<U2fApduCommand> command = Create(); + std::vector<uint8_t> data(challenge_digest.begin(), challenge_digest.end()); + data.insert(data.end(), appid_digest.begin(), appid_digest.end()); + data.push_back(static_cast<uint8_t>(key_handle.size())); + data.insert(data.end(), key_handle.begin(), key_handle.end()); + command->set_ins(kInsU2fSign); + command->set_p1(kP1TupRequiredConsumed); + command->set_data(data); + return command; +} + } // namespace device
diff --git a/device/u2f/u2f_apdu_command.h b/device/u2f/u2f_apdu_command.h index 06cd95e..98b53ec2 100644 --- a/device/u2f/u2f_apdu_command.h +++ b/device/u2f/u2f_apdu_command.h
@@ -37,6 +37,17 @@ void set_response_length(size_t response_length) { response_length_ = response_length; } + void set_suffix(const std::vector<uint8_t>& suffix) { suffix_ = suffix; } + static scoped_refptr<U2fApduCommand> CreateRegister( + const std::vector<uint8_t>& appid_digest, + const std::vector<uint8_t>& challenge_digest); + static scoped_refptr<U2fApduCommand> CreateVersion(); + // Early U2F drafts defined a non-ISO 7816-4 conforming layout + static scoped_refptr<U2fApduCommand> CreateLegacyVersion(); + static scoped_refptr<U2fApduCommand> CreateSign( + const std::vector<uint8_t>& appid_digest, + const std::vector<uint8_t>& challenge_digest, + const std::vector<uint8_t>& key_handle); private: friend class base::RefCountedThreadSafe<U2fApduCommand>; @@ -44,6 +55,10 @@ FRIEND_TEST_ALL_PREFIXES(U2fApduTest, TestDeserializeBasic); FRIEND_TEST_ALL_PREFIXES(U2fApduTest, TestDeserializeComplex); FRIEND_TEST_ALL_PREFIXES(U2fApduTest, TestSerializeEdgeCases); + FRIEND_TEST_ALL_PREFIXES(U2fApduTest, TestCreateSign); + FRIEND_TEST_ALL_PREFIXES(U2fApduTest, TestCreateRegister); + FRIEND_TEST_ALL_PREFIXES(U2fApduTest, TestCreateVersion); + FRIEND_TEST_ALL_PREFIXES(U2fApduTest, TestCreateLegacyVersion); static constexpr size_t kApduMinHeader = 4; static constexpr size_t kApduMaxHeader = 7; @@ -55,6 +70,18 @@ static constexpr size_t kApduMaxResponseLength = 65536; static constexpr size_t kApduMaxLength = kApduMaxDataLength + kApduMaxHeader + 2; + // APDU instructions + static constexpr uint8_t kInsU2fEnroll = 0x01; + static constexpr uint8_t kInsU2fSign = 0x02; + static constexpr uint8_t kInsU2fVersion = 0x03; + // P1 instructions + static constexpr uint8_t kP1TupRequired = 0x01; + static constexpr uint8_t kP1TupConsumed = 0x02; + static constexpr uint8_t kP1TupRequiredConsumed = + kP1TupRequired | kP1TupConsumed; + static constexpr size_t kMaxKeyHandleLength = 255; + static constexpr size_t kChallengeDigestLen = 32; + static constexpr size_t kAppIdDigestLen = 32; U2fApduCommand(); U2fApduCommand(uint8_t cla, @@ -62,7 +89,8 @@ uint8_t p1, uint8_t p2, size_t response_length, - std::vector<uint8_t> data); + std::vector<uint8_t> data, + std::vector<uint8_t> suffix); ~U2fApduCommand(); uint8_t cla_; @@ -71,6 +99,7 @@ uint8_t p2_; size_t response_length_; std::vector<uint8_t> data_; + std::vector<uint8_t> suffix_; }; } // namespace device
diff --git a/device/u2f/u2f_apdu_unittest.cc b/device/u2f/u2f_apdu_unittest.cc index a0435eb..36603196 100644 --- a/device/u2f/u2f_apdu_unittest.cc +++ b/device/u2f/u2f_apdu_unittest.cc
@@ -181,4 +181,75 @@ U2fApduCommand::CreateFromMessage(cmd->GetEncodedCommand()) ->GetEncodedCommand())); } + +TEST_F(U2fApduTest, TestCreateSign) { + std::vector<uint8_t> appid(U2fApduCommand::kAppIdDigestLen, 0x01); + std::vector<uint8_t> challenge(U2fApduCommand::kChallengeDigestLen, 0xff); + std::vector<uint8_t> key_handle(U2fApduCommand::kMaxKeyHandleLength); + + scoped_refptr<U2fApduCommand> cmd = + U2fApduCommand::CreateSign(appid, challenge, key_handle); + ASSERT_NE(nullptr, cmd); + EXPECT_THAT(U2fApduCommand::CreateFromMessage(cmd->GetEncodedCommand()) + ->GetEncodedCommand(), + testing::ContainerEq(cmd->GetEncodedCommand())); + // Expect null result with incorrectly sized key handle + key_handle.push_back(0x0f); + cmd = U2fApduCommand::CreateSign(appid, challenge, key_handle); + EXPECT_EQ(nullptr, cmd); + key_handle.pop_back(); + // Expect null result with incorrectly sized appid + appid.pop_back(); + cmd = U2fApduCommand::CreateSign(appid, challenge, key_handle); + EXPECT_EQ(nullptr, cmd); + appid.push_back(0xff); + // Expect null result with incorrectly sized challenge + challenge.push_back(0x0); + cmd = U2fApduCommand::CreateSign(appid, challenge, key_handle); + EXPECT_EQ(nullptr, cmd); +} + +TEST_F(U2fApduTest, TestCreateRegister) { + std::vector<uint8_t> appid(U2fApduCommand::kAppIdDigestLen, 0x01); + std::vector<uint8_t> challenge(U2fApduCommand::kChallengeDigestLen, 0xff); + scoped_refptr<U2fApduCommand> cmd = + U2fApduCommand::CreateRegister(appid, challenge); + ASSERT_NE(nullptr, cmd); + EXPECT_THAT(U2fApduCommand::CreateFromMessage(cmd->GetEncodedCommand()) + ->GetEncodedCommand(), + testing::ContainerEq(cmd->GetEncodedCommand())); + // Expect null result with incorrectly sized appid + appid.push_back(0xff); + cmd = U2fApduCommand::CreateRegister(appid, challenge); + EXPECT_EQ(nullptr, cmd); + appid.pop_back(); + // Expect null result with incorrectly sized challenge + challenge.push_back(0xff); + cmd = U2fApduCommand::CreateRegister(appid, challenge); + EXPECT_EQ(nullptr, cmd); +} + +TEST_F(U2fApduTest, TestCreateVersion) { + scoped_refptr<U2fApduCommand> cmd = U2fApduCommand::CreateVersion(); + std::vector<uint8_t> expected = { + 0x0, U2fApduCommand::kInsU2fVersion, 0x0, 0x0, 0x0, 0x0, 0x0}; + + EXPECT_THAT(expected, testing::ContainerEq(cmd->GetEncodedCommand())); + EXPECT_THAT(U2fApduCommand::CreateFromMessage(cmd->GetEncodedCommand()) + ->GetEncodedCommand(), + testing::ContainerEq(cmd->GetEncodedCommand())); +} + +TEST_F(U2fApduTest, TestCreateLegacyVersion) { + scoped_refptr<U2fApduCommand> cmd = U2fApduCommand::CreateLegacyVersion(); + // Legacy version command contains 2 extra null bytes compared to ISO 7816-4 + // format + std::vector<uint8_t> expected = { + 0x0, U2fApduCommand::kInsU2fVersion, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; + + EXPECT_THAT(expected, testing::ContainerEq(cmd->GetEncodedCommand())); + EXPECT_THAT(U2fApduCommand::CreateFromMessage(cmd->GetEncodedCommand()) + ->GetEncodedCommand(), + testing::ContainerEq(cmd->GetEncodedCommand())); +} } // namespace device
diff --git a/device/usb/mojo/device_impl_unittest.cc b/device/usb/mojo/device_impl_unittest.cc index f4d8b933..a9e44b38 100644 --- a/device/usb/mojo/device_impl_unittest.cc +++ b/device/usb/mojo/device_impl_unittest.cc
@@ -156,6 +156,8 @@ ~USBDeviceImplTest() override {} + void TearDown() override { base::RunLoop().RunUntilIdle(); } + protected: MockPermissionProvider& permission_provider() { return permission_provider_; } MockUsbDevice& mock_device() { return *mock_device_.get(); }
diff --git a/device/vr/BUILD.gn b/device/vr/BUILD.gn index 1420d6e..622258f0 100644 --- a/device/vr/BUILD.gn +++ b/device/vr/BUILD.gn
@@ -9,11 +9,25 @@ import("//build/config/android/rules.gni") # For generate_jni(). } -if (enable_webvr) { - component("vr") { - output_name = "device_vr" +component("vr") { + output_name = "device_vr" - sources = [ + sources = [ + "vr_export.h", + ] + defines = [ "DEVICE_VR_IMPLEMENTATION" ] + deps = [ + ":mojo_bindings", + ] + + if (!enable_webvr) { + sources += [ + # We need to include an empty .cc file so that mac and windows don't fall over when trying to + # compile this when webvr is disabled. + "empty.cc", + ] + } else { + sources += [ "vr_device.cc", "vr_device.h", "vr_device_manager.cc", @@ -26,14 +40,12 @@ "vr_service_impl.h", ] - deps = [ - ":mojo_bindings", + deps += [ "//base", "//mojo/public/cpp/bindings", "//ui/gfx", ] - defines = [ "DEVICE_VR_IMPLEMENTATION" ] if (is_android && (current_cpu == "arm" || current_cpu == "arm64")) { sources += [ "android/gvr/gvr_delegate.cc", @@ -55,7 +67,9 @@ configs += [ "//third_party/gvr-android-sdk:libgvr_config" ] } } +} +if (enable_webvr) { static_library("fakes") { testonly = true @@ -77,19 +91,6 @@ "//mojo/public/cpp/bindings", ] } -} else { - component("mojo_only") { - sources = [ - # We need to include an empty .cc file so that mac and windows don't fall over when trying to - # compile this. - "empty.cc", - "vr_export.h", - ] - defines = [ "DEVICE_VR_IMPLEMENTATION" ] - public_deps = [ - ":mojo_bindings", - ] - } } mojom("mojo_bindings") {
diff --git a/extensions/browser/api/idle/OWNERS b/extensions/browser/api/idle/OWNERS index 859c2c6..d016606a 100644 --- a/extensions/browser/api/idle/OWNERS +++ b/extensions/browser/api/idle/OWNERS
@@ -1 +1,3 @@ dcheng@chromium.org + +# COMPONENT: Platform>Extensions>API
diff --git a/extensions/renderer/script_context_set.h b/extensions/renderer/script_context_set.h index 9f47d0a..049d315e 100644 --- a/extensions/renderer/script_context_set.h +++ b/extensions/renderer/script_context_set.h
@@ -75,6 +75,12 @@ // Returns the ScriptContext corresponding to the V8 context that created the // given |object|. + // Note: The provided |object| may belong to a v8::Context in another frame, + // as can happen when a parent frame uses an object of an embedded iframe. + // In this case, there may be no associated ScriptContext, since the child + // frame can be hosted in another process. Thus, callers of this need to + // null-check the result (and should also always check whether or not the + // context has access to the other context). static ScriptContext* GetContextByObject(const v8::Local<v8::Object>& object); // Synchronously runs |callback| with each ScriptContext that belongs to
diff --git a/extensions/renderer/v8_context_native_handler.cc b/extensions/renderer/v8_context_native_handler.cc index 85c3c37..a24be17 100644 --- a/extensions/renderer/v8_context_native_handler.cc +++ b/extensions/renderer/v8_context_native_handler.cc
@@ -48,7 +48,7 @@ CHECK(args[0]->IsObject()); ScriptContext* context = ScriptContextSet::GetContextByObject( v8::Local<v8::Object>::Cast(args[0])); - if (blink::WebFrame::scriptCanAccess(context->web_frame())) + if (context && blink::WebFrame::scriptCanAccess(context->web_frame())) args.GetReturnValue().Set(context->module_system()->NewInstance()); }
diff --git a/gpu/ipc/service/gpu_channel_manager.cc b/gpu/ipc/service/gpu_channel_manager.cc index 46ce111..a4882cf 100644 --- a/gpu/ipc/service/gpu_channel_manager.cc +++ b/gpu/ipc/service/gpu_channel_manager.cc
@@ -11,6 +11,7 @@ #include "base/command_line.h" #include "base/location.h" #include "base/memory/ptr_util.h" +#include "base/message_loop/message_loop.h" #include "base/single_thread_task_runner.h" #include "base/threading/thread_task_runner_handle.h" #include "build/build_config.h"
diff --git a/ios/build/bots/chromium.fyi/ClangToTiOS.json b/ios/build/bots/chromium.fyi/ClangToTiOS.json index b2451a4..2b5ab01 100644 --- a/ios/build/bots/chromium.fyi/ClangToTiOS.json +++ b/ios/build/bots/chromium.fyi/ClangToTiOS.json
@@ -1,7 +1,4 @@ { - "owners": [ - "hans" - ], "comments": [ "Clang tip-of-tree builder for iOS." ], @@ -9,6 +6,7 @@ "gn_args": [ "ios_enable_code_signing=false", "is_component_build=false", + "is_debug=false", "llvm_force_head_revision=true", "target_cpu=\"arm\"", "target_os=\"ios\"" @@ -19,7 +17,6 @@ "env": { "LLVM_FORCE_HEAD_REVISION": "YES" }, - "compiler": "ninja", "configuration": "Release", "sdk": "iphoneos10.0", "tests": [
diff --git a/ios/build/bots/chromium.fyi/EarlGreyiOS.json b/ios/build/bots/chromium.fyi/EarlGreyiOS.json index 6815747..0bbb157 100644 --- a/ios/build/bots/chromium.fyi/EarlGreyiOS.json +++ b/ios/build/bots/chromium.fyi/EarlGreyiOS.json
@@ -1,7 +1,4 @@ { - "owners": [ - "huangml" - ], "comments": [ "Tests for 64-bit iOS 10.0 simulators." ], @@ -9,11 +6,11 @@ "gn_args": [ "goma_dir=\"$(goma_dir)\"", "is_component_build=false", + "is_debug=true", "target_cpu=\"x64\"", "target_os=\"ios\"", "use_goma=true" ], - "compiler": "ninja", "configuration": "Debug", "sdk": "iphonesimulator10.0", "tests": [
diff --git a/ios/build/bots/chromium.fyi/GomaCanaryiOS.json b/ios/build/bots/chromium.fyi/GomaCanaryiOS.json index 69b9df8..51de9b4 100644 --- a/ios/build/bots/chromium.fyi/GomaCanaryiOS.json +++ b/ios/build/bots/chromium.fyi/GomaCanaryiOS.json
@@ -1,7 +1,4 @@ { - "owners": [ - "yyanagisawa" - ], "comments": [ "Goma canary builder for iOS." ], @@ -10,6 +7,7 @@ "goma_dir=\"$(goma_dir)\"", "ios_enable_code_signing=false", "is_component_build=false", + "is_debug=false", "target_cpu=\"arm\"", "target_os=\"ios\"", "use_goma=true" @@ -17,8 +15,8 @@ "additional_compile_targets": [ "all" ], + "clobber": true, "use_goma_canary": true, - "compiler": "ninja", "configuration": "Release", "sdk": "iphoneos10.0", "tests": [
diff --git a/ios/build/bots/chromium.fyi/ios-simulator-cronet.json b/ios/build/bots/chromium.fyi/ios-simulator-cronet.json index 6648435..23804e5 100644 --- a/ios/build/bots/chromium.fyi/ios-simulator-cronet.json +++ b/ios/build/bots/chromium.fyi/ios-simulator-cronet.json
@@ -13,11 +13,11 @@ "goma_dir=\"$(goma_dir)\"", "is_component_build=false", "is_cronet_build=true", + "is_debug=true", "target_cpu=\"x64\"", "target_os=\"ios\"", "use_platform_icu_alternatives=true" ], - "compiler": "ninja", "configuration": "Debug", "sdk": "iphonesimulator10.0", "tests": [
diff --git a/ios/build/bots/chromium.fyi/ios-simulator.json b/ios/build/bots/chromium.fyi/ios-simulator.json index cd3a9d5..de6c3e1 100644 --- a/ios/build/bots/chromium.fyi/ios-simulator.json +++ b/ios/build/bots/chromium.fyi/ios-simulator.json
@@ -1,7 +1,4 @@ { - "owners": [ - "smut" - ], "comments": [ "Runs tests on @3x, @2x, 64-bit, 32-bit, phone, tablet, iOS 10, and iOS 9." ], @@ -16,7 +13,6 @@ "target_os=\"ios\"", "use_goma=true" ], - "compiler": "ninja", "configuration": "Debug", "sdk": "iphonesimulator10.0", "tests": [
diff --git a/ios/build/bots/chromium.mac/ios-device-xcode-clang.json b/ios/build/bots/chromium.mac/ios-device-xcode-clang.json index 9d3e7e24..0102de56 100644 --- a/ios/build/bots/chromium.mac/ios-device-xcode-clang.json +++ b/ios/build/bots/chromium.mac/ios-device-xcode-clang.json
@@ -1,8 +1,4 @@ { - "owners": [ - "sdefresne", - "smut" - ], "comments": [ "Builder for 32-bit devices.", "Build is performed with gn+ninja." @@ -13,7 +9,7 @@ "goma_dir=\"$(goma_dir)\"", "ios_enable_code_signing=false", "is_component_build=false", - "is_debug=true", + "is_debug=false", "target_cpu=\"arm\"", "target_os=\"ios\"", "use_goma=true", @@ -22,7 +18,6 @@ "additional_compile_targets": [ "all" ], - "compiler": "ninja", "configuration": "Release", "sdk": "iphoneos10.0", "tests": [
diff --git a/ios/build/bots/chromium.mac/ios-device.json b/ios/build/bots/chromium.mac/ios-device.json index 4873c397..c03de84 100644 --- a/ios/build/bots/chromium.mac/ios-device.json +++ b/ios/build/bots/chromium.mac/ios-device.json
@@ -1,8 +1,4 @@ { - "owners": [ - "dpranke", - "smut" - ], "comments": [ "Builder for 32-bit devices.", "Build is performed with gn+ninja." @@ -13,7 +9,7 @@ "goma_dir=\"$(goma_dir)\"", "ios_enable_code_signing=false", "is_component_build=false", - "is_debug=true", + "is_debug=false", "target_cpu=\"arm\"", "target_os=\"ios\"", "use_goma=true" @@ -21,7 +17,6 @@ "additional_compile_targets": [ "all" ], - "compiler": "ninja", "configuration": "Release", "sdk": "iphoneos10.0", "tests": [
diff --git a/ios/build/bots/chromium.mac/ios-simulator-cronet.json b/ios/build/bots/chromium.mac/ios-simulator-cronet.json index 3505df0..23804e5 100644 --- a/ios/build/bots/chromium.mac/ios-simulator-cronet.json +++ b/ios/build/bots/chromium.mac/ios-simulator-cronet.json
@@ -1,7 +1,4 @@ { - "owners": [ - "smut" - ], "comments": [ "Cronet tests for 32- and 64-bit iOS 9.0 simulators.", "Tests run on iPhone 5s (64-bit) and iPad Retina (32-bit)." @@ -16,11 +13,11 @@ "goma_dir=\"$(goma_dir)\"", "is_component_build=false", "is_cronet_build=true", + "is_debug=true", "target_cpu=\"x64\"", "target_os=\"ios\"", "use_platform_icu_alternatives=true" ], - "compiler": "ninja", "configuration": "Debug", "sdk": "iphonesimulator10.0", "tests": [
diff --git a/ios/build/bots/chromium.mac/ios-simulator-xcode-clang.json b/ios/build/bots/chromium.mac/ios-simulator-xcode-clang.json index 9a6ef66..41c0e75 100644 --- a/ios/build/bots/chromium.mac/ios-simulator-xcode-clang.json +++ b/ios/build/bots/chromium.mac/ios-simulator-xcode-clang.json
@@ -1,8 +1,4 @@ { - "owners": [ - "sdefresne", - "smut" - ], "comments": [ "Tests for 64-bit iOS 10.0 simulators.", "Tests run on iPhone 6s and iPad Air 2, both 64-bit.", @@ -23,7 +19,6 @@ "additional_compile_targets": [ "all" ], - "compiler": "ninja", "configuration": "Debug", "sdk": "iphonesimulator10.0", "tests": [
diff --git a/ios/build/bots/chromium.mac/ios-simulator.json b/ios/build/bots/chromium.mac/ios-simulator.json index 4ab2f8d0..2b810acc 100644 --- a/ios/build/bots/chromium.mac/ios-simulator.json +++ b/ios/build/bots/chromium.mac/ios-simulator.json
@@ -1,8 +1,4 @@ { - "owners": [ - "dpranke", - "smut" - ], "comments": [ "Tests for 64-bit iOS 10.0 simulators.", "Tests run on iPhone 6s and iPad Air 2, both 64-bit.", @@ -22,7 +18,6 @@ "additional_compile_targets": [ "all" ], - "compiler": "ninja", "configuration": "Debug", "sdk": "iphonesimulator10.0", "tests": [
diff --git a/ios/chrome/app/strings/resources/ios_strings_am.xtb b/ios/chrome/app/strings/resources/ios_strings_am.xtb index 9856b084..b59b98da 100644 --- a/ios/chrome/app/strings/resources/ios_strings_am.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_am.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">እንደ <ph name="EMAIL" /> ሆነው ገብተዋል። የእርስዎ ውሂብ በእርስዎ የስምረት የይለፍ ቃል ተመስጥሯል። ስምረትን ለመጀመር ያስገቡት።</translation> -<translation id="4728558894243024398">የመሣሪያ ስርዓት</translation> <translation id="473775607612524610">አዘምን</translation> <translation id="4750394297954878236">የአስተያየት ጥቆማዎች</translation> <translation id="4773461607542755386">ይህ ገጽ በ<ph name="APP_NAME" /> መተግበሪያ ውስጥ ይከፈት?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ar.xtb b/ios/chrome/app/strings/resources/ios_strings_ar.xtb index cf74df16..2fc174fa 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ar.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ar.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">تم تسجيل الدخول كحساب <ph name="EMAIL" /> تم تشفير بياناتك باستخدام عبارة مرور المزامنة. أدخلها لبدء المزامنة.</translation> -<translation id="4728558894243024398">النظام الأساسي</translation> <translation id="473775607612524610">تحديث</translation> <translation id="4750394297954878236">الاقتراحات</translation> <translation id="4773461607542755386">هل تريد فتح هذه الصفحة في تطبيق <ph name="APP_NAME" />؟</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_bg.xtb b/ios/chrome/app/strings/resources/ios_strings_bg.xtb index c190129..0243fd6 100644 --- a/ios/chrome/app/strings/resources/ios_strings_bg.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_bg.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Влезли сте като <ph name="EMAIL" />. Данните ви са шифровани с пропуска ви за синхронизиране. Въведете го, за да стартирате синхронизирането.</translation> -<translation id="4728558894243024398">Платформа</translation> <translation id="473775607612524610">Актуализиране</translation> <translation id="4750394297954878236">Предложения</translation> <translation id="4773461607542755386">Да се отвори ли стр. в приложението <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_bn.xtb b/ios/chrome/app/strings/resources/ios_strings_bn.xtb index b752e06..da8b20e 100644 --- a/ios/chrome/app/strings/resources/ios_strings_bn.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_bn.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315"><ph name="EMAIL" /> হিসেবে প্রবেশ করুন করেছেন। আপনার সিঙ্ক পাসফ্রেজের মাধ্যমে আপনার ডেটা এনক্রিপটেড হয়েছে। সিঙ্ক শুরু করতে এটি লিখুন।</translation> -<translation id="4728558894243024398">প্ল্যাটফর্ম</translation> <translation id="473775607612524610">আপডেট</translation> <translation id="4750394297954878236">প্রস্তাবনা</translation> <translation id="4773461607542755386">এই পৃষ্ঠাটি <ph name="APP_NAME" /> অ্যাপ্লিকেশানে খুলবেন?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ca.xtb b/ios/chrome/app/strings/resources/ios_strings_ca.xtb index 328704c..4f008c2 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ca.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ca.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Heu iniciat la sessió com a <ph name="EMAIL" />. Les vostres dades estan encriptades amb la vostra frase de contrasenya de sincronització. Introduïu-la per començar la sincronització.</translation> -<translation id="4728558894243024398">Plataforma</translation> <translation id="473775607612524610">Actualitza</translation> <translation id="4750394297954878236">Suggeriments</translation> <translation id="4773461607542755386">Voleu obrir aquesta pàgina a l'aplicació <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_cs.xtb b/ios/chrome/app/strings/resources/ios_strings_cs.xtb index cab46fb..50ff870 100644 --- a/ios/chrome/app/strings/resources/ios_strings_cs.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_cs.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Jste přihlášeni jako <ph name="EMAIL" />. Vaše data jsou šifrována pomocí heslové fráze pro synchronizaci. Chcete-li zahájit synchronizaci, zadejte ji.</translation> -<translation id="4728558894243024398">Platforma</translation> <translation id="473775607612524610">Aktualizovat</translation> <translation id="4750394297954878236">Návrhy</translation> <translation id="4773461607542755386">Otevřít tuto stránku v aplikaci <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_da.xtb b/ios/chrome/app/strings/resources/ios_strings_da.xtb index 5c73a9a..dcdd1a70 100644 --- a/ios/chrome/app/strings/resources/ios_strings_da.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_da.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Logget ind som <ph name="EMAIL" />. Dine data er krypteret med din adgangssætning til synkronisering. Indtast den for at starte synkroniseringen.</translation> -<translation id="4728558894243024398">Platform</translation> <translation id="473775607612524610">Opdater</translation> <translation id="4750394297954878236">Forslag</translation> <translation id="4773461607542755386">Skal denne side åbnes i appen <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_de.xtb b/ios/chrome/app/strings/resources/ios_strings_de.xtb index 99576fe8..29e8c7d 100644 --- a/ios/chrome/app/strings/resources/ios_strings_de.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_de.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Angemeldet als <ph name="EMAIL" />. Ihre Daten sind mit Ihrer Synchronisierungspassphrase verschlüsselt. Geben Sie diese ein, um die Synchronisierung zu starten.</translation> -<translation id="4728558894243024398">Plattform</translation> <translation id="473775607612524610">Aktualisieren</translation> <translation id="4750394297954878236">Vorschläge</translation> <translation id="4773461607542755386">Diese Seite in <ph name="APP_NAME" /> öffnen?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_el.xtb b/ios/chrome/app/strings/resources/ios_strings_el.xtb index cd11ab2b1..2c645c9 100644 --- a/ios/chrome/app/strings/resources/ios_strings_el.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_el.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Σύνδεση ως <ph name="EMAIL" />. Τα δεδομένα σας είναι κρυπτογραφημένα με τη δική σας φράση πρόσβασης συγχρονισμού. Πληκτρολογήστε την για να ξεκινήσει ο συγχρονισμός.</translation> -<translation id="4728558894243024398">Πλατφόρμα</translation> <translation id="473775607612524610">Ενημέρωση</translation> <translation id="4750394297954878236">Προτάσεις</translation> <translation id="4773461607542755386">Άνοιγμα αυτής της σελίδας στην εφαρμ. <ph name="APP_NAME" />;</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_en-GB.xtb b/ios/chrome/app/strings/resources/ios_strings_en-GB.xtb index 5c28251..047c3f1 100644 --- a/ios/chrome/app/strings/resources/ios_strings_en-GB.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_en-GB.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Signed in as <ph name="EMAIL" />. Your data is encrypted with your sync passphrase. Enter it to start sync.</translation> -<translation id="4728558894243024398">Platform</translation> <translation id="473775607612524610">Update</translation> <translation id="4750394297954878236">Suggestions</translation> <translation id="4773461607542755386">Open this page in the <ph name="APP_NAME" /> app?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_es-419.xtb b/ios/chrome/app/strings/resources/ios_strings_es-419.xtb index 348b10d..4940119 100644 --- a/ios/chrome/app/strings/resources/ios_strings_es-419.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_es-419.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Accediste como <ph name="EMAIL" />. Tus datos están encriptados con tu frase de contraseña para sincronización. Debes ingresarla para iniciar la sincronización.</translation> -<translation id="4728558894243024398">Plataforma</translation> <translation id="473775607612524610">Actualizar</translation> <translation id="4750394297954878236">Sugerencias</translation> <translation id="4773461607542755386">¿Abrir esta página en la aplicación <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_es.xtb b/ios/chrome/app/strings/resources/ios_strings_es.xtb index c82e577..6529717 100644 --- a/ios/chrome/app/strings/resources/ios_strings_es.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_es.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Has iniciado sesión como <ph name="EMAIL" />. Tus datos se han cifrado con tu frase de contraseña de sincronización. Introdúcela para iniciar la sincronización.</translation> -<translation id="4728558894243024398">Plataforma</translation> <translation id="473775607612524610">Actualizar</translation> <translation id="4750394297954878236">Sugerencias</translation> <translation id="4773461607542755386">¿Abrir esta página en la aplicación <ph name="APP_NAME" />?</translation> @@ -399,7 +398,7 @@ <translation id="8904976895050290827">Sincronización de Chrome</translation> <translation id="895541991026785598">Notificar un error</translation> <translation id="8971089644512329999">Entendido</translation> -<translation id="8981454092730389528">Controles de actividad de Google</translation> +<translation id="8981454092730389528">Controles de la actividad de tu cuenta de Google</translation> <translation id="8985320356172329008">Has iniciado sesión en Google como</translation> <translation id="902659348151742535">Google puede utilizar tu historial de navegación para personalizar la Búsqueda y otros servicios de Google.</translation> <translation id="9034759925968272072">No se cerrará la sesión en tu cuenta de Google. Es posible que tu cuenta de Google tenga otras formas del historial de navegación en la página <ph name="BEGIN_LINK" />history.google.com<ph name="END_LINK" />.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_et.xtb b/ios/chrome/app/strings/resources/ios_strings_et.xtb index f533fdc..22a9d67 100644 --- a/ios/chrome/app/strings/resources/ios_strings_et.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_et.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Sisse logitud kasutajana <ph name="EMAIL" />. Teie andmed on krüpteeritud teie sünkroonimisparooliga. Sisestage see sünkroonimise alustamiseks.</translation> -<translation id="4728558894243024398">Platvorm</translation> <translation id="473775607612524610">Värskenda</translation> <translation id="4750394297954878236">Soovitused</translation> <translation id="4773461607542755386">Kas avada see leht rakenduses <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_fa.xtb b/ios/chrome/app/strings/resources/ios_strings_fa.xtb index c11207b9..4c849ad 100644 --- a/ios/chrome/app/strings/resources/ios_strings_fa.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_fa.xtb
@@ -189,7 +189,6 @@ <translation id="4666531726415300315">ورود به سیستم بهعنوان <ph name="EMAIL" />. دادههای شما با عبارت عبور همگامسازی رمزگذاری میشود. برای شروع همگامسازی آن را وارد کنید.</translation> -<translation id="4728558894243024398">پلت فورم</translation> <translation id="473775607612524610">بهروزرسانی</translation> <translation id="4750394297954878236">پیشنهادات</translation> <translation id="4773461607542755386">این صفحه در برنامه <ph name="APP_NAME" /> باز شود؟</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_fi.xtb b/ios/chrome/app/strings/resources/ios_strings_fi.xtb index e29096061..207b070 100644 --- a/ios/chrome/app/strings/resources/ios_strings_fi.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_fi.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Olet kirjautunut sisään tilillä <ph name="EMAIL" />. Tietosi salataan synkronoinnin tunnuslauseesi avulla. Aloita synkronointi antamalla tunnuslause.</translation> -<translation id="4728558894243024398">Käyttöympäristö</translation> <translation id="473775607612524610">Päivitä</translation> <translation id="4750394297954878236">Ehdotukset</translation> <translation id="4773461607542755386">Avataanko tämä sivu sovelluksessa <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_fil.xtb b/ios/chrome/app/strings/resources/ios_strings_fil.xtb index f7e006a7..5655fd8 100644 --- a/ios/chrome/app/strings/resources/ios_strings_fil.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_fil.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Naka-sign in bilang <ph name="EMAIL" />. Na-encrypt ang iyong data gamit ang iyong passphrase sa pag-sync. Ilagay ito upang simulan ang pag-sync.</translation> -<translation id="4728558894243024398">Platform</translation> <translation id="473775607612524610">Mag-update</translation> <translation id="4750394297954878236">Mga Suhestyon</translation> <translation id="4773461607542755386">Buksan ang pahinang ito sa <ph name="APP_NAME" /> app?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_fr.xtb b/ios/chrome/app/strings/resources/ios_strings_fr.xtb index c9a1b5b..8af75f6 100644 --- a/ios/chrome/app/strings/resources/ios_strings_fr.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_fr.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Connecté en tant que <ph name="EMAIL" />. Vos données sont chiffrées avec votre phrase secrète de synchronisation. Saisissez-la pour lancer la synchronisation.</translation> -<translation id="4728558894243024398">Plate-forme</translation> <translation id="473775607612524610">Mettre à jour</translation> <translation id="4750394297954878236">Suggestions</translation> <translation id="4773461607542755386">Ouvrir cette page dans l'application <ph name="APP_NAME" /> ?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_gu.xtb b/ios/chrome/app/strings/resources/ios_strings_gu.xtb index 07e84d9..5e0a1a4 100644 --- a/ios/chrome/app/strings/resources/ios_strings_gu.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_gu.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315"><ph name="EMAIL" /> તરીકે સાઇન ઇન થયાં. તમારો ડેટા તમારા સમન્વયન પાસફ્રેઝ સાથે એન્ક્રિપ્ટ કરવામાં આવ્યો છે. સમન્વયન શરૂ કરવા માટે તે દાખલ કરો.</translation> -<translation id="4728558894243024398">પ્લેટફોર્મ</translation> <translation id="473775607612524610">અપડેટ કરો</translation> <translation id="4750394297954878236">સૂચનો</translation> <translation id="4773461607542755386">આ પૃષ્ઠને <ph name="APP_NAME" /> એપ્લિકેશનમાં ખોલીએ?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_hi.xtb b/ios/chrome/app/strings/resources/ios_strings_hi.xtb index c21de993..891494d 100644 --- a/ios/chrome/app/strings/resources/ios_strings_hi.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_hi.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315"><ph name="EMAIL" /> के रूप में प्रवेश किया हुआ. आपका डेटा आपके समन्वयन पासफ़्रेज़ के साथ एन्क्रिप्ट किया गया है. समन्वयन शुरू करने के लिए इसे डालें.</translation> -<translation id="4728558894243024398">प्लेटफ़ॉर्म</translation> <translation id="473775607612524610">अपडेट करें</translation> <translation id="4750394297954878236">सुझाव</translation> <translation id="4773461607542755386">इस पेज को <ph name="APP_NAME" /> में खोलें?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_hr.xtb b/ios/chrome/app/strings/resources/ios_strings_hr.xtb index fbf16c0..18a826a 100644 --- a/ios/chrome/app/strings/resources/ios_strings_hr.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_hr.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Prijavljeni ste kao <ph name="EMAIL" />. Vaši su podaci šifrirani vašom šifrom za sinkronizaciju. Unesite je da biste pokrenuli sinkronizaciju.</translation> -<translation id="4728558894243024398">Platforma</translation> <translation id="473775607612524610">Ažuriraj</translation> <translation id="4750394297954878236">Prijedlozi</translation> <translation id="4773461607542755386">Želite li otvoriti tu stranicu u apl. <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_hu.xtb b/ios/chrome/app/strings/resources/ios_strings_hu.xtb index 7cf8e0f..f554f5e 100644 --- a/ios/chrome/app/strings/resources/ios_strings_hu.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_hu.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315"><ph name="EMAIL" /> e-mail-címmel bejelentkezve. Adatai az összetett szinkronizálási jelszavával vannak titkosítva. Írja be a jelszót a szinkronizálás megkezdéséhez.</translation> -<translation id="4728558894243024398">Platform</translation> <translation id="473775607612524610">Frissítés</translation> <translation id="4750394297954878236">Javaslatok</translation> <translation id="4773461607542755386">Megnyitja az oldalt a(z) <ph name="APP_NAME" /> alkalmazással?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_id.xtb b/ios/chrome/app/strings/resources/ios_strings_id.xtb index 29a853a5..32530c2 100644 --- a/ios/chrome/app/strings/resources/ios_strings_id.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_id.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Masuk sebagai <ph name="EMAIL" />. Data Anda dienkripsi dengan frasa sandi sinkronisasi. Masukkan frasa sandi untuk memulai sinkronisasi.</translation> -<translation id="4728558894243024398">Platform</translation> <translation id="473775607612524610">Mutakhirkan</translation> <translation id="4750394297954878236">Saran</translation> <translation id="4773461607542755386">Buka laman ini di aplikasi <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_it.xtb b/ios/chrome/app/strings/resources/ios_strings_it.xtb index 20b20dfb..b73855a 100644 --- a/ios/chrome/app/strings/resources/ios_strings_it.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_it.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Accesso eseguito come <ph name="EMAIL" />. I tuoi dati vengono criptati con la tua passphrase di sincronizzazione. Inseriscila per avviare la sincronizzazione.</translation> -<translation id="4728558894243024398">Piattaforma</translation> <translation id="473775607612524610">Aggiorna</translation> <translation id="4750394297954878236">Suggerimenti</translation> <translation id="4773461607542755386">Aprire questa pagina nell'app <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_iw.xtb b/ios/chrome/app/strings/resources/ios_strings_iw.xtb index 4e32936..282db72 100644 --- a/ios/chrome/app/strings/resources/ios_strings_iw.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_iw.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">מחובר בשם <ph name="EMAIL" />. הנתונים שלך מוצפנים באמצעות ביטוי הסיסמה לסינכרון. הזן אותו כדי להתחיל בסינכרון.</translation> -<translation id="4728558894243024398">פלטפורמה</translation> <translation id="473775607612524610">עדכן</translation> <translation id="4750394297954878236">הצעות</translation> <translation id="4773461607542755386">האם לפתוח את הדף הזה ב-<ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ja.xtb b/ios/chrome/app/strings/resources/ios_strings_ja.xtb index 9f3c316..ba9831db 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ja.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ja.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315"><ph name="EMAIL" /> としてログインしています。 データは同期パスフレーズで暗号化されます。同期を開始するには、同期パスフレーズを入力してください。</translation> -<translation id="4728558894243024398">プラットフォーム</translation> <translation id="473775607612524610">アップデート</translation> <translation id="4750394297954878236">候補</translation> <translation id="4773461607542755386">このページを<ph name="APP_NAME" />アプリで開きますか?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_kn.xtb b/ios/chrome/app/strings/resources/ios_strings_kn.xtb index 80d97b78..a614f00 100644 --- a/ios/chrome/app/strings/resources/ios_strings_kn.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_kn.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315"><ph name="EMAIL" /> ಎಂಬುದಾಗಿ ಸೈನ್ ಇನ್ ಮಾಡಲಾಗಿದೆ. ನಿಮ್ಮ ಡೇಟಾವನ್ನು ನಿಮ್ಮ ಸಿಂಕ್ ಪಾಸ್ಫ್ರೇಸ್ನೊಂದಿಗೆ ಎನ್ಕ್ರಿಪ್ಟ್ ಮಾಡಲಾಗಿದೆ. ಸಿಂಕ್ ಮಾಡುವುದನ್ನು ಪ್ರಾರಂಭಿಸಲು ಅದನ್ನು ನಮೂದಿಸಿ.</translation> -<translation id="4728558894243024398">ಪ್ಲಾಟ್ಫಾರ್ಮ್</translation> <translation id="473775607612524610">ಅಪ್ಡೇಟ್</translation> <translation id="4750394297954878236">ಸಲಹೆಗಳು</translation> <translation id="4773461607542755386">ಈ ಪುಟವನ್ನು <ph name="APP_NAME" /> ಅಪ್ಲಿಕೇಶನ್ನಲ್ಲಿ ತೆರೆಯುವುದೇ?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ko.xtb b/ios/chrome/app/strings/resources/ios_strings_ko.xtb index 1c4c179..4a6ae8e 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ko.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ko.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315"><ph name="EMAIL" />(으)로 로그인되었습니다. 동기화 암호로 데이터가 암호화되어 있습니다. 동기화를 시작하려면 입력하세요.</translation> -<translation id="4728558894243024398">플랫폼</translation> <translation id="473775607612524610">업데이트</translation> <translation id="4750394297954878236">추천</translation> <translation id="4773461607542755386"><ph name="APP_NAME" /> 앱에서 이 페이지를 여시겠습니까?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_lt.xtb b/ios/chrome/app/strings/resources/ios_strings_lt.xtb index c6142ae..8f7b676a 100644 --- a/ios/chrome/app/strings/resources/ios_strings_lt.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_lt.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Esate prisijungę kaip <ph name="EMAIL" />. Duomenys užšifruoti naudojant slaptafrazę. Įveskite ją, kad pradėtumėte sinchronizuoti.</translation> -<translation id="4728558894243024398">Platforma</translation> <translation id="473775607612524610">Atnaujinti</translation> <translation id="4750394297954878236">Pasiūlymai</translation> <translation id="4773461607542755386">Atidaryti šį puslapį naudojant „<ph name="APP_NAME" />“?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_lv.xtb b/ios/chrome/app/strings/resources/ios_strings_lv.xtb index 90480fbb..cb2c66f1 100644 --- a/ios/chrome/app/strings/resources/ios_strings_lv.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_lv.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Pierakstījies kā <ph name="EMAIL" />. Jūsu dati ir šifrēti, izmantojot jūsu sinhronizācijas ieejas frāzi. Lai sāktu sinhronizēšanu, ievadiet ieejas frāzi.</translation> -<translation id="4728558894243024398">Platforma</translation> <translation id="473775607612524610">Atjaunināt</translation> <translation id="4750394297954878236">Ieteikumi</translation> <translation id="4773461607542755386">Vai atvērt šo lapu lietotnē <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ml.xtb b/ios/chrome/app/strings/resources/ios_strings_ml.xtb index 4b95c4e..290eed93 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ml.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ml.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315"><ph name="EMAIL" /> എന്ന പേരിലാണ് സൈൻ ഇൻ ചെയ്തിരിക്കുന്നത്. സമന്വയ പാസ്ഫ്രെയ്സ് ഉപയോഗിച്ച് നിങ്ങളുടെ ഡാറ്റ എൻക്രിപ്റ്റുചെയ്തു. സമന്വയം ആരംഭിക്കാൻ ഇത് നൽകുക.</translation> -<translation id="4728558894243024398">പ്ലാറ്റ്ഫോം</translation> <translation id="473775607612524610">അപ്ഡേറ്റുചെയ്യുക</translation> <translation id="4750394297954878236">നിർദ്ദേശങ്ങൾ</translation> <translation id="4773461607542755386"><ph name="APP_NAME" /> അപ്ലിക്കേഷനിൽ ഈ പേജ് തുറക്കണോ?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_mr.xtb b/ios/chrome/app/strings/resources/ios_strings_mr.xtb index f2d67954..a555ff11 100644 --- a/ios/chrome/app/strings/resources/ios_strings_mr.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_mr.xtb
@@ -189,7 +189,6 @@ <translation id="4666531726415300315"><ph name="EMAIL" /> म्हणून साइन इन केले. आपला डेटा आपल्या संकालित वाक्यांशासह कूटबद्ध केला आहे. संकालन सुरू करण्यासाठी तो प्रविष्ट करा.</translation> -<translation id="4728558894243024398">प्लॅटफॉर्म</translation> <translation id="473775607612524610">अद्यतनित करा</translation> <translation id="4750394297954878236">सूचना</translation> <translation id="4773461607542755386"><ph name="APP_NAME" /> अॅपमध्ये हे पृष्ठ उघडायचे?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ms.xtb b/ios/chrome/app/strings/resources/ios_strings_ms.xtb index 68f004d5..25ebf94 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ms.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ms.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Dilog masuk sebagai <ph name="EMAIL" />. Data anda disulitkan dengan ungkapan laluan segerak anda. Masukkannya untuk memulakan penyegerakan.</translation> -<translation id="4728558894243024398">Platform</translation> <translation id="473775607612524610">Kemas kini</translation> <translation id="4750394297954878236">Cadangan</translation> <translation id="4773461607542755386">Buka halaman ini dalam apl <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_nl.xtb b/ios/chrome/app/strings/resources/ios_strings_nl.xtb index e13b05b..144d863 100644 --- a/ios/chrome/app/strings/resources/ios_strings_nl.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_nl.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Ingelogd als <ph name="EMAIL" />. Je gegevens zijn versleuteld met je wachtwoordzin voor synchronisatie. Geef deze op om de synchronisatie te starten.</translation> -<translation id="4728558894243024398">Platform</translation> <translation id="473775607612524610">Updaten</translation> <translation id="4750394297954878236">Suggesties</translation> <translation id="4773461607542755386">Deze pagina openen in de app <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_no.xtb b/ios/chrome/app/strings/resources/ios_strings_no.xtb index 3720ad2..5ee8cc9 100644 --- a/ios/chrome/app/strings/resources/ios_strings_no.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_no.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Logget på som <ph name="EMAIL" />. Dataene dine er kryptert med passordfrasen din for synkronisering. Skriv den inn for å starte synkroniseringen.</translation> -<translation id="4728558894243024398">Plattform</translation> <translation id="473775607612524610">Oppdater</translation> <translation id="4750394297954878236">Forslag</translation> <translation id="4773461607542755386">Vil du åpne denne siden i <ph name="APP_NAME" />-appen?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_pl.xtb b/ios/chrome/app/strings/resources/ios_strings_pl.xtb index 9e4352f..845be1bb 100644 --- a/ios/chrome/app/strings/resources/ios_strings_pl.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_pl.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Jesteś zalogowany jako <ph name="EMAIL" />. Dane zostały zaszyfrowane z użyciem Twojego hasła synchronizacji. Wpisz je, by rozpocząć synchronizację.</translation> -<translation id="4728558894243024398">Platforma</translation> <translation id="473775607612524610">Aktualizuj</translation> <translation id="4750394297954878236">Sugestie</translation> <translation id="4773461607542755386">Otworzyć tę stronę w aplikacji <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_pt-BR.xtb b/ios/chrome/app/strings/resources/ios_strings_pt-BR.xtb index 1a45042c..2c93167 100644 --- a/ios/chrome/app/strings/resources/ios_strings_pt-BR.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_pt-BR.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Conectado como <ph name="EMAIL" />. Seus dados são criptografados com sua senha longa de sincronização. Informe-a para começar a sincronização.</translation> -<translation id="4728558894243024398">Plataforma</translation> <translation id="473775607612524610">Atualizar</translation> <translation id="4750394297954878236">Sugestões</translation> <translation id="4773461607542755386">Abrir esta página no <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_pt-PT.xtb b/ios/chrome/app/strings/resources/ios_strings_pt-PT.xtb index 8c1931c4..33a1706 100644 --- a/ios/chrome/app/strings/resources/ios_strings_pt-PT.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_pt-PT.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Sessão iniciada como <ph name="EMAIL" />. Os dados estão encriptados com a sua frase de acesso de sincronização. Introduza-a para iniciar a sincronização.</translation> -<translation id="4728558894243024398">Plataforma</translation> <translation id="473775607612524610">Actualizar</translation> <translation id="4750394297954878236">Sugestões</translation> <translation id="4773461607542755386">Abrir esta página na aplicação <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ro.xtb b/ios/chrome/app/strings/resources/ios_strings_ro.xtb index a61e4f7..a3ccd59 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ro.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ro.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Te-ai conectat ca <ph name="EMAIL" />. Datele sunt criptate cu expresia de acces pentru sincronizare. Introdu-o pentru a începe sincronizarea.</translation> -<translation id="4728558894243024398">Platformă</translation> <translation id="473775607612524610">Actualizează</translation> <translation id="4750394297954878236">Sugestii</translation> <translation id="4773461607542755386">Deschide această pagină în aplicația <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ru.xtb b/ios/chrome/app/strings/resources/ios_strings_ru.xtb index 558eaf7..43645c1 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ru.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ru.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Вы вошли в аккаунт <ph name="EMAIL" />. Данные зашифрованы с помощью кодовой фразы. Введите ее, чтобы начать синхронизацию.</translation> -<translation id="4728558894243024398">Платформа</translation> <translation id="473775607612524610">Обновление</translation> <translation id="4750394297954878236">Предложения</translation> <translation id="4773461607542755386">Открыть эту страницу в <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_sk.xtb b/ios/chrome/app/strings/resources/ios_strings_sk.xtb index e300c1b7..bd320de 100644 --- a/ios/chrome/app/strings/resources/ios_strings_sk.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_sk.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Prihlásený používateľ: <ph name="EMAIL" />. Údaje sú šifrované pomocou vlastnej prístupovej frázy synchronizácie. Keď ju zadáte, synchronizácia sa spustí.</translation> -<translation id="4728558894243024398">Platforma</translation> <translation id="473775607612524610">Aktualizovať</translation> <translation id="4750394297954878236">Návrhy</translation> <translation id="4773461607542755386">Otvoriť túto stránku v aplikácii <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_sl.xtb b/ios/chrome/app/strings/resources/ios_strings_sl.xtb index 01ae93f..0e33cfe9 100644 --- a/ios/chrome/app/strings/resources/ios_strings_sl.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_sl.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Prijavljeni ste kot <ph name="EMAIL" />. Podatki so šifrirani z vašim geslom za sinhronizacijo. Vnesite ga, če želite začeti sinhronizacijo.</translation> -<translation id="4728558894243024398">Okolje</translation> <translation id="473775607612524610">Posodobi</translation> <translation id="4750394297954878236">Predlogi</translation> <translation id="4773461607542755386">Želite to stran odpreti v aplikaciji <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_sr.xtb b/ios/chrome/app/strings/resources/ios_strings_sr.xtb index 6755cf5..c27851fc 100644 --- a/ios/chrome/app/strings/resources/ios_strings_sr.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_sr.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Пријављени сте као <ph name="EMAIL" />. Подаци се шифрују помоћу приступне фразе за синхронизацију. Унесите је да бисте започели синхронизацију.</translation> -<translation id="4728558894243024398">Платформа</translation> <translation id="473775607612524610">Ажурирај</translation> <translation id="4750394297954878236">Предлози</translation> <translation id="4773461607542755386">Отворити ову страницу у апликацији <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_sv.xtb b/ios/chrome/app/strings/resources/ios_strings_sv.xtb index 3ff6a70..3730020 100644 --- a/ios/chrome/app/strings/resources/ios_strings_sv.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_sv.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Inloggad som <ph name="EMAIL" />. Din data har krypterats med lösenfrasen för synkronisering. Ange den om du vill starta synkroniseringen.</translation> -<translation id="4728558894243024398">Plattform</translation> <translation id="473775607612524610">Uppdatera</translation> <translation id="4750394297954878236">Förslag</translation> <translation id="4773461607542755386">Vill du öppna sidan i appen <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_sw.xtb b/ios/chrome/app/strings/resources/ios_strings_sw.xtb index c703c70..3c6d17bd 100644 --- a/ios/chrome/app/strings/resources/ios_strings_sw.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_sw.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Umeingia katika akaunti ukitumia <ph name="EMAIL" />. Data yako imesimbwa kwa njia fiche kwa kauli yako ya siri ya usawazishaji. Iweke ili uanze kusawazisha.</translation> -<translation id="4728558894243024398">Mfumo wa uendeshaji</translation> <translation id="473775607612524610">Sasisha</translation> <translation id="4750394297954878236">Mapendekezo</translation> <translation id="4773461607542755386">Ungependa kufungua ukurasa huu katika programu ya <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ta.xtb b/ios/chrome/app/strings/resources/ios_strings_ta.xtb index 9b80c5a..b5a30ce 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ta.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ta.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315"><ph name="EMAIL" /> ஆக உள்நுழைந்துள்ளீர்கள். உங்கள் தரவு உங்கள் ஒத்திசைவு கடவுச்சொற்றொடரைக் கொண்டு முறைமையாக்கப்பட்டுள்ளது. ஒத்திசைவைத் தொடங்க, அதை உள்ளிடவும்.</translation> -<translation id="4728558894243024398">ப்ளாட்ஃபார்ம்</translation> <translation id="473775607612524610">புதுப்பி</translation> <translation id="4750394297954878236">பரிந்துரைகள்</translation> <translation id="4773461607542755386">இந்தப் பக்கத்தை <ph name="APP_NAME" /> பயன்பாட்டில் திறக்கவா?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_te.xtb b/ios/chrome/app/strings/resources/ios_strings_te.xtb index ee1bb19..c9dc6ae 100644 --- a/ios/chrome/app/strings/resources/ios_strings_te.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_te.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315"><ph name="EMAIL" />గా సైన్ ఇన్ చేసారు. మీ సమకాలీకరణ రహస్య పదబంధంతో మీ డేటా గుప్తీకరించబడింది. సమకాలీకరణను ప్రారంభించడానికి దీన్ని నమోదు చేయండి.</translation> -<translation id="4728558894243024398">ప్లాట్ఫారమ్</translation> <translation id="473775607612524610">నవీకరణ</translation> <translation id="4750394297954878236">సూచనలు</translation> <translation id="4773461607542755386">ఈ పేజీని <ph name="APP_NAME" /> అనువర్తనంలో తెరవాలా?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_th.xtb b/ios/chrome/app/strings/resources/ios_strings_th.xtb index 400f2cc..95e5ea0 100644 --- a/ios/chrome/app/strings/resources/ios_strings_th.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_th.xtb
@@ -186,7 +186,6 @@ <translation id="4666531726415300315">ลงชื่อเข้าใช้ด้วย <ph name="EMAIL" /> ข้อมูลของคุณจะได้รับการเข้ารหัสด้วยรหัสผ่านการซิงค์ โปรดป้อนรหัสผ่านเพื่อเริ่มซิงค์</translation> -<translation id="4728558894243024398">แพลตฟอร์ม</translation> <translation id="473775607612524610">การอัปเดต</translation> <translation id="4750394297954878236">คำแนะนำ</translation> <translation id="4773461607542755386">เปิดหน้านี้ในแอป <ph name="APP_NAME" /> ไหม</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_tr.xtb b/ios/chrome/app/strings/resources/ios_strings_tr.xtb index 49cbc6b..376fdc9 100644 --- a/ios/chrome/app/strings/resources/ios_strings_tr.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_tr.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315"><ph name="EMAIL" /> olarak oturum açıldı. Verileriniz senkronizasyon parolanızla şifrelendi. Senkronizasyonu başlatmak için senkronizasyon parolanızı girin.</translation> -<translation id="4728558894243024398">Platform</translation> <translation id="473775607612524610">Güncelle</translation> <translation id="4750394297954878236">Öneriler</translation> <translation id="4773461607542755386">Bu sayfa <ph name="APP_NAME" /> uygulamasında açılsın mı?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_uk.xtb b/ios/chrome/app/strings/resources/ios_strings_uk.xtb index 2360ac2..b6aafff 100644 --- a/ios/chrome/app/strings/resources/ios_strings_uk.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_uk.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Ви ввійшли як <ph name="EMAIL" />. Ваші дані зашифровано за допомогою парольної фрази. Введіть її, щоб почати синхронізацію.</translation> -<translation id="4728558894243024398">Платформа</translation> <translation id="473775607612524610">Оновити</translation> <translation id="4750394297954878236">Пропозиції</translation> <translation id="4773461607542755386">Відкрити цю сторінку в програмі <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_vi.xtb b/ios/chrome/app/strings/resources/ios_strings_vi.xtb index e5d25fa6..59c50e57 100644 --- a/ios/chrome/app/strings/resources/ios_strings_vi.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_vi.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">Đã đăng nhập bằng <ph name="EMAIL" />. Dữ liệu của bạn đã được mã hóa bằng cụm mật khẩu đồng bộ hóa của bạn. Nhập cụm mật khẩu đó để bắt đầu đồng bộ hóa.</translation> -<translation id="4728558894243024398">Nền tảng</translation> <translation id="473775607612524610">Cập nhật</translation> <translation id="4750394297954878236">Đề xuất</translation> <translation id="4773461607542755386">Mở trang này trong <ph name="APP_NAME" />?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_zh-CN.xtb b/ios/chrome/app/strings/resources/ios_strings_zh-CN.xtb index ce828b5..61cdf9f 100644 --- a/ios/chrome/app/strings/resources/ios_strings_zh-CN.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_zh-CN.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">目前登录的帐号是 <ph name="EMAIL" />。 您的数据已使用您的同步密码加密。输入该密码即可开始同步。</translation> -<translation id="4728558894243024398">平台</translation> <translation id="473775607612524610">更新</translation> <translation id="4750394297954878236">建议</translation> <translation id="4773461607542755386">要在 <ph name="APP_NAME" />应用中打开此网页吗?</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_zh-TW.xtb b/ios/chrome/app/strings/resources/ios_strings_zh-TW.xtb index 3512969b..f644b319 100644 --- a/ios/chrome/app/strings/resources/ios_strings_zh-TW.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_zh-TW.xtb
@@ -188,7 +188,6 @@ <translation id="4666531726415300315">目前登入的帳戶是 <ph name="EMAIL" />。 您已使用同步通關密語對資料進行加密,請輸入通關密語開始進行同步。</translation> -<translation id="4728558894243024398">平台</translation> <translation id="473775607612524610">更新</translation> <translation id="4750394297954878236">建議</translation> <translation id="4773461607542755386">在「<ph name="APP_NAME" />」應用程式中開啟這個網頁?</translation>
diff --git a/ios/chrome/browser/invalidation/OWNERS b/ios/chrome/browser/invalidation/OWNERS index 9b396653..7f08e5f 100644 --- a/ios/chrome/browser/invalidation/OWNERS +++ b/ios/chrome/browser/invalidation/OWNERS
@@ -1,3 +1,5 @@ dcheng@chromium.org nyquist@chromium.org pavely@chromium.org + +# COMPONENT: Services>Invalidation
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h index cfed23d9..ca03cc62 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h +++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h
@@ -46,13 +46,6 @@ // Sets the cell's appearance using information in |tab|. // The delegate needs to be set before calling this method. - (void)setAppearanceForTab:(Tab*)tab cellSize:(CGSize)cellSize; - -// PLACEHOLDER: Sets the cell's appearance using information in |title| and -// |favicon|. -- (void)setAppearanceForTabTitle:(NSString*)title - favicon:(UIImage*)favicon - cellSize:(CGSize)cellSize; - // Sets the cell's appearance depending on |type|. - (void)setSessionType:(TabSwitcherSessionType)type;
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm index fc6f669..bad9ca2 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm
@@ -242,20 +242,6 @@ }]; } -- (void)setAppearanceForTabTitle:(NSString*)title - favicon:(UIImage*)favicon - cellSize:(CGSize)cellSize { - [_titleLabel setText:title]; - [self contentView].accessibilityLabel = title; - if (favicon) { - [_favicon setImage:favicon]; - } else { - [_favicon setImage:NativeImage(IDR_IOS_OMNIBOX_HTTP)]; - } - - // PLACEHOLDER: Set snapshot here. -} - - (void)setSessionType:(TabSwitcherSessionType)type { UIColor* topBarBackgroundColor; UIColor* closeButtonTintColor;
diff --git a/ios/clean/chrome/browser/ui/tab_grid/BUILD.gn b/ios/clean/chrome/browser/ui/tab_grid/BUILD.gn index 38efb26..74bd8bee 100644 --- a/ios/clean/chrome/browser/ui/tab_grid/BUILD.gn +++ b/ios/clean/chrome/browser/ui/tab_grid/BUILD.gn
@@ -39,7 +39,6 @@ deps = [ "//base", - "//ios/chrome/browser/ui/tab_switcher", "//ios/clean/chrome/browser/ui/actions", "//ios/clean/chrome/browser/ui/animators", "//ios/clean/chrome/browser/ui/commands",
diff --git a/ios/clean/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm b/ios/clean/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm index 6948934..f91f66e 100644 --- a/ios/clean/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm +++ b/ios/clean/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm
@@ -51,7 +51,7 @@ [super setBrowserState:browserState]; // PLACEHOLDER: Generate a tab group with four empty tabs. self.tabGroup = - [TabGroup tabGroupWithEmptyTabCount:7 forBrowserState:self.browserState]; + [TabGroup tabGroupWithEmptyTabCount:4 forBrowserState:self.browserState]; } #pragma mark - BrowserCoordinator @@ -81,7 +81,7 @@ WebMediator* tab = [self.tabGroup tabAtIndex:index]; GURL url = tab.webState->GetVisibleURL(); NSString* urlText = @"<New Tab>"; - if (url.is_valid()) { + if (!url.is_valid()) { urlText = base::SysUTF8ToNSString(url.spec()); } return urlText;
diff --git a/ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm b/ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm index 0d20e73..8ebf91b 100644 --- a/ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm +++ b/ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm
@@ -9,19 +9,19 @@ #import "ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.h" #include "base/mac/foundation_util.h" -#import "ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h" -#import "ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_collection_view_layout.h" #import "ios/clean/chrome/browser/ui/actions/settings_actions.h" #import "ios/clean/chrome/browser/ui/actions/tab_grid_actions.h" #import "ios/clean/chrome/browser/ui/commands/settings_commands.h" #import "ios/clean/chrome/browser/ui/commands/tab_commands.h" #import "ios/clean/chrome/browser/ui/commands/tab_grid_commands.h" +#import "ios/clean/chrome/browser/ui/tab_grid/tab_grid_tab_cell.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support." #endif namespace { +NSString* const kTabGridCellIdentifier = @"tabGridCell"; const CGFloat kSpace = 20; const CGFloat kTabSize = 150; } @@ -29,8 +29,7 @@ @interface TabGridViewController ()<SettingsActions, TabGridActions, UICollectionViewDataSource, - UICollectionViewDelegate, - SessionCellDelegate> + UICollectionViewDelegate> @property(nonatomic, weak) UICollectionView* grid; @end @@ -69,8 +68,8 @@ [settings.centerYAnchor constraintEqualToAnchor:stripe.centerYAnchor] ]]; - TabSwitcherPanelCollectionViewLayout* layout = - [[TabSwitcherPanelCollectionViewLayout alloc] init]; + UICollectionViewFlowLayout* layout = + [[UICollectionViewFlowLayout alloc] init]; layout.minimumLineSpacing = kSpace; layout.minimumInteritemSpacing = kSpace; layout.sectionInset = UIEdgeInsetsMake(kSpace, kSpace, kSpace, kSpace); @@ -85,8 +84,8 @@ self.grid = grid; self.grid.dataSource = self; self.grid.delegate = self; - [self.grid registerClass:[TabSwitcherLocalSessionCell class] - forCellWithReuseIdentifier:[TabSwitcherLocalSessionCell identifier]]; + [self.grid registerClass:[TabGridTabCell class] + forCellWithReuseIdentifier:kTabGridCellIdentifier]; [NSLayoutConstraint activateConstraints:@[ [self.grid.topAnchor constraintEqualToAnchor:stripe.bottomAnchor], @@ -114,19 +113,23 @@ - (UICollectionViewCell*)collectionView:(UICollectionView*)collectionView cellForItemAtIndexPath:(nonnull NSIndexPath*)indexPath { - TabSwitcherLocalSessionCell* cell = - base::mac::ObjCCastStrict<TabSwitcherLocalSessionCell>([collectionView - dequeueReusableCellWithReuseIdentifier: - [TabSwitcherLocalSessionCell identifier] + TabGridTabCell* cell = + base::mac::ObjCCastStrict<TabGridTabCell>([collectionView + dequeueReusableCellWithReuseIdentifier:kTabGridCellIdentifier forIndexPath:indexPath]); - cell.delegate = self; - [cell setSessionType:TabSwitcherSessionType::REGULAR_SESSION]; - [cell setAppearanceForTabTitle:[self.dataSource titleAtIndex:indexPath.item] - favicon:nil - cellSize:CGSizeZero]; + cell.contentView.backgroundColor = [UIColor purpleColor]; + cell.selected = YES; + cell.label.text = [self.dataSource titleAtIndex:indexPath.item]; return cell; } +#pragma mark - UICollectionViewDelegate methods + +- (void)collectionView:(UICollectionView*)collectionView + didSelectItemAtIndexPath:(NSIndexPath*)indexPath { + [self.tabCommandHandler showTabAtIndexPath:indexPath]; +} + #pragma mark - ZoomTransitionDelegate methods - (CGRect)rectForZoomWithKey:(NSObject*)key inView:(UIView*)view { @@ -149,19 +152,4 @@ [self.tabGridCommandHandler showTabGrid]; } -#pragma mark - SessionCellDelegate - -- (TabSwitcherCache*)tabSwitcherCache { - // PLACEHOLDER: return image cache. - return nil; -} - -- (void)cellPressed:(UICollectionViewCell*)cell { - [self.tabCommandHandler showTabAtIndexPath:[self.grid indexPathForCell:cell]]; -} - -- (void)deleteButtonPressedForCell:(UICollectionViewCell*)cell { - // PLACEHOLDER: handle close tab button. -} - @end
diff --git a/ios/web_view/shell/BUILD.gn b/ios/web_view/shell/BUILD.gn index ab14a24..0407dec7 100644 --- a/ios/web_view/shell/BUILD.gn +++ b/ios/web_view/shell/BUILD.gn
@@ -18,14 +18,14 @@ info_plist = "Info.plist" sources = [ "shell_app_delegate.h", - "shell_app_delegate.mm", + "shell_app_delegate.m", "shell_delegate.h", - "shell_delegate.mm", - "shell_exe_main.mm", + "shell_delegate.m", + "shell_exe_main.m", "shell_view_controller.h", - "shell_view_controller.mm", + "shell_view_controller.m", "translate_controller.h", - "translate_controller.mm", + "translate_controller.m", ] libs = [ "CFNetwork.framework",
diff --git a/ios/web_view/shell/shell_app_delegate.mm b/ios/web_view/shell/shell_app_delegate.m similarity index 95% rename from ios/web_view/shell/shell_app_delegate.mm rename to ios/web_view/shell/shell_app_delegate.m index fa6bfc6..28a4b7d 100644 --- a/ios/web_view/shell/shell_app_delegate.mm +++ b/ios/web_view/shell/shell_app_delegate.m
@@ -13,7 +13,7 @@ #endif @interface ShellAppDelegate () -@property (nonatomic, strong) ShellDelegate* delegate; +@property(nonatomic, strong) ShellDelegate* delegate; @end @implementation ShellAppDelegate
diff --git a/ios/web_view/shell/shell_delegate.mm b/ios/web_view/shell/shell_delegate.m similarity index 100% rename from ios/web_view/shell/shell_delegate.mm rename to ios/web_view/shell/shell_delegate.m
diff --git a/ios/web_view/shell/shell_exe_main.mm b/ios/web_view/shell/shell_exe_main.m similarity index 100% rename from ios/web_view/shell/shell_exe_main.mm rename to ios/web_view/shell/shell_exe_main.m
diff --git a/ios/web_view/shell/shell_view_controller.mm b/ios/web_view/shell/shell_view_controller.m similarity index 94% rename from ios/web_view/shell/shell_view_controller.mm rename to ios/web_view/shell/shell_view_controller.m index ed95efa..274a62451 100644 --- a/ios/web_view/shell/shell_view_controller.mm +++ b/ios/web_view/shell/shell_view_controller.m
@@ -12,21 +12,17 @@ #error "This file requires ARC support." #endif -namespace { -const CGFloat kButtonSize = 44; -} - @interface ShellViewController () // Container for |webView|. -@property (nonatomic, strong) UIView* containerView; +@property(nonatomic, strong) UIView* containerView; // Text field used for navigating to URLs. -@property (nonatomic, strong) UITextField* field; +@property(nonatomic, strong) UITextField* field; // Toolbar containing navigation buttons and |field|. -@property (nonatomic, strong) UIToolbar* toolbar; +@property(nonatomic, strong) UIToolbar* toolbar; // CRIWV view which renders the web page. -@property (nonatomic, strong) id<CRIWVWebView> webView; +@property(nonatomic, strong) id<CRIWVWebView> webView; // Handles the translation of the content displayed in |webView|. -@property (nonatomic, strong) TranslateController* translateController; +@property(nonatomic, strong) TranslateController* translateController; - (void)back; - (void)forward; @@ -66,8 +62,10 @@ UIViewAutoresizingFlexibleHeight]; [self.view addSubview:_containerView]; - // Text field. const int kButtonCount = 3; + const CGFloat kButtonSize = 44; + + // Text field. self.field = [[UITextField alloc] initWithFrame:CGRectMake(kButtonCount * kButtonSize, 6, CGRectGetWidth([_toolbar frame]) -
diff --git a/ios/web_view/shell/translate_controller.mm b/ios/web_view/shell/translate_controller.m similarity index 82% rename from ios/web_view/shell/translate_controller.mm rename to ios/web_view/shell/translate_controller.m index 98bc51b..f271f5f4 100644 --- a/ios/web_view/shell/translate_controller.mm +++ b/ios/web_view/shell/translate_controller.m
@@ -6,7 +6,6 @@ #import <UIKit/UIKit.h> -#include "base/logging.h" #import "ios/web_view/public/criwv_translate_manager.h" #if !defined(__has_feature) || !__has_feature(objc_arc) @@ -15,9 +14,9 @@ @interface TranslateController () // Action Sheet to prompt user whether or not the page should be translated. -@property (nonatomic, strong) UIAlertController* beforeTranslateActionSheet; +@property(nonatomic, strong) UIAlertController* beforeTranslateActionSheet; // Manager which performs the translation of the content. -@property (nonatomic, strong) id<CRIWVTranslateManager> translateManager; +@property(nonatomic, strong) id<CRIWVTranslateManager> translateManager; @end @implementation TranslateController @@ -35,8 +34,6 @@ - (void)translateStepChanged:(CRIWVTransateStep)step manager:(id<CRIWVTranslateManager>)manager { if (step == CRIWVTransateStepBeforeTranslate) { - DCHECK(!_translateManager); - DCHECK(!_beforeTranslateActionSheet); self.translateManager = manager; self.beforeTranslateActionSheet = [UIAlertController alertControllerWithTitle:nil @@ -46,9 +43,7 @@ [UIAlertAction actionWithTitle:@"Nope." style:UIAlertActionStyleCancel handler:^(UIAlertAction* action) { - DCHECK(_beforeTranslateActionSheet); self.beforeTranslateActionSheet = nil; - DCHECK(_translateManager); self.translateManager = nil; }]; [_beforeTranslateActionSheet addAction:cancelAction]; @@ -57,9 +52,7 @@ [UIAlertAction actionWithTitle:@"Yes!" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action) { - DCHECK(_beforeTranslateActionSheet); self.beforeTranslateActionSheet = nil; - DCHECK(_translateManager); [_translateManager translate]; self.translateManager = nil; }];
diff --git a/ipc/ipc_test_base.h b/ipc/ipc_test_base.h index 6623955f..ae69f10 100644 --- a/ipc/ipc_test_base.h +++ b/ipc/ipc_test_base.h
@@ -9,6 +9,7 @@ #include <string> #include "base/macros.h" +#include "base/message_loop/message_loop.h" #include "base/process/process.h" #include "base/test/multiprocess_test.h" #include "build/build_config.h"
diff --git a/jingle/glue/proxy_resolving_client_socket.cc b/jingle/glue/proxy_resolving_client_socket.cc index a880b122..ccf7878f 100644 --- a/jingle/glue/proxy_resolving_client_socket.cc +++ b/jingle/glue/proxy_resolving_client_socket.cc
@@ -17,6 +17,7 @@ #include "net/base/net_errors.h" #include "net/http/http_auth_controller.h" #include "net/http/http_network_session.h" +#include "net/http/http_transaction_factory.h" #include "net/http/proxy_client_socket.h" #include "net/log/net_log_source_type.h" #include "net/socket/client_socket_handle.h" @@ -95,6 +96,13 @@ } network_session_.reset(new net::HttpNetworkSession(session_params)); + + net::HttpAuthCache* other_auth_cache = + request_context->http_transaction_factory() + ->GetSession() + ->http_auth_cache(); + DCHECK(other_auth_cache); + network_session_->http_auth_cache()->UpdateAllFrom(*other_auth_cache); } ProxyResolvingClientSocket::~ProxyResolvingClientSocket() {
diff --git a/jingle/glue/proxy_resolving_client_socket_unittest.cc b/jingle/glue/proxy_resolving_client_socket_unittest.cc index d784cf3..736e73f9 100644 --- a/jingle/glue/proxy_resolving_client_socket_unittest.cc +++ b/jingle/glue/proxy_resolving_client_socket_unittest.cc
@@ -8,11 +8,13 @@ #include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" +#include "base/strings/utf_string_conversions.h" #include "base/threading/thread_task_runner_handle.h" #include "net/base/test_completion_callback.h" #include "net/dns/mock_host_resolver.h" #include "net/proxy/proxy_service.h" #include "net/socket/socket_test_util.h" +#include "net/test/gtest_util.h" #include "net/url_request/url_request_context_getter.h" #include "net/url_request/url_request_test_util.h" #include "testing/gtest/include/gtest/gtest.h" @@ -116,5 +118,147 @@ EXPECT_TRUE(iter != retry_info.end()); } +TEST_F(ProxyResolvingClientSocketTest, ReusesHTTPAuthCache_Lookup) { + scoped_refptr<net::TestURLRequestContextGetter> url_request_context_getter( + new net::TestURLRequestContextGetter( + base::ThreadTaskRunnerHandle::Get(), + std::unique_ptr<net::TestURLRequestContext>( + new MyTestURLRequestContext))); + net::MockClientSocketFactory socket_factory; + net::HostPortPair dest("example.com", 443); + + // Initial connect without credentials. The server responds with a 407. + net::MockWrite kConnectWrites1[] = { + net::MockWrite("CONNECT example.com:443 HTTP/1.1\r\n" + "Host: example.com:443\r\n" + "Proxy-Connection: keep-alive\r\n" + "\r\n")}; + net::MockRead kConnectReads1[] = { + net::MockRead("HTTP/1.1 407 Proxy Authentication Required\r\n" + "Proxy-Authenticate: Basic realm=\"test_realm\"\r\n" + "\r\n")}; + + // Second connect attempt includes credentials. + net::MockWrite kConnectWrites2[] = { + net::MockWrite("CONNECT example.com:443 HTTP/1.1\r\n" + "Host: example.com:443\r\n" + "Proxy-Connection: keep-alive\r\n" + "Proxy-Authorization: Basic dXNlcjpwYXNzd29yZA==\r\n" + "\r\n")}; + net::MockRead kConnectReads2[] = { + net::MockRead("HTTP/1.1 200 Success\r\n\r\n")}; + + net::StaticSocketDataProvider kSocketData1( + kConnectReads1, arraysize(kConnectReads1), kConnectWrites1, + arraysize(kConnectWrites1)); + socket_factory.AddSocketDataProvider(&kSocketData1); + + net::StaticSocketDataProvider kSocketData2( + kConnectReads2, arraysize(kConnectReads2), kConnectWrites2, + arraysize(kConnectWrites2)); + socket_factory.AddSocketDataProvider(&kSocketData2); + + net::HttpAuthCache* auth_cache = + url_request_context_getter->GetURLRequestContext() + ->http_transaction_factory() + ->GetSession() + ->http_auth_cache(); + + // We are adding these credentials at an empty path so that it won't be picked + // up by the preemptive authentication step and will only be picked up via + // origin + realm + scheme lookup. + auth_cache->Add(GURL("http://bad:99"), "test_realm", + net::HttpAuth::AUTH_SCHEME_BASIC, + "Basic realm=\"test_realm\"", + net::AuthCredentials(base::ASCIIToUTF16("user"), + base::ASCIIToUTF16("password")), + std::string()); + + ProxyResolvingClientSocket proxy_resolving_socket( + &socket_factory, url_request_context_getter, net::SSLConfig(), dest); + + net::TestCompletionCallback callback; + int status = proxy_resolving_socket.Connect(callback.callback()); + EXPECT_THAT(callback.GetResult(status), net::test::IsOk()); +} + +TEST_F(ProxyResolvingClientSocketTest, ReusesHTTPAuthCache_Preemptive) { + scoped_refptr<net::TestURLRequestContextGetter> url_request_context_getter( + new net::TestURLRequestContextGetter( + base::ThreadTaskRunnerHandle::Get(), + std::unique_ptr<net::TestURLRequestContext>( + new MyTestURLRequestContext))); + net::MockClientSocketFactory socket_factory; + net::HostPortPair dest("example.com", 443); + + // Initial connect uses preemptive credentials. That is all. + net::MockWrite kConnectWrites[] = { + net::MockWrite("CONNECT example.com:443 HTTP/1.1\r\n" + "Host: example.com:443\r\n" + "Proxy-Connection: keep-alive\r\n" + "Proxy-Authorization: Basic dXNlcjpwYXNzd29yZA==\r\n" + "\r\n")}; + net::MockRead kConnectReads[] = { + net::MockRead("HTTP/1.1 200 Success\r\n\r\n")}; + + net::StaticSocketDataProvider kSocketData( + kConnectReads, arraysize(kConnectReads), kConnectWrites, + arraysize(kConnectWrites)); + socket_factory.AddSocketDataProvider(&kSocketData); + + net::HttpAuthCache* auth_cache = + url_request_context_getter->GetURLRequestContext() + ->http_transaction_factory() + ->GetSession() + ->http_auth_cache(); + + auth_cache->Add(GURL("http://bad:99"), "test_realm", + net::HttpAuth::AUTH_SCHEME_BASIC, + "Basic realm=\"test_realm\"", + net::AuthCredentials(base::ASCIIToUTF16("user"), + base::ASCIIToUTF16("password")), + "/"); + + ProxyResolvingClientSocket proxy_resolving_socket( + &socket_factory, url_request_context_getter, net::SSLConfig(), dest); + + net::TestCompletionCallback callback; + int status = proxy_resolving_socket.Connect(callback.callback()); + EXPECT_THAT(callback.GetResult(status), net::test::IsOk()); +} + +TEST_F(ProxyResolvingClientSocketTest, ReusesHTTPAuthCache_NoCredentials) { + scoped_refptr<net::TestURLRequestContextGetter> url_request_context_getter( + new net::TestURLRequestContextGetter( + base::ThreadTaskRunnerHandle::Get(), + std::unique_ptr<net::TestURLRequestContext>( + new MyTestURLRequestContext))); + net::MockClientSocketFactory socket_factory; + net::HostPortPair dest("example.com", 443); + + // Initial connect uses preemptive credentials. That is all. + net::MockWrite kConnectWrites[] = { + net::MockWrite("CONNECT example.com:443 HTTP/1.1\r\n" + "Host: example.com:443\r\n" + "Proxy-Connection: keep-alive\r\n" + "\r\n")}; + net::MockRead kConnectReads[] = { + net::MockRead("HTTP/1.1 407 Proxy Authentication Required\r\n" + "Proxy-Authenticate: Basic realm=\"test_realm\"\r\n" + "\r\n")}; + + net::StaticSocketDataProvider kSocketData( + kConnectReads, arraysize(kConnectReads), kConnectWrites, + arraysize(kConnectWrites)); + socket_factory.AddSocketDataProvider(&kSocketData); + + ProxyResolvingClientSocket proxy_resolving_socket( + &socket_factory, url_request_context_getter, net::SSLConfig(), dest); + + net::TestCompletionCallback callback; + int status = proxy_resolving_socket.Connect(callback.callback()); + EXPECT_THAT(callback.GetResult(status), net::ERR_PROXY_AUTH_REQUESTED); +} + // TODO(sanjeevr): Add more unit-tests. } // namespace jingle_glue
diff --git a/media/cdm/aes_decryptor_unittest.cc b/media/cdm/aes_decryptor_unittest.cc index cf9ed149..e576190 100644 --- a/media/cdm/aes_decryptor_unittest.cc +++ b/media/cdm/aes_decryptor_unittest.cc
@@ -35,6 +35,7 @@ #include "url/gurl.h" using ::testing::_; +using ::testing::AtMost; using ::testing::Gt; using ::testing::IsNull; using ::testing::NotNull; @@ -52,6 +53,9 @@ std::unique_ptr<base::Value> root(base::JSONReader().ReadToValue(result)); return (root.get() && root->GetType() == base::Value::Type::DICTIONARY); } +MATCHER(IsNullTime, "") { + return arg.is_null(); +} namespace media { @@ -364,6 +368,12 @@ EXPECT_CALL(cdm_client_, OnSessionKeysChangeCalled(_, _)).Times(0); } + // AesDecryptor never calls OnSessionExpirationUpdate() since Clear Key key + // system doesn't need it. But ClearKeyCdm does call it for testing purpose. + EXPECT_CALL(cdm_client_, + OnSessionExpirationUpdate(session_id, IsNullTime())) + .Times(AtMost(1)); + cdm_->UpdateSession(session_id, std::vector<uint8_t>(key.begin(), key.end()), CreatePromise(expected_result));
diff --git a/media/cdm/cdm_adapter_unittest.cc b/media/cdm/cdm_adapter_unittest.cc index 4c467e5..0585ff0 100644 --- a/media/cdm/cdm_adapter_unittest.cc +++ b/media/cdm/cdm_adapter_unittest.cc
@@ -30,6 +30,10 @@ return !arg.empty(); } +MATCHER(IsNullTime, "") { + return arg.is_null(); +} + // TODO(jrummell): These tests are a subset of those in aes_decryptor_unittest. // Refactor aes_decryptor_unittest.cc to handle AesDecryptor directly and // via CdmAdapter once CdmAdapter supports decrypting functionality. There @@ -151,6 +155,11 @@ EXPECT_CALL(cdm_client_, OnSessionKeysChangeCalled(_, _)).Times(0); } + // ClearKeyCdm always call OnSessionExpirationUpdate() for testing purpose. + EXPECT_CALL(cdm_client_, + OnSessionExpirationUpdate(session_id, IsNullTime())) + .Times(1); + adapter_->UpdateSession(session_id, std::vector<uint8_t>(key.begin(), key.end()), CreatePromise(expected_result));
diff --git a/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc b/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc index 54efa56..7adacf0 100644 --- a/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc +++ b/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
@@ -420,10 +420,23 @@ web_session_str, std::vector<uint8_t>(response, response + response_size), std::move(promise)); - if (key_system_ == kExternalClearKeyRenewalKeySystem && !renewal_timer_set_) { - ScheduleNextRenewal(); - renewal_timer_set_ = true; + // TODO(xhwang): Only schedule renewal and update expiration change when the + // promise is resolved. + + cdm::Time expiration = 0.0; // Never expires. + + if (key_system_ == kExternalClearKeyRenewalKeySystem) { + // For renewal key system, set a non-zero expiration that is approximately + // 100 years after 01 January 1970 UTC. + expiration = 3153600000.0; // 100 * 365 * 24 * 60 * 60; + + if (!renewal_timer_set_) { + ScheduleNextRenewal(); + renewal_timer_set_ = true; + } } + + host_->OnExpirationChange(session_id, session_id_length, expiration); } void ClearKeyCdm::CloseSession(uint32_t promise_id,
diff --git a/media/test/data/eme_player_js/clearkey_player.js b/media/test/data/eme_player_js/clearkey_player.js index 05cab2f..9324c99 100644 --- a/media/test/data/eme_player_js/clearkey_player.js +++ b/media/test/data/eme_player_js/clearkey_player.js
@@ -20,11 +20,38 @@ ClearKeyPlayer.prototype.onMessage = function(message) { Utils.timeLog('MediaKeySession onMessage', message); + + var mediaKeySession = message.target; var keyId = Utils.extractFirstLicenseKeyId(message.message); var key = Utils.getDefaultKey(this.testConfig.forceInvalidResponse); var jwkSet = Utils.createJWKData(keyId, key); + + // Number of milliseconds in 100 years, which is approximately + // 100 * 365 * 24 * 60 * 60 * 1000. + // See clear_key_cdm.cc where this value is set. + const ECK_RENEWAL_EXPIRATION = 3153600000000; + Utils.timeLog('Calling update: ' + String.fromCharCode.apply(null, jwkSet)); - message.target.update(jwkSet).catch(function(error) { + mediaKeySession.update(jwkSet).then(function() { + // Check session expiration. + // - For CLEARKEY, expiration is not set and is the default value NaN. + // - For EXTERNAL_CLEARKEY_RENEWAL, expiration is set to + // ECK_RENEWAL_EXPIRATION milliseconds after 01 January 1970 UTC. + // - For other EXTERNAL_CLEARKEY variants, expiration is explicitly set to + // NaN. + var expiration = mediaKeySession.expiration; + if (this.testConfig.keySystem == EXTERNAL_CLEARKEY_RENEWAL) { + if (isNaN(expiration) || expiration != ECK_RENEWAL_EXPIRATION) { + Utils.timeLog('Unexpected expiration: ', expiration); + Utils.failTest(error, EME_UPDATE_FAILED); + } + } else { + if (!isNaN(mediaKeySession.expiration)) { + Utils.timeLog('Unexpected expiration: ', expiration); + Utils.failTest(error, EME_UPDATE_FAILED); + } + } + }).catch(function(error) { // Ignore the error if a crash is expected. This ensures that the decoder // actually detects and reports the error. if (this.testConfig.keySystem != CRASH_TEST_KEYSYSTEM) {
diff --git a/mojo/android/system/watcher_impl.cc b/mojo/android/system/watcher_impl.cc index 2a6c54cf..756ffe3 100644 --- a/mojo/android/system/watcher_impl.cc +++ b/mojo/android/system/watcher_impl.cc
@@ -13,7 +13,6 @@ #include "base/android/library_loader/library_loader_hooks.h" #include "base/android/scoped_java_ref.h" #include "base/bind.h" -#include "base/message_loop/message_loop.h" #include "jni/WatcherImpl_jni.h" #include "mojo/public/cpp/system/handle.h" #include "mojo/public/cpp/system/watcher.h" @@ -25,41 +24,32 @@ namespace { -class WatcherWithMessageLoopObserver - : public base::MessageLoop::DestructionObserver { +class WatcherImpl { public: - WatcherWithMessageLoopObserver() : watcher_(FROM_HERE) {} + WatcherImpl() : watcher_(FROM_HERE) {} - ~WatcherWithMessageLoopObserver() override { StopObservingIfNecessary(); } + ~WatcherImpl() = default; jint Start(JNIEnv* env, const JavaParamRef<jobject>& jcaller, jint mojo_handle, jint signals) { - if (!is_observing_) { - is_observing_ = true; - base::MessageLoop::current()->AddDestructionObserver(this); - } - java_watcher_.Reset(env, jcaller); - auto ready_callback = base::Bind( - &WatcherWithMessageLoopObserver::OnHandleReady, base::Unretained(this)); + auto ready_callback = + base::Bind(&WatcherImpl::OnHandleReady, base::Unretained(this)); MojoResult result = watcher_.Start(mojo::Handle(static_cast<MojoHandle>(mojo_handle)), static_cast<MojoHandleSignals>(signals), ready_callback); - if (result != MOJO_RESULT_OK) { - StopObservingIfNecessary(); + if (result != MOJO_RESULT_OK) java_watcher_.Reset(); - } return result; } void Cancel() { - StopObservingIfNecessary(); java_watcher_.Reset(); watcher_.Cancel(); } @@ -69,10 +59,8 @@ DCHECK(!java_watcher_.is_null()); base::android::ScopedJavaGlobalRef<jobject> java_watcher_preserver; - if (result == MOJO_RESULT_CANCELLED) { - StopObservingIfNecessary(); + if (result == MOJO_RESULT_CANCELLED) java_watcher_preserver = std::move(java_watcher_); - } Java_WatcherImpl_onHandleReady( base::android::AttachCurrentThread(), @@ -80,30 +68,16 @@ result); } - // base::MessageLoop::DestructionObserver: - void WillDestroyCurrentMessageLoop() override { - StopObservingIfNecessary(); - OnHandleReady(MOJO_RESULT_ABORTED); - } - - void StopObservingIfNecessary() { - if (is_observing_) { - is_observing_ = false; - base::MessageLoop::current()->RemoveDestructionObserver(this); - } - } - - bool is_observing_ = false; Watcher watcher_; base::android::ScopedJavaGlobalRef<jobject> java_watcher_; - DISALLOW_COPY_AND_ASSIGN(WatcherWithMessageLoopObserver); + DISALLOW_COPY_AND_ASSIGN(WatcherImpl); }; } // namespace static jlong CreateWatcher(JNIEnv* env, const JavaParamRef<jobject>& jcaller) { - return reinterpret_cast<jlong>(new WatcherWithMessageLoopObserver); + return reinterpret_cast<jlong>(new WatcherImpl); } static jint Start(JNIEnv* env, @@ -111,20 +85,20 @@ jlong watcher_ptr, jint mojo_handle, jint signals) { - auto watcher = reinterpret_cast<WatcherWithMessageLoopObserver*>(watcher_ptr); + auto watcher = reinterpret_cast<WatcherImpl*>(watcher_ptr); return watcher->Start(env, jcaller, mojo_handle, signals); } static void Cancel(JNIEnv* env, const JavaParamRef<jobject>& jcaller, jlong watcher_ptr) { - reinterpret_cast<WatcherWithMessageLoopObserver*>(watcher_ptr)->Cancel(); + reinterpret_cast<WatcherImpl*>(watcher_ptr)->Cancel(); } static void Delete(JNIEnv* env, const JavaParamRef<jobject>& jcaller, jlong watcher_ptr) { - delete reinterpret_cast<WatcherWithMessageLoopObserver*>(watcher_ptr); + delete reinterpret_cast<WatcherImpl*>(watcher_ptr); } bool RegisterWatcherImpl(JNIEnv* env) {
diff --git a/mojo/public/cpp/bindings/BUILD.gn b/mojo/public/cpp/bindings/BUILD.gn index bf048a8..cc1946a 100644 --- a/mojo/public/cpp/bindings/BUILD.gn +++ b/mojo/public/cpp/bindings/BUILD.gn
@@ -89,7 +89,6 @@ "lib/native_struct_data.h", "lib/native_struct_serialization.cc", "lib/native_struct_serialization.h", - "lib/no_interface.cc", "lib/pipe_control_message_handler.cc", "lib/pipe_control_message_proxy.cc", "lib/scoped_interface_endpoint_handle.cc", @@ -121,7 +120,6 @@ "native_enum.h", "native_struct.h", "native_struct_data_view.h", - "no_interface.h", "pipe_control_message_handler.h", "pipe_control_message_handler_delegate.h", "pipe_control_message_proxy.h",
diff --git a/mojo/public/cpp/bindings/interface_endpoint_client.h b/mojo/public/cpp/bindings/interface_endpoint_client.h index cbab4238..5c5243c 100644 --- a/mojo/public/cpp/bindings/interface_endpoint_client.h +++ b/mojo/public/cpp/bindings/interface_endpoint_client.h
@@ -16,7 +16,6 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" -#include "base/message_loop/message_loop.h" #include "base/optional.h" #include "base/single_thread_task_runner.h" #include "base/threading/thread_checker.h" @@ -39,8 +38,7 @@ // endpoint, either the implementation side or the client side. // It should only be accessed and destructed on the creating thread. class MOJO_CPP_BINDINGS_EXPORT InterfaceEndpointClient - : NON_EXPORTED_BASE(public MessageReceiverWithResponder), - public base::MessageLoop::DestructionObserver { + : NON_EXPORTED_BASE(public MessageReceiverWithResponder) { public: // |receiver| is okay to be null. If it is not null, it must outlive this // object. @@ -153,10 +151,6 @@ }; bool HandleValidatedMessage(Message* message); - void StopObservingIfNecessary(); - - // base::MessageLoop::DestructionObserver: - void WillDestroyCurrentMessageLoop() override; ScopedInterfaceEndpointHandle handle_; std::unique_ptr<AssociatedGroup> associated_group_; @@ -180,8 +174,6 @@ internal::ControlMessageProxy control_message_proxy_; internal::ControlMessageHandler control_message_handler_; - bool observing_message_loop_destruction_ = true; - base::ThreadChecker thread_checker_; base::WeakPtrFactory<InterfaceEndpointClient> weak_ptr_factory_;
diff --git a/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc b/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc index db34291a..a9eee86 100644 --- a/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc +++ b/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc
@@ -159,15 +159,11 @@ handle_, this, task_runner_); if (expect_sync_requests) controller_->AllowWokenUpBySyncWatchOnSameThread(); - - base::MessageLoop::current()->AddDestructionObserver(this); } InterfaceEndpointClient::~InterfaceEndpointClient() { DCHECK(thread_checker_.CalledOnValidThread()); - StopObservingIfNecessary(); - if (handle_.is_valid()) handle_.group_controller()->DetachEndpointClient(handle_); } @@ -351,17 +347,4 @@ } } -void InterfaceEndpointClient::StopObservingIfNecessary() { - if (!observing_message_loop_destruction_) - return; - - observing_message_loop_destruction_ = false; - base::MessageLoop::current()->RemoveDestructionObserver(this); -} - -void InterfaceEndpointClient::WillDestroyCurrentMessageLoop() { - StopObservingIfNecessary(); - NotifyError(base::nullopt); -} - } // namespace mojo
diff --git a/mojo/public/cpp/bindings/lib/no_interface.cc b/mojo/public/cpp/bindings/lib/no_interface.cc deleted file mode 100644 index 9e0945c..0000000 --- a/mojo/public/cpp/bindings/lib/no_interface.cc +++ /dev/null
@@ -1,20 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "mojo/public/cpp/bindings/no_interface.h" - -namespace mojo { - -const char* NoInterface::Name_ = "mojo::NoInterface"; - -bool NoInterfaceStub::Accept(Message* message) { - return false; -} - -bool NoInterfaceStub::AcceptWithResponder(Message* message, - MessageReceiver* responder) { - return false; -} - -} // namespace mojo
diff --git a/mojo/public/cpp/bindings/no_interface.h b/mojo/public/cpp/bindings/no_interface.h deleted file mode 100644 index 7520b8c..0000000 --- a/mojo/public/cpp/bindings/no_interface.h +++ /dev/null
@@ -1,51 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_ -#define MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_ - -#include "mojo/public/cpp/bindings/message.h" -#include "mojo/public/cpp/system/core.h" - -namespace mojo { - -// NoInterface is for use in cases when a non-existent or empty interface is -// needed. - -class NoInterfaceProxy; -class NoInterfaceStub; - -class NoInterface { - public: - static const char* Name_; - typedef NoInterfaceProxy Proxy_; - typedef NoInterfaceStub Stub_; - typedef PassThroughFilter RequestValidator_; - typedef PassThroughFilter ResponseValidator_; - virtual ~NoInterface() {} -}; - -class NoInterfaceProxy : public NoInterface { - public: - explicit NoInterfaceProxy(MessageReceiver* receiver) {} -}; - -class NoInterfaceStub : public MessageReceiverWithResponder { - public: - NoInterfaceStub() {} - void set_sink(NoInterface* sink) {} - NoInterface* sink() { return nullptr; } - bool Accept(Message* message) override; - bool AcceptWithResponder(Message* message, - MessageReceiver* responder) override; -}; - -// AnyInterface is for use in cases where any interface would do (e.g., see the -// Shell::Connect method). - -typedef NoInterface AnyInterface; - -} // namespace mojo - -#endif // MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_
diff --git a/mojo/public/cpp/bindings/strong_associated_binding.h b/mojo/public/cpp/bindings/strong_associated_binding.h index 4d77a35e..a1e299b 100644 --- a/mojo/public/cpp/bindings/strong_associated_binding.h +++ b/mojo/public/cpp/bindings/strong_associated_binding.h
@@ -29,7 +29,10 @@ base::WeakPtr<StrongAssociatedBinding<Interface>>; // This connects an interface implementation strongly to an associated pipe. -// When a connection error is detected the implementation is deleted. +// When a connection error is detected the implementation is deleted. If the +// task runner that a StrongAssociatedBinding is bound on is stopped, the +// connection error handler will not be invoked and the implementation will not +// be deleted. // // To use, call StrongAssociatedBinding<T>::Create() (see below) or the helper // MakeStrongAssociatedBinding function:
diff --git a/mojo/public/cpp/bindings/strong_binding.h b/mojo/public/cpp/bindings/strong_binding.h index 07f0c164..f4b4a061 100644 --- a/mojo/public/cpp/bindings/strong_binding.h +++ b/mojo/public/cpp/bindings/strong_binding.h
@@ -31,7 +31,9 @@ using StrongBindingPtr = base::WeakPtr<StrongBinding<Interface>>; // This connects an interface implementation strongly to a pipe. When a -// connection error is detected the implementation is deleted. +// connection error is detected the implementation is deleted. If the task +// runner that a StrongBinding is bound on is stopped, the connection error +// handler will not be invoked and the implementation will not be deleted. // // To use, call StrongBinding<T>::Create() (see below) or the helper // MakeStrongBinding function:
diff --git a/mojo/public/interfaces/bindings/tests/data/message_data b/mojo/public/interfaces/bindings/tests/data/message_data deleted file mode 100644 index b288878..0000000 --- a/mojo/public/interfaces/bindings/tests/data/message_data +++ /dev/null
@@ -1,25 +0,0 @@ -// File generated by mojo_message_generator. -0X10 -0X00 -0X00 -0X00 -0X02 -0X00 -0X00 -0X00 -0X15 -0X00 -0X00 -0X00 -0X00 -0X00 -0X00 -0X00 -0X09 -0X08 -0X07 -0X06 -0X00 -0X00 -0X00 -0X00
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl index ab56683..d33bf42 100644 --- a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl +++ b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
@@ -52,7 +52,6 @@ #include "mojo/public/cpp/bindings/lib/serialization.h" #include "mojo/public/cpp/bindings/lib/union_accessor.h" #include "mojo/public/cpp/bindings/native_struct.h" -#include "mojo/public/cpp/bindings/no_interface.h" #include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h" #include "mojo/public/cpp/bindings/struct_ptr.h" #include "mojo/public/cpp/bindings/struct_traits.h"
diff --git a/net/BUILD.gn b/net/BUILD.gn index a522d46..b3afa09 100644 --- a/net/BUILD.gn +++ b/net/BUILD.gn
@@ -1511,8 +1511,6 @@ "spdy/spdy_framer_decoder_adapter.h", "spdy/spdy_header_indexing.cc", "spdy/spdy_header_indexing.h", - "spdy/spdy_headers_block_parser.cc", - "spdy/spdy_headers_block_parser.h", "spdy/spdy_headers_handler_interface.h", "spdy/spdy_http_stream.cc", "spdy/spdy_http_stream.h", @@ -1538,7 +1536,6 @@ "spdy/spdy_stream.h", "spdy/spdy_write_queue.cc", "spdy/spdy_write_queue.h", - "spdy/write_blocked_list.h", "spdy/write_scheduler.h", "ssl/client_cert_store.h", "ssl/client_cert_store_mac.cc", @@ -4095,6 +4092,7 @@ "base/url_util_unittest.cc", "cert/caching_cert_verifier_unittest.cc", "cert/cert_verifier_unittest.cc", + "cert/cert_verify_proc_android_unittest.cc", "cert/cert_verify_proc_ios_unittest.cc", "cert/cert_verify_proc_unittest.cc", "cert/cert_verify_proc_whitelist_unittest.cc", @@ -4637,7 +4635,6 @@ "spdy/spdy_framer_test.cc", "spdy/spdy_header_block_test.cc", "spdy/spdy_header_indexing_test.cc", - "spdy/spdy_headers_block_parser_test.cc", "spdy/spdy_http_stream_unittest.cc", "spdy/spdy_http_utils_unittest.cc", "spdy/spdy_network_transaction_unittest.cc", @@ -4662,7 +4659,6 @@ "spdy/spdy_test_utils.cc", "spdy/spdy_test_utils.h", "spdy/spdy_write_queue_unittest.cc", - "spdy/write_blocked_list_test.cc", "ssl/channel_id_service_unittest.cc", "ssl/client_cert_store_mac_unittest.cc", "ssl/client_cert_store_nss_unittest.cc",
diff --git a/net/cert/cert_verify_proc_android.cc b/net/cert/cert_verify_proc_android.cc index 280421d3..0ce19d63 100644 --- a/net/cert/cert_verify_proc_android.cc +++ b/net/cert/cert_verify_proc_android.cc
@@ -9,6 +9,7 @@ #include "base/lazy_instance.h" #include "base/logging.h" +#include "base/metrics/histogram_macros.h" #include "base/sha1.h" #include "base/strings/string_piece.h" #include "crypto/sha2.h" @@ -19,28 +20,247 @@ #include "net/cert/cert_net_fetcher.h" #include "net/cert/cert_status_flags.h" #include "net/cert/cert_verify_result.h" +#include "net/cert/internal/cert_errors.h" +#include "net/cert/internal/parsed_certificate.h" #include "net/cert/x509_certificate.h" #include "third_party/boringssl/src/include/openssl/x509v3.h" +#include "url/gurl.h" namespace net { namespace { +// Used to fetch intermediates via AIA if necessary. base::LazyInstance<scoped_refptr<CertNetFetcher>>::Leaky g_cert_net_fetcher = LAZY_INSTANCE_INITIALIZER; +// TODO(joth): Fetch the authentication type from SSL rather than hardcode. +const char kAuthType[] = "RSA"; + +// The maximum number of AIA fetches that TryVerifyWithAIAFetching() will +// attempt. If a valid chain cannot be built after this many fetches, +// TryVerifyWithAIAFetching() will give up and return +// CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT. +const unsigned int kMaxAIAFetches = 5; + +// Starting at certs[start], this function searches |certs| for an issuer of +// certs[start], then for an issuer of that issuer, and so on until it finds a +// certificate |cert| for which |certs| does not contain an issuer of +// |cert|. Returns a pointer to this |cert|, or nullptr if all certificates +// while path-building from |start| have an issuer in |certs| (including if +// there is a loop). Note that the returned certificate will be equal to |start| +// if |start| does not have an issuer in |certs|. +// +// TODO(estark): when searching for an issuer, this always uses the first +// encountered issuer in |certs|, and does not handle the situation where +// |certs| contains more than one issuer for a given certificate. +scoped_refptr<ParsedCertificate> FindLastCertWithUnknownIssuer( + const ParsedCertificateList& certs, + const scoped_refptr<ParsedCertificate>& start) { + DCHECK_GE(certs.size(), 1u); + std::set<scoped_refptr<ParsedCertificate>> used_in_path; + scoped_refptr<ParsedCertificate> last = start; + while (true) { + used_in_path.insert(last); + scoped_refptr<ParsedCertificate> last_issuer; + // Find an issuer for |last| (which might be |last| itself if self-signed). + for (const auto& cert : certs) { + if (cert->normalized_subject() == last->normalized_issuer()) { + last_issuer = cert; + break; + } + } + if (!last_issuer) { + // There is no issuer for |last| in |certs|. + return last; + } + if (last_issuer->normalized_subject() == last_issuer->normalized_issuer()) { + // A chain can be built from |start| to a self-signed certificate, so + // return nullptr to indicate that there is no certificate with an unknown + // issuer. + return nullptr; + } + if (used_in_path.find(last_issuer) != used_in_path.end()) { + // |certs| contains a loop. + return nullptr; + } + // Continue the search for |last_issuer|'s issuer. + last = last_issuer; + } + NOTREACHED(); + return nullptr; +} + +// Uses |fetcher| to fetch issuers from |uri|. If the fetch succeeds, the +// certificate is parsed and added to |cert_list|. Returns true if the fetch was +// successful and the result could be parsed as a certificate, and false +// otherwise. +bool PerformAIAFetchAndAddResultToVector(scoped_refptr<CertNetFetcher> fetcher, + base::StringPiece uri, + ParsedCertificateList* cert_list) { + GURL url(uri); + if (!url.is_valid()) + return false; + std::unique_ptr<CertNetFetcher::Request> request(fetcher->FetchCaIssuers( + url, CertNetFetcher::DEFAULT, CertNetFetcher::DEFAULT)); + Error error; + std::vector<uint8_t> aia_fetch_bytes; + request->WaitForResult(&error, &aia_fetch_bytes); + if (error != OK) + return false; + CertErrors errors; + return ParsedCertificate::CreateAndAddToVector( + aia_fetch_bytes.data(), aia_fetch_bytes.size(), {}, cert_list, &errors); +} + +// Uses android::VerifyX509CertChain() to verify the certificates in |certs| for +// |hostname| and returns the verification status. If the verification was +// successful, this function populates |verify_result| and |verified_chain|; +// otherwise it leaves them untouched. +android::CertVerifyStatusAndroid AttemptVerificationAfterAIAFetch( + const ParsedCertificateList& certs, + const std::string& hostname, + CertVerifyResult* verify_result, + std::vector<std::string>* verified_chain) { + std::vector<std::string> cert_bytes; + for (const auto& cert : certs) { + cert_bytes.push_back(cert->der_cert().AsString()); + } + + bool is_issued_by_known_root; + std::vector<std::string> candidate_verified_chain; + android::CertVerifyStatusAndroid status; + android::VerifyX509CertChain(cert_bytes, kAuthType, hostname, &status, + &is_issued_by_known_root, + &candidate_verified_chain); + + if (status == android::CERT_VERIFY_STATUS_ANDROID_OK) { + verify_result->is_issued_by_known_root = is_issued_by_known_root; + *verified_chain = candidate_verified_chain; + } + return status; +} + +// After a CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT error is encountered, this +// function can be called to fetch intermediates and retry verification. +// +// It will start from the first certificate in |cert_bytes| and construct a +// chain as far as it can using certificates in |cert_bytes|, and then +// iteratively fetch issuers from any AIA URLs in the last certificate in this +// chain. It will fetch issuers until it encounters a chain that verifies with +// status CERT_VERIFY_STATUS_ANDROID_OK, or it runs out of AIA URLs to fetch, or +// it has attempted |kMaxAIAFetches| fetches. +// +// If it finds a chain that verifies successfully, it returns +// CERT_VERIFY_STATUS_ANDROID_OK and sets |verify_result| and |verified_chain| +// correspondingly. Otherwise, it returns +// CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT and does not modify +// |verify_result| or |verified_chain|. +android::CertVerifyStatusAndroid TryVerifyWithAIAFetching( + const std::vector<std::string>& cert_bytes, + const std::string& hostname, + scoped_refptr<CertNetFetcher> cert_net_fetcher, + CertVerifyResult* verify_result, + std::vector<std::string>* verified_chain) { + if (!base::FeatureList::IsEnabled(CertVerifyProcAndroid::kAIAFetchingFeature)) + return android::CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT; + + if (!cert_net_fetcher) + return android::CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT; + + // Convert the certificates into ParsedCertificates for ease of pulling out + // AIA URLs. + CertErrors errors; + ParsedCertificateList certs; + for (const auto& cert : cert_bytes) { + if (!ParsedCertificate::CreateAndAddToVector(cert, {}, &certs, &errors)) { + return android::CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT; + } + } + + // Build a chain as far as possible from the target certificate at index 0, + // using the initially provided certificates. + scoped_refptr<ParsedCertificate> last_cert_with_unknown_issuer = + FindLastCertWithUnknownIssuer(certs, certs[0].get()); + if (!last_cert_with_unknown_issuer) { + // |certs| either contains a loop, or contains a full chain to a self-signed + // certificate. Do not attempt AIA fetches for such a chain. + return android::CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT; + } + + unsigned int num_aia_fetches = 0; + while (true) { + // If chain-building has terminated in a certificate that does not have an + // AIA URL, give up. + // + // TODO(estark): Instead of giving up at this point, it would be more robust + // to go back to the certificate before |last_cert| in the chain and attempt + // an AIA fetch from that point (if one hasn't already been done). This + // would accomodate chains where the server serves Leaf -> I1 signed by a + // root not in the client's trust store, but AIA fetching would yield an + // intermediate I2 signed by a root that *is* in the client's trust store. + if (!last_cert_with_unknown_issuer->has_authority_info_access()) + return android::CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT; + + for (const auto& uri : last_cert_with_unknown_issuer->ca_issuers_uris()) { + num_aia_fetches++; + if (num_aia_fetches > kMaxAIAFetches) + return android::CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT; + if (!PerformAIAFetchAndAddResultToVector(cert_net_fetcher, uri, &certs)) + continue; + android::CertVerifyStatusAndroid status = + AttemptVerificationAfterAIAFetch(certs, hostname, verify_result, + verified_chain); + if (status == android::CERT_VERIFY_STATUS_ANDROID_OK) + return status; + } + + // If verification still failed but the path expanded, continue to attempt + // AIA fetches. + scoped_refptr<ParsedCertificate> new_last_cert_with_unknown_issuer = + FindLastCertWithUnknownIssuer(certs, last_cert_with_unknown_issuer); + if (!new_last_cert_with_unknown_issuer || + new_last_cert_with_unknown_issuer == last_cert_with_unknown_issuer) { + // The last round of AIA fetches (if there were any) didn't expand the + // path, or it did such that |certs| now contains a full path to an + // (untrusted) root or a loop. + // + // TODO(estark): As above, it would be more robust to go back one + // certificate and attempt an AIA fetch from that point. + return android::CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT; + } + last_cert_with_unknown_issuer = new_last_cert_with_unknown_issuer; + } + + NOTREACHED(); + return android::CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT; +} + // Returns true if the certificate verification call was successful (regardless // of its result), i.e. if |verify_result| was set. Otherwise returns false. -bool VerifyFromAndroidTrustManager(const std::vector<std::string>& cert_bytes, - const std::string& hostname, - CertVerifyResult* verify_result) { +bool VerifyFromAndroidTrustManager( + const std::vector<std::string>& cert_bytes, + const std::string& hostname, + scoped_refptr<CertNetFetcher> cert_net_fetcher, + CertVerifyResult* verify_result) { android::CertVerifyStatusAndroid status; std::vector<std::string> verified_chain; - // TODO(joth): Fetch the authentication type from SSL rather than hardcode. - android::VerifyX509CertChain(cert_bytes, "RSA", hostname, - &status, &verify_result->is_issued_by_known_root, + android::VerifyX509CertChain(cert_bytes, kAuthType, hostname, &status, + &verify_result->is_issued_by_known_root, &verified_chain); + + // If verification resulted in a NO_TRUSTED_ROOT error, then fetch + // intermediates and retry. + if (status == android::CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT) { + status = TryVerifyWithAIAFetching(cert_bytes, hostname, + std::move(cert_net_fetcher), + verify_result, &verified_chain); + UMA_HISTOGRAM_BOOLEAN( + "Net.Certificate.VerificationSuccessAfterAIAFetchingNeeded", + status == android::CERT_VERIFY_STATUS_ANDROID_OK); + } + switch (status) { case android::CERT_VERIFY_STATUS_ANDROID_FAILED: return false; @@ -127,6 +347,10 @@ } // namespace +// static. +const base::Feature CertVerifyProcAndroid::kAIAFetchingFeature{ + "AndroidAIAFetching", base::FEATURE_DISABLED_BY_DEFAULT}; + CertVerifyProcAndroid::CertVerifyProcAndroid() {} CertVerifyProcAndroid::~CertVerifyProcAndroid() {} @@ -139,6 +363,14 @@ } // static +void CertVerifyProcAndroid::SetCertNetFetcherForTesting( + scoped_refptr<CertNetFetcher> cert_net_fetcher) { + if (g_cert_net_fetcher.Get()) + g_cert_net_fetcher.Get()->Shutdown(); + g_cert_net_fetcher.Get() = std::move(cert_net_fetcher); +} + +// static void CertVerifyProcAndroid::ShutdownCertNetFetcher() { g_cert_net_fetcher.Get()->Shutdown(); } @@ -167,7 +399,8 @@ std::vector<std::string> cert_bytes; if (!GetChainDEREncodedBytes(cert, &cert_bytes)) return ERR_CERT_INVALID; - if (!VerifyFromAndroidTrustManager(cert_bytes, hostname, verify_result)) { + if (!VerifyFromAndroidTrustManager(cert_bytes, hostname, + g_cert_net_fetcher.Get(), verify_result)) { NOTREACHED(); return ERR_FAILED; }
diff --git a/net/cert/cert_verify_proc_android.h b/net/cert/cert_verify_proc_android.h index 755da26..b56d396 100644 --- a/net/cert/cert_verify_proc_android.h +++ b/net/cert/cert_verify_proc_android.h
@@ -5,6 +5,7 @@ #ifndef NET_CERT_CERT_VERIFY_PROC_ANDROID_H_ #define NET_CERT_CERT_VERIFY_PROC_ANDROID_H_ +#include "base/feature_list.h" #include "base/macros.h" #include "base/memory/ref_counted.h" #include "net/base/net_export.h" @@ -20,12 +21,22 @@ public: CertVerifyProcAndroid(); + // If enabled, when VerifyInternal() encounters an untrusted root error, it + // will attempt to fetch intermediates and retry verification. + static const base::Feature kAIAFetchingFeature; + // Sets a global CertNetFetcher to be used for AIA fetches that are required // by VerifyInternal(). If not called, VerifyInternal() will not do its own // AIA fetching and will instead rely solely on the platform TrustManager. Can // only be called once. static void SetCertNetFetcher(scoped_refptr<CertNetFetcher> cert_net_fetcher); + // Like SetCertNetFetcher, but allows the global CertNetFetcher to be set more + // than once. If one has already been set, shuts it down and then sets it to + // |cert_net_fetcher|. + static void SetCertNetFetcherForTesting( + scoped_refptr<CertNetFetcher> cert_net_fetcher); + // Shuts down the global CertNetFetcher used for AIA fetches required by // VerifyInternal(). In-progress fetches will be cancelled and subsequent // fetches cancelled immediately. Assumes that SetCertNetFetcher() has been
diff --git a/net/cert/cert_verify_proc_android_unittest.cc b/net/cert/cert_verify_proc_android_unittest.cc new file mode 100644 index 0000000..e4648f3 --- /dev/null +++ b/net/cert/cert_verify_proc_android_unittest.cc
@@ -0,0 +1,410 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "net/cert/cert_verify_proc_android.h" + +#include <vector> + +#include "base/memory/ptr_util.h" +#include "base/test/scoped_feature_list.h" +#include "net/cert/cert_net_fetcher.h" +#include "net/cert/cert_verify_proc_android.h" +#include "net/cert/cert_verify_result.h" +#include "net/cert/internal/test_helpers.h" +#include "net/cert/test_root_certs.h" +#include "net/cert/x509_certificate.h" +#include "net/test/cert_test_util.h" +#include "net/test/test_certificate_data.h" +#include "net/test/test_data_directory.h" +#include "testing/gmock/include/gmock/gmock-matchers.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "url/gurl.h" + +using ::testing::ByMove; +using ::testing::Return; +using ::testing::_; + +namespace net { + +namespace { + +// A CertNetFetcher::Request whose WaitForResult() method always +// immediately returns the |error| and |bytes| provided in its +// constructor. +class TestCertNetFetcherRequest : public CertNetFetcher::Request { + public: + TestCertNetFetcherRequest(Error error, const std::vector<uint8_t>& bytes) + : error_(error), bytes_(bytes) {} + ~TestCertNetFetcherRequest() override {} + + void WaitForResult(Error* error, std::vector<uint8_t>* bytes) override { + *error = error_; + *bytes = bytes_; + } + + private: + Error error_; + std::vector<uint8_t> bytes_; +}; + +class MockCertNetFetcher : public CertNetFetcher { + public: + MockCertNetFetcher() {} + + MOCK_METHOD0(Shutdown, void()); + MOCK_METHOD3(FetchCaIssuers, std::unique_ptr<Request>(const GURL&, int, int)); + MOCK_METHOD3(FetchCrl, std::unique_ptr<Request>(const GURL&, int, int)); + MOCK_METHOD3(FetchOcsp, std::unique_ptr<Request>(const GURL&, int, int)); + + private: + ~MockCertNetFetcher() override {} +}; + +std::unique_ptr<CertNetFetcher::Request> CreateMockRequestFromX509Certificate( + Error error, + const scoped_refptr<X509Certificate>& cert) { + std::string der; + EXPECT_TRUE(X509Certificate::GetDEREncoded(cert->os_cert_handle(), &der)); + return base::MakeUnique<TestCertNetFetcherRequest>( + error, std::vector<uint8_t>(der.data(), der.data() + der.length())); +} + +std::unique_ptr<CertNetFetcher::Request> CreateMockRequestWithError( + Error error) { + return base::MakeUnique<TestCertNetFetcherRequest>(error, + std::vector<uint8_t>({})); +} + +std::unique_ptr<CertNetFetcher::Request> +CreateMockRequestWithInvalidCertificate() { + return base::MakeUnique<TestCertNetFetcherRequest>( + OK, std::vector<uint8_t>({1, 2, 3})); +} + +::testing::AssertionResult ReadTestPem(const std::string& file_name, + const std::string& block_name, + std::string* result) { + const PemBlockMapping mappings[] = { + {block_name.c_str(), result}, + }; + + return ReadTestDataFromPemFile(file_name, mappings); +} + +::testing::AssertionResult ReadTestCert( + const std::string& file_name, + scoped_refptr<X509Certificate>* result) { + std::string der; + ::testing::AssertionResult r = + ReadTestPem("net/data/cert_issuer_source_aia_unittest/" + file_name, + "CERTIFICATE", &der); + if (!r) + return r; + *result = X509Certificate::CreateFromBytes(der.data(), der.length()); + if (!result) { + return ::testing::AssertionFailure() + << "X509Certificate::CreateFromBytes() failed"; + } + return ::testing::AssertionSuccess(); +} + +::testing::AssertionResult ReadTestAIARoot( + scoped_refptr<X509Certificate>* result) { + return ReadTestCert("root.pem", result); +} + +::testing::AssertionResult CreateCertificateChainFromFiles( + const std::vector<std::string>& files, + scoped_refptr<X509Certificate>* result) { + scoped_refptr<X509Certificate> leaf; + ::testing::AssertionResult r = ReadTestCert(files[0], &leaf); + if (!r) + return r; + CertificateList intermediates; + X509Certificate::OSCertHandles intermediate_os_cert_handles; + for (size_t i = 1; i < files.size(); i++) { + scoped_refptr<X509Certificate> intermediate; + r = ReadTestCert(files[i], &intermediate); + if (!r) + return r; + intermediates.push_back(intermediate); + intermediate_os_cert_handles.push_back(intermediate->os_cert_handle()); + } + *result = X509Certificate::CreateFromHandle(leaf->os_cert_handle(), + intermediate_os_cert_handles); + return ::testing::AssertionSuccess(); +} + +// A test fixture for testing CertVerifyProcAndroid AIA fetching. It creates, +// sets up, and shuts down a MockCertNetFetcher for CertVerifyProcAndroid to +// use, and enables the field trial for AIA fetching. +class CertVerifyProcAndroidTestWithAIAFetching : public testing::Test { + public: + void SetUp() override { + feature_list_.InitAndEnableFeature( + CertVerifyProcAndroid::kAIAFetchingFeature); + fetcher_ = make_scoped_refptr(new MockCertNetFetcher()); + CertVerifyProcAndroid::SetCertNetFetcherForTesting(fetcher_); + } + + void TearDown() override { + CertVerifyProcAndroid::ShutdownCertNetFetcher(); + // Ensure that mock expectations are checked, since the CertNetFetcher is + // global and leaky. + ASSERT_TRUE(testing::Mock::VerifyAndClearExpectations(fetcher_.get())); + } + + protected: + ::testing::AssertionResult SetUpTestRoot() { + ::testing::AssertionResult r = ReadTestAIARoot(&root_); + if (!r) + return r; + scoped_test_root_.reset(new ScopedTestRoot(root_.get())); + return ::testing::AssertionSuccess(); + } + + scoped_refptr<MockCertNetFetcher> fetcher_; + const CertificateList empty_cert_list_; + + private: + base::test::ScopedFeatureList feature_list_; + scoped_refptr<X509Certificate> root_; + std::unique_ptr<ScopedTestRoot> scoped_test_root_; +}; + +} // namespace + +// Tests that if the proper intermediates are supplied in the server-sent chain, +// no AIA fetch occurs. +TEST_F(CertVerifyProcAndroidTestWithAIAFetching, + NoFetchIfProperIntermediatesSupplied) { + ASSERT_TRUE(SetUpTestRoot()); + scoped_refptr<CertVerifyProcAndroid> proc = + make_scoped_refptr(new CertVerifyProcAndroid()); + scoped_refptr<X509Certificate> leaf; + ASSERT_TRUE( + CreateCertificateChainFromFiles({"target_one_aia.pem", "i.pem"}, &leaf)); + CertVerifyResult verify_result; + EXPECT_EQ(OK, proc->Verify(leaf.get(), "target", std::string(), 0, nullptr, + empty_cert_list_, &verify_result)); +} + +// Tests that if the certificate does not contain an AIA URL, no AIA fetch +// occurs. +TEST_F(CertVerifyProcAndroidTestWithAIAFetching, NoAIAURL) { + ASSERT_TRUE(SetUpTestRoot()); + scoped_refptr<CertVerifyProcAndroid> proc = + make_scoped_refptr(new CertVerifyProcAndroid()); + scoped_refptr<X509Certificate> cert; + ASSERT_TRUE(ReadTestCert("target_no_aia.pem", &cert)); + CertVerifyResult verify_result; + EXPECT_EQ(ERR_CERT_AUTHORITY_INVALID, + proc->Verify(cert.get(), "target", std::string(), 0, nullptr, + empty_cert_list_, &verify_result)); +} + +// Tests that if a certificate contains one file:// URL and one http:// URL, +// there are two fetches, with the latter resulting in a successful +// verification. +TEST_F(CertVerifyProcAndroidTestWithAIAFetching, OneFileAndOneHTTPURL) { + ASSERT_TRUE(SetUpTestRoot()); + scoped_refptr<CertVerifyProcAndroid> proc = + make_scoped_refptr(new CertVerifyProcAndroid()); + scoped_refptr<X509Certificate> cert; + ASSERT_TRUE(ReadTestCert("target_file_and_http_aia.pem", &cert)); + scoped_refptr<X509Certificate> intermediate; + ASSERT_TRUE(ReadTestCert("i2.pem", &intermediate)); + + // Expect two fetches: the file:// URL (which returns an error), and the + // http:// URL that returns a valid intermediate signed by |root_|. Though the + // intermediate itself contains an AIA URL, it should not be fetched because + // |root_| is in the test trust store. + EXPECT_CALL(*fetcher_, FetchCaIssuers(GURL("file:///dev/null"), _, _)) + .WillOnce(Return( + ByMove(CreateMockRequestWithError(ERR_DISALLOWED_URL_SCHEME)))); + EXPECT_CALL(*fetcher_, + FetchCaIssuers(GURL("http://url-for-aia2/I2.foo"), _, _)) + .WillOnce(Return( + ByMove(CreateMockRequestFromX509Certificate(OK, intermediate)))); + + CertVerifyResult verify_result; + EXPECT_EQ(OK, proc->Verify(cert.get(), "target", std::string(), 0, nullptr, + empty_cert_list_, &verify_result)); +} + +// Tests that if an AIA request returns the wrong intermediate, certificate +// verification should fail. +TEST_F(CertVerifyProcAndroidTestWithAIAFetching, + UnsuccessfulVerificationWithLeafOnly) { + ASSERT_TRUE(SetUpTestRoot()); + scoped_refptr<CertVerifyProcAndroid> proc = + make_scoped_refptr(new CertVerifyProcAndroid()); + scoped_refptr<X509Certificate> cert; + ASSERT_TRUE(ReadTestCert("target_one_aia.pem", &cert)); + const scoped_refptr<X509Certificate> bad_intermediate = + ImportCertFromFile(GetTestCertsDirectory(), "ok_cert.pem"); + + EXPECT_CALL(*fetcher_, FetchCaIssuers(GURL("http://url-for-aia/I.cer"), _, _)) + .WillOnce(Return( + ByMove(CreateMockRequestFromX509Certificate(OK, bad_intermediate)))); + + CertVerifyResult verify_result; + EXPECT_EQ(ERR_CERT_AUTHORITY_INVALID, + proc->Verify(cert.get(), "target", std::string(), 0, nullptr, + empty_cert_list_, &verify_result)); +} + +// Tests that if an AIA request returns an error, certificate verification +// should fail. +TEST_F(CertVerifyProcAndroidTestWithAIAFetching, + UnsuccessfulVerificationWithLeafOnlyAndErrorOnFetch) { + ASSERT_TRUE(SetUpTestRoot()); + scoped_refptr<CertVerifyProcAndroid> proc = + make_scoped_refptr(new CertVerifyProcAndroid()); + scoped_refptr<X509Certificate> cert; + ASSERT_TRUE(ReadTestCert("target_one_aia.pem", &cert)); + + EXPECT_CALL(*fetcher_, FetchCaIssuers(GURL("http://url-for-aia/I.cer"), _, _)) + .WillOnce(Return(ByMove(CreateMockRequestWithError(ERR_FAILED)))); + + CertVerifyResult verify_result; + EXPECT_EQ(ERR_CERT_AUTHORITY_INVALID, + proc->Verify(cert.get(), "target", std::string(), 0, nullptr, + empty_cert_list_, &verify_result)); +} + +// Tests that if an AIA request returns an unparseable cert, certificate +// verification should fail. +TEST_F(CertVerifyProcAndroidTestWithAIAFetching, + UnsuccessfulVerificationWithLeafOnlyAndUnparseableFetch) { + ASSERT_TRUE(SetUpTestRoot()); + scoped_refptr<CertVerifyProcAndroid> proc = + make_scoped_refptr(new CertVerifyProcAndroid()); + scoped_refptr<X509Certificate> cert; + ASSERT_TRUE(ReadTestCert("target_one_aia.pem", &cert)); + + EXPECT_CALL(*fetcher_, FetchCaIssuers(GURL("http://url-for-aia/I.cer"), _, _)) + .WillOnce(Return(ByMove(CreateMockRequestWithInvalidCertificate()))); + + CertVerifyResult verify_result; + EXPECT_EQ(ERR_CERT_AUTHORITY_INVALID, + proc->Verify(cert.get(), "target", std::string(), 0, nullptr, + empty_cert_list_, &verify_result)); +} + +// Tests that if a certificate has two HTTP AIA URLs, they are both fetched. If +// one serves an unrelated certificate and one serves a proper intermediate, the +// latter should be used to build a valid chain. +TEST_F(CertVerifyProcAndroidTestWithAIAFetching, TwoHTTPURLs) { + ASSERT_TRUE(SetUpTestRoot()); + scoped_refptr<CertVerifyProcAndroid> proc = + make_scoped_refptr(new CertVerifyProcAndroid()); + scoped_refptr<X509Certificate> cert; + ASSERT_TRUE(ReadTestCert("target_two_aia.pem", &cert)); + scoped_refptr<X509Certificate> intermediate; + ASSERT_TRUE(ReadTestCert("i2.pem", &intermediate)); + scoped_refptr<X509Certificate> unrelated; + ASSERT_TRUE(ReadTestCert("target_three_aia.pem", &unrelated)); + + // Expect two fetches, the first of which returns an unrelated certificate + // that is not useful in chain-building, and the second of which returns a + // valid intermediate signed by |root_|. Though the intermediate itself + // contains an AIA URL, it should not be fetched because |root_| is in the + // trust store. + EXPECT_CALL(*fetcher_, FetchCaIssuers(GURL("http://url-for-aia/I.cer"), _, _)) + .WillOnce( + Return(ByMove(CreateMockRequestFromX509Certificate(OK, unrelated)))); + EXPECT_CALL(*fetcher_, + FetchCaIssuers(GURL("http://url-for-aia2/I2.foo"), _, _)) + .WillOnce(Return( + ByMove(CreateMockRequestFromX509Certificate(OK, intermediate)))); + + CertVerifyResult verify_result; + EXPECT_EQ(OK, proc->Verify(cert.get(), "target", std::string(), 0, nullptr, + empty_cert_list_, &verify_result)); +} + +// Tests that if an intermediate is fetched via AIA, and the intermediate itself +// has an AIA URL, that URL is fetched if necessary. +TEST_F(CertVerifyProcAndroidTestWithAIAFetching, + AIAFetchForFetchedIntermediate) { + // Do not set up the test root to be trusted. If the test root were trusted, + // then the intermediate i2.pem would not require an AIA fetch. With the test + // root untrusted, i2.pem does not verify and so it will trigger an AIA fetch. + scoped_refptr<CertVerifyProcAndroid> proc = + make_scoped_refptr(new CertVerifyProcAndroid()); + scoped_refptr<X509Certificate> cert; + ASSERT_TRUE(ReadTestCert("target_one_aia.pem", &cert)); + scoped_refptr<X509Certificate> intermediate; + ASSERT_TRUE(ReadTestCert("i2.pem", &intermediate)); + scoped_refptr<X509Certificate> root; + ASSERT_TRUE(ReadTestAIARoot(&root)); + + // Expect two fetches, the first of which returns an intermediate that itself + // has an AIA URL. + EXPECT_CALL(*fetcher_, FetchCaIssuers(GURL("http://url-for-aia/I.cer"), _, _)) + .WillOnce(Return( + ByMove(CreateMockRequestFromX509Certificate(OK, intermediate)))); + EXPECT_CALL(*fetcher_, + FetchCaIssuers(GURL("http://url-for-aia/Root.cer"), _, _)) + .WillOnce(Return(ByMove(CreateMockRequestFromX509Certificate(OK, root)))); + + CertVerifyResult verify_result; + // This chain results in an AUTHORITY_INVALID root because |root_| is not + // trusted. + EXPECT_EQ(ERR_CERT_AUTHORITY_INVALID, + proc->Verify(cert.get(), "target", std::string(), 0, nullptr, + empty_cert_list_, &verify_result)); +} + +// Tests that if a certificate contains six AIA URLs, only the first five are +// fetched, since the maximum number of fetches per Verify() call is five. +TEST_F(CertVerifyProcAndroidTestWithAIAFetching, MaxAIAFetches) { + ASSERT_TRUE(SetUpTestRoot()); + scoped_refptr<CertVerifyProcAndroid> proc = + make_scoped_refptr(new CertVerifyProcAndroid()); + scoped_refptr<X509Certificate> cert; + ASSERT_TRUE(ReadTestCert("target_six_aia.pem", &cert)); + + EXPECT_CALL(*fetcher_, FetchCaIssuers(_, _, _)) + .WillOnce(Return(ByMove(CreateMockRequestWithError(ERR_FAILED)))) + .WillOnce(Return(ByMove(CreateMockRequestWithError(ERR_FAILED)))) + .WillOnce(Return(ByMove(CreateMockRequestWithError(ERR_FAILED)))) + .WillOnce(Return(ByMove(CreateMockRequestWithError(ERR_FAILED)))) + .WillOnce(Return(ByMove(CreateMockRequestWithError(ERR_FAILED)))); + + CertVerifyResult verify_result; + EXPECT_EQ(ERR_CERT_AUTHORITY_INVALID, + proc->Verify(cert.get(), "target", std::string(), 0, nullptr, + empty_cert_list_, &verify_result)); +} + +// Tests that if the supplied chain contains an intermediate with an AIA URL, +// that AIA URL is fetched if necessary. +TEST_F(CertVerifyProcAndroidTestWithAIAFetching, FetchForSuppliedIntermediate) { + // Do not set up the test root to be trusted. If the test root were trusted, + // then the intermediate i.pem would not require an AIA fetch. With the test + // root untrusted, i.pem does not verify and so it will trigger an AIA fetch. + scoped_refptr<CertVerifyProcAndroid> proc = + make_scoped_refptr(new CertVerifyProcAndroid()); + scoped_refptr<X509Certificate> leaf; + ASSERT_TRUE( + CreateCertificateChainFromFiles({"target_one_aia.pem", "i.pem"}, &leaf)); + scoped_refptr<X509Certificate> root; + ASSERT_TRUE(ReadTestAIARoot(&root)); + + EXPECT_CALL(*fetcher_, + FetchCaIssuers(GURL("http://url-for-aia/Root.cer"), _, _)) + .WillOnce(Return(ByMove(CreateMockRequestFromX509Certificate(OK, root)))); + + CertVerifyResult verify_result; + // This chain results in an AUTHORITY_INVALID root because |root_| is not + // trusted. + EXPECT_EQ(ERR_CERT_AUTHORITY_INVALID, + proc->Verify(leaf.get(), "target", std::string(), 0, nullptr, + empty_cert_list_, &verify_result)); +} + +} // namespace net
diff --git a/net/data/cert_issuer_source_aia_unittest/generate-certs.py b/net/data/cert_issuer_source_aia_unittest/generate-certs.py index e854c13..b758e5a6 100755 --- a/net/data/cert_issuer_source_aia_unittest/generate-certs.py +++ b/net/data/cert_issuer_source_aia_unittest/generate-certs.py
@@ -9,10 +9,13 @@ import common +common.set_default_validity_range(common.JANUARY_1_2015_UTC, + common.JANUARY_1_2021_UTC) -# Self-signed root certificate. Not saved to a .pem since the test doesn't need -# it. + +# Self-signed root certificate. root = common.create_self_signed_root_certificate('Root') +common.write_string_to_file(root.get_cert_pem(), 'root.pem') # Intermediate certificates. All have the same subject and key. @@ -20,11 +23,11 @@ common.write_string_to_file(i_base.get_cert_pem(), 'i.pem') i2 = common.create_intermediate_certificate('I', root) -i2.set_key_path(i_base.get_key_path()) +i2.set_key(i_base.get_key()) common.write_string_to_file(i2.get_cert_pem(), 'i2.pem') i3 = common.create_intermediate_certificate('I', root) -i3.set_key_path(i_base.get_key_path()) +i3.set_key(i_base.get_key()) common.write_string_to_file(i3.get_cert_pem(), 'i3.pem') @@ -32,23 +35,23 @@ # files so the target certs will have the desired Authority Information Access # values. These ones aren't saved to files. i_no_aia = common.create_intermediate_certificate('I', root) -i_no_aia.set_key_path(i_base.get_key_path()) +i_no_aia.set_key(i_base.get_key()) section = i_no_aia.config.get_section('signing_ca_ext') section.set_property('authorityInfoAccess', None) i_two_aia = common.create_intermediate_certificate('I', root) -i_two_aia.set_key_path(i_base.get_key_path()) +i_two_aia.set_key(i_base.get_key()) section = i_two_aia.config.get_section('issuer_info') section.set_property('caIssuers;URI.1', 'http://url-for-aia2/I2.foo') i_three_aia = common.create_intermediate_certificate('I', root) -i_three_aia.set_key_path(i_base.get_key_path()) +i_three_aia.set_key(i_base.get_key()) section = i_three_aia.config.get_section('issuer_info') section.set_property('caIssuers;URI.1', 'http://url-for-aia2/I2.foo') section.set_property('caIssuers;URI.2', 'http://url-for-aia3/I3.foo') i_six_aia = common.create_intermediate_certificate('I', root) -i_six_aia.set_key_path(i_base.get_key_path()) +i_six_aia.set_key(i_base.get_key()) section = i_six_aia.config.get_section('issuer_info') section.set_property('caIssuers;URI.1', 'http://url-for-aia2/I2.foo') section.set_property('caIssuers;URI.2', 'http://url-for-aia3/I3.foo') @@ -57,23 +60,23 @@ section.set_property('caIssuers;URI.5', 'http://url-for-aia6/I6.foo') i_file_aia = common.create_intermediate_certificate('I', root) -i_file_aia.set_key_path(i_base.get_key_path()) +i_file_aia.set_key(i_base.get_key()) section = i_file_aia.config.get_section('issuer_info') section.set_property('caIssuers;URI.0', 'file:///dev/null') i_invalid_url_aia = common.create_intermediate_certificate('I', root) -i_invalid_url_aia.set_key_path(i_base.get_key_path()) +i_invalid_url_aia.set_key(i_base.get_key()) section = i_invalid_url_aia.config.get_section('issuer_info') section.set_property('caIssuers;URI.0', 'foobar') i_file_and_http_aia = common.create_intermediate_certificate('I', root) -i_file_and_http_aia.set_key_path(i_base.get_key_path()) +i_file_and_http_aia.set_key(i_base.get_key()) section = i_file_and_http_aia.config.get_section('issuer_info') section.set_property('caIssuers;URI.0', 'file:///dev/null') section.set_property('caIssuers;URI.1', 'http://url-for-aia2/I2.foo') i_invalid_and_http_aia = common.create_intermediate_certificate('I', root) -i_invalid_and_http_aia.set_key_path(i_base.get_key_path()) +i_invalid_and_http_aia.set_key(i_base.get_key()) section = i_invalid_and_http_aia.config.get_section('issuer_info') section.set_property('caIssuers;URI.0', 'foobar') section.set_property('caIssuers;URI.1', 'http://url-for-aia2/I2.foo') @@ -109,4 +112,3 @@ target = common.create_end_entity_certificate('target', i_invalid_and_http_aia) common.write_string_to_file(target.get_cert_pem(), 'target_invalid_and_http_aia.pem') -
diff --git a/net/data/cert_issuer_source_aia_unittest/i.pem b/net/data/cert_issuer_source_aia_unittest/i.pem index 545e7f61..63ce691 100644 --- a/net/data/cert_issuer_source_aia_unittest/i.pem +++ b/net/data/cert_issuer_source_aia_unittest/i.pem
@@ -6,36 +6,36 @@ Issuer: CN=Root Validity Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT + Not After : Jan 1 12:00:00 2021 GMT Subject: CN=I Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b2:80:e2:cb:c2:ed:80:a5:7e:ac:10:1b:64:e9: - 57:2b:f2:a7:73:93:a3:f6:42:ef:38:1b:cd:82:d3: - 51:77:c4:87:76:f5:e5:17:d8:0d:da:2b:07:07:d3: - 37:88:4c:fd:2f:c0:e0:f1:79:04:fb:e7:b1:b0:80: - f1:95:b7:1c:ef:13:ca:c0:05:b5:2d:4a:f2:78:52: - d8:53:56:22:cd:f3:82:fb:ac:22:e8:ae:c5:14:35: - df:bd:83:f6:90:84:15:c7:b3:dc:ae:6c:16:e9:db: - a8:62:fe:66:8a:85:c8:d3:0d:9c:03:f8:ee:71:e9: - ab:8b:fe:f9:71:00:09:6a:67:90:c9:d6:43:e5:d8: - f4:12:d6:6f:4f:83:f4:00:58:e9:7a:df:11:9c:e7: - 28:fb:04:83:70:a8:9d:32:80:1c:ac:33:1c:78:0f: - a0:26:cc:37:29:08:41:65:1d:1e:95:40:e2:26:da: - 3e:6d:47:0b:b5:4f:7b:67:7e:72:2b:d3:f4:f0:fd: - 0c:d7:0d:2a:f1:82:11:2d:c0:f9:2d:d4:a0:bf:be: - 69:65:ce:3d:e8:a6:b2:8b:76:cb:9c:da:f0:a6:f8: - 0e:6b:ae:5c:47:ff:b1:0d:cd:ef:fc:d4:27:7b:d9: - 17:4a:f4:16:08:ae:bc:18:36:2e:8b:24:09:e2:9e: - d4:27 + 00:a7:94:9a:13:a0:38:6f:f9:cd:27:0d:9d:7d:f3: + 0c:fe:a0:dd:39:23:4d:33:d5:d9:88:c5:23:71:a1: + a7:f5:50:c7:c6:38:cb:88:41:87:e8:25:75:14:be: + 09:ef:4f:b1:48:c7:50:f6:de:05:85:4a:01:7c:6c: + e9:e1:4e:18:5f:43:38:cb:42:3a:e3:4a:7d:49:86: + f5:30:d8:44:70:4e:c9:77:3d:ba:d2:a4:cc:a5:df: + 8c:e9:58:f8:2d:a5:b4:7a:7e:23:4e:0f:89:a0:5f: + 0f:f1:47:95:bd:f4:2f:e9:3b:0e:ba:ef:e7:10:03: + 0a:94:9d:fe:65:86:49:4d:c2:4f:b6:dc:23:e7:30: + e6:10:64:0c:ed:4e:17:aa:1d:56:1d:6f:b8:3f:e5: + 8c:60:8a:f3:67:5a:04:6d:f3:84:98:01:db:11:c6: + e2:c4:fc:0a:5a:33:77:eb:38:35:21:45:c0:b3:30: + c2:95:4b:85:73:03:75:e5:9f:fd:a5:72:aa:21:64: + cd:26:a6:8d:7a:bc:68:6a:36:ab:fe:a6:16:9c:b9: + 93:e9:26:cf:cb:3c:9d:a9:26:18:d1:83:61:25:e4: + bc:6a:47:51:78:c9:1e:a2:38:10:8e:92:64:a8:aa: + 70:46:d3:cd:d2:5b:56:c3:98:ca:f1:b4:e0:cf:c9: + 48:b7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - A4:66:E2:46:F7:3F:A1:73:9D:A2:E2:4E:29:99:DB:2E:36:36:6C:B5 + 40:91:28:21:9D:93:F3:9C:18:1B:FF:00:9C:B2:08:A0:A3:81:7D:2A X509v3 Authority Key Identifier: - keyid:A7:58:01:D5:D6:00:71:D8:28:17:20:E0:01:09:EC:A5:39:90:7E:6E + keyid:E5:4E:96:E4:D9:82:36:BD:51:C3:57:BD:E6:DE:3C:C1:46:B4:49:0D Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -50,39 +50,39 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 24:1f:8e:82:17:12:1a:5e:1b:cc:a5:e6:4e:bc:10:92:83:be: - 5c:04:ee:39:a7:ec:93:50:26:96:65:03:f4:2d:a8:93:5f:3b: - 18:fb:b4:ef:88:7d:d4:9e:fb:fa:d8:09:69:a6:79:0c:b0:01: - 32:66:56:43:e9:db:9a:b3:7d:8b:7d:32:a9:08:81:0e:75:fb: - 49:12:35:c6:23:75:5c:06:58:9a:d3:c4:fa:38:1a:8b:20:d2: - 2d:97:81:45:19:11:2e:4b:f4:22:ae:e2:f5:1e:fc:c7:bd:55: - 57:1b:68:f5:95:c4:38:e2:af:82:ee:2d:2a:9f:c7:0b:6b:97: - d8:8b:02:d6:d7:24:70:31:2f:bf:66:fa:9d:ad:3e:f4:18:23: - 8d:b1:99:10:0d:0c:f2:72:12:90:06:2a:37:68:fd:a8:6f:a0: - 84:c5:01:1d:6b:37:50:21:7c:ca:9c:56:ae:06:39:70:8f:9d: - 06:09:9e:8d:e8:de:7b:64:29:f6:9b:f0:0e:56:20:b0:fb:43: - 3e:9f:a8:0b:a9:ee:50:db:b8:06:56:8b:33:08:58:45:5a:9b: - 3b:3e:d8:a4:38:22:d9:f3:a5:fa:e6:4e:b8:30:4b:2a:2a:ee: - 3f:f7:29:e0:be:ed:40:52:38:ae:ca:01:6a:3b:8a:d8:00:f4: - f3:54:42:90 + 96:0d:55:2e:09:b5:27:6b:48:e0:88:87:f2:fb:a0:04:99:c2: + 7d:8c:8c:ad:60:ff:dd:6a:69:f3:cc:08:c9:1e:02:29:7a:73: + e3:ee:ef:9e:c1:52:dd:3e:9d:d4:07:6a:39:0b:0a:a2:6a:1e: + 17:86:b5:8a:e4:53:f2:f7:00:bd:90:95:d2:08:9c:a3:28:2c: + 4d:38:2d:eb:a4:a8:c4:17:44:1d:f6:57:d8:6d:98:06:3b:a9: + 24:82:42:4e:8d:25:c9:5e:96:b6:f6:31:95:6c:49:3e:2d:15: + 37:30:6f:d4:f1:15:ad:c2:49:35:89:76:c6:ac:dc:85:e2:ce: + d3:ba:cc:fd:fe:51:3a:a0:e6:56:4c:f8:21:b7:5c:f0:2c:88: + fa:9e:e9:85:76:de:8a:aa:48:d1:3f:03:01:41:6e:55:83:80: + 5a:a0:36:5b:52:41:6e:2f:59:6d:07:fe:15:b1:7b:b7:c6:1b: + 84:61:61:c5:82:84:98:22:20:45:69:d1:36:ea:7f:db:e0:03: + d6:73:a0:a9:6b:70:f2:9b:98:5e:f2:3e:30:c8:f6:b9:c9:35: + 48:ae:68:21:ea:ec:9f:28:29:d2:88:bb:7e:e4:13:03:f9:79: + c9:2d:f7:41:90:28:4e:56:fc:c0:26:49:e4:0c:67:50:26:76: + 7d:ba:c1:1c -----BEGIN CERTIFICATE----- MIIDYjCCAkqgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDDEKMAgGA1UEAwwBSTCC -ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALKA4svC7YClfqwQG2TpVyvy -p3OTo/ZC7zgbzYLTUXfEh3b15RfYDdorBwfTN4hM/S/A4PF5BPvnsbCA8ZW3HO8T -ysAFtS1K8nhS2FNWIs3zgvusIuiuxRQ1372D9pCEFcez3K5sFunbqGL+ZoqFyNMN -nAP47nHpq4v++XEACWpnkMnWQ+XY9BLWb0+D9ABY6XrfEZznKPsEg3ConTKAHKwz -HHgPoCbMNykIQWUdHpVA4ibaPm1HC7VPe2d+civT9PD9DNcNKvGCES3A+S3UoL++ -aWXOPeimsot2y5za8Kb4DmuuXEf/sQ3N7/zUJ3vZF0r0FgiuvBg2LoskCeKe1CcC -AwEAAaOByzCByDAdBgNVHQ4EFgQUpGbiRvc/oXOdouJOKZnbLjY2bLUwHwYDVR0j -BBgwFoAUp1gB1dYAcdgoFyDgAQnspTmQfm4wNwYIKwYBBQUHAQEEKzApMCcGCCsG +MB4XDTE1MDEwMTEyMDAwMFoXDTIxMDEwMTEyMDAwMFowDDEKMAgGA1UEAwwBSTCC +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKeUmhOgOG/5zScNnX3zDP6g +3TkjTTPV2YjFI3Ghp/VQx8Y4y4hBh+gldRS+Ce9PsUjHUPbeBYVKAXxs6eFOGF9D +OMtCOuNKfUmG9TDYRHBOyXc9utKkzKXfjOlY+C2ltHp+I04PiaBfD/FHlb30L+k7 +Drrv5xADCpSd/mWGSU3CT7bcI+cw5hBkDO1OF6odVh1vuD/ljGCK82daBG3zhJgB +2xHG4sT8Clozd+s4NSFFwLMwwpVLhXMDdeWf/aVyqiFkzSamjXq8aGo2q/6mFpy5 +k+kmz8s8nakmGNGDYSXkvGpHUXjJHqI4EI6SZKiqcEbTzdJbVsOYyvG04M/JSLcC +AwEAAaOByzCByDAdBgNVHQ4EFgQUQJEoIZ2T85wYG/8AnLIIoKOBfSowHwYDVR0j +BBgwFoAU5U6W5NmCNr1Rw1e95t48wUa0SQ0wNwYIKwYBBQUHAQEEKzApMCcGCCsG AQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUwIzAh oB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQEAwIB -BjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAkH46CFxIaXhvM -peZOvBCSg75cBO45p+yTUCaWZQP0LaiTXzsY+7TviH3Unvv62AlppnkMsAEyZlZD -6duas32LfTKpCIEOdftJEjXGI3VcBlia08T6OBqLINItl4FFGREuS/QiruL1HvzH -vVVXG2j1lcQ44q+C7i0qn8cLa5fYiwLW1yRwMS+/ZvqdrT70GCONsZkQDQzychKQ -Bio3aP2ob6CExQEdazdQIXzKnFauBjlwj50GCZ6N6N57ZCn2m/AOViCw+0M+n6gL -qe5Q27gGVoszCFhFWps7PtikOCLZ86X65k64MEsqKu4/9yngvu1AUjiuygFqO4rY -APTzVEKQ +BjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCWDVUuCbUna0jg +iIfy+6AEmcJ9jIytYP/damnzzAjJHgIpenPj7u+ewVLdPp3UB2o5Cwqiah4XhrWK +5FPy9wC9kJXSCJyjKCxNOC3rpKjEF0Qd9lfYbZgGO6kkgkJOjSXJXpa29jGVbEk+ +LRU3MG/U8RWtwkk1iXbGrNyF4s7Tusz9/lE6oOZWTPght1zwLIj6numFdt6KqkjR +PwMBQW5Vg4BaoDZbUkFuL1ltB/4VsXu3xhuEYWHFgoSYIiBFadE26n/b4APWc6Cp +a3Dym5he8j4wyPa5yTVIrmgh6uyfKCnSiLt+5BMD+XnJLfdBkChOVvzAJknkDGdQ +JnZ9usEc -----END CERTIFICATE-----
diff --git a/net/data/cert_issuer_source_aia_unittest/i2.pem b/net/data/cert_issuer_source_aia_unittest/i2.pem index dbf13499..995570d 100644 --- a/net/data/cert_issuer_source_aia_unittest/i2.pem +++ b/net/data/cert_issuer_source_aia_unittest/i2.pem
@@ -6,36 +6,36 @@ Issuer: CN=Root Validity Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT + Not After : Jan 1 12:00:00 2021 GMT Subject: CN=I Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b2:80:e2:cb:c2:ed:80:a5:7e:ac:10:1b:64:e9: - 57:2b:f2:a7:73:93:a3:f6:42:ef:38:1b:cd:82:d3: - 51:77:c4:87:76:f5:e5:17:d8:0d:da:2b:07:07:d3: - 37:88:4c:fd:2f:c0:e0:f1:79:04:fb:e7:b1:b0:80: - f1:95:b7:1c:ef:13:ca:c0:05:b5:2d:4a:f2:78:52: - d8:53:56:22:cd:f3:82:fb:ac:22:e8:ae:c5:14:35: - df:bd:83:f6:90:84:15:c7:b3:dc:ae:6c:16:e9:db: - a8:62:fe:66:8a:85:c8:d3:0d:9c:03:f8:ee:71:e9: - ab:8b:fe:f9:71:00:09:6a:67:90:c9:d6:43:e5:d8: - f4:12:d6:6f:4f:83:f4:00:58:e9:7a:df:11:9c:e7: - 28:fb:04:83:70:a8:9d:32:80:1c:ac:33:1c:78:0f: - a0:26:cc:37:29:08:41:65:1d:1e:95:40:e2:26:da: - 3e:6d:47:0b:b5:4f:7b:67:7e:72:2b:d3:f4:f0:fd: - 0c:d7:0d:2a:f1:82:11:2d:c0:f9:2d:d4:a0:bf:be: - 69:65:ce:3d:e8:a6:b2:8b:76:cb:9c:da:f0:a6:f8: - 0e:6b:ae:5c:47:ff:b1:0d:cd:ef:fc:d4:27:7b:d9: - 17:4a:f4:16:08:ae:bc:18:36:2e:8b:24:09:e2:9e: - d4:27 + 00:a7:94:9a:13:a0:38:6f:f9:cd:27:0d:9d:7d:f3: + 0c:fe:a0:dd:39:23:4d:33:d5:d9:88:c5:23:71:a1: + a7:f5:50:c7:c6:38:cb:88:41:87:e8:25:75:14:be: + 09:ef:4f:b1:48:c7:50:f6:de:05:85:4a:01:7c:6c: + e9:e1:4e:18:5f:43:38:cb:42:3a:e3:4a:7d:49:86: + f5:30:d8:44:70:4e:c9:77:3d:ba:d2:a4:cc:a5:df: + 8c:e9:58:f8:2d:a5:b4:7a:7e:23:4e:0f:89:a0:5f: + 0f:f1:47:95:bd:f4:2f:e9:3b:0e:ba:ef:e7:10:03: + 0a:94:9d:fe:65:86:49:4d:c2:4f:b6:dc:23:e7:30: + e6:10:64:0c:ed:4e:17:aa:1d:56:1d:6f:b8:3f:e5: + 8c:60:8a:f3:67:5a:04:6d:f3:84:98:01:db:11:c6: + e2:c4:fc:0a:5a:33:77:eb:38:35:21:45:c0:b3:30: + c2:95:4b:85:73:03:75:e5:9f:fd:a5:72:aa:21:64: + cd:26:a6:8d:7a:bc:68:6a:36:ab:fe:a6:16:9c:b9: + 93:e9:26:cf:cb:3c:9d:a9:26:18:d1:83:61:25:e4: + bc:6a:47:51:78:c9:1e:a2:38:10:8e:92:64:a8:aa: + 70:46:d3:cd:d2:5b:56:c3:98:ca:f1:b4:e0:cf:c9: + 48:b7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - A4:66:E2:46:F7:3F:A1:73:9D:A2:E2:4E:29:99:DB:2E:36:36:6C:B5 + 40:91:28:21:9D:93:F3:9C:18:1B:FF:00:9C:B2:08:A0:A3:81:7D:2A X509v3 Authority Key Identifier: - keyid:A7:58:01:D5:D6:00:71:D8:28:17:20:E0:01:09:EC:A5:39:90:7E:6E + keyid:E5:4E:96:E4:D9:82:36:BD:51:C3:57:BD:E6:DE:3C:C1:46:B4:49:0D Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -50,39 +50,39 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 84:e9:fb:28:09:4e:4e:1f:1c:ea:c4:d2:ee:54:fa:fc:eb:07: - 55:76:e8:ae:e2:f4:c8:a3:57:21:0e:e1:a8:3e:47:fe:57:88: - 3d:9a:73:71:0b:78:d6:77:32:6b:eb:9e:a8:c1:0a:11:4e:14: - c8:3b:e9:61:dc:7b:24:4c:44:0e:d5:23:77:9c:d3:99:98:ff: - 56:d3:00:f8:a5:01:d4:84:ba:9e:34:3f:25:06:b7:a9:d6:d4: - dd:cb:42:e5:12:4b:fc:b2:fe:3e:40:f7:d6:b6:dd:89:89:7b: - 06:b5:d1:02:d7:74:4a:48:5d:3d:f9:13:cd:6b:5a:76:af:ac: - 1b:09:d0:d2:94:e3:74:30:2f:a8:51:aa:37:6c:75:1b:7b:0d: - 2c:ee:34:f1:b4:17:6a:c1:fb:17:16:02:e5:3d:9b:4a:27:27: - 48:80:6d:cd:b7:f0:c2:97:da:f5:b2:35:c8:c6:0f:e4:28:a3: - d3:47:e3:33:42:d1:1f:38:bb:e0:26:36:bd:7a:b7:27:8e:fc: - e2:5a:8f:dd:3f:69:4e:99:6f:89:cc:40:f6:59:92:e4:13:89: - 7b:fe:06:7d:c0:1f:d6:bc:9d:69:e5:53:bd:9f:6f:e4:c9:a2: - 38:65:b7:af:15:49:f1:e4:68:e1:09:01:d2:bd:97:ff:4a:56: - aa:c9:5b:b0 + c2:83:63:7b:e6:d6:2b:b3:a7:f1:81:47:38:dc:65:9a:fc:3d: + 1a:a7:2b:02:6c:98:32:6b:50:93:a9:cf:d1:03:12:b4:d7:b7: + 15:49:a4:12:9e:95:c6:2b:ad:64:bc:16:4a:d9:b5:4b:3b:aa: + d9:d5:39:8d:ec:a6:1d:79:32:53:0a:66:41:c8:78:e4:74:d7: + e3:59:93:2e:2a:52:97:91:56:de:59:13:42:fa:a7:5b:80:82: + 42:82:8c:c8:a2:90:89:45:4f:96:e2:88:3b:b5:52:70:22:3a: + f2:5d:2d:4f:2d:12:81:15:d8:10:3c:a1:72:19:07:86:2a:c4: + ac:79:2d:0f:a4:fc:8f:d5:18:eb:fc:e4:7e:a8:15:bb:1b:50: + 5a:64:56:72:c3:96:e2:35:f7:03:54:4f:4a:0f:42:b6:53:61: + 29:4f:f7:0f:7b:a9:d0:72:0b:43:18:08:4d:6c:35:4b:89:c3: + c4:4f:84:e1:c4:85:17:b4:cc:fa:a9:40:ad:aa:66:70:d6:ed: + f5:7a:7a:1b:bf:13:b9:68:b7:8a:23:14:29:2a:5a:af:0e:54: + 28:87:31:7e:b7:34:ab:7f:ff:83:9d:b8:3a:ba:91:f4:93:70: + 0e:8d:50:2f:67:d3:49:27:bd:db:25:d7:80:f4:58:8b:d3:01: + 29:39:a9:2c -----BEGIN CERTIFICATE----- MIIDYjCCAkqgAwIBAgIBAzANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDDEKMAgGA1UEAwwBSTCC -ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALKA4svC7YClfqwQG2TpVyvy -p3OTo/ZC7zgbzYLTUXfEh3b15RfYDdorBwfTN4hM/S/A4PF5BPvnsbCA8ZW3HO8T -ysAFtS1K8nhS2FNWIs3zgvusIuiuxRQ1372D9pCEFcez3K5sFunbqGL+ZoqFyNMN -nAP47nHpq4v++XEACWpnkMnWQ+XY9BLWb0+D9ABY6XrfEZznKPsEg3ConTKAHKwz -HHgPoCbMNykIQWUdHpVA4ibaPm1HC7VPe2d+civT9PD9DNcNKvGCES3A+S3UoL++ -aWXOPeimsot2y5za8Kb4DmuuXEf/sQ3N7/zUJ3vZF0r0FgiuvBg2LoskCeKe1CcC -AwEAAaOByzCByDAdBgNVHQ4EFgQUpGbiRvc/oXOdouJOKZnbLjY2bLUwHwYDVR0j -BBgwFoAUp1gB1dYAcdgoFyDgAQnspTmQfm4wNwYIKwYBBQUHAQEEKzApMCcGCCsG +MB4XDTE1MDEwMTEyMDAwMFoXDTIxMDEwMTEyMDAwMFowDDEKMAgGA1UEAwwBSTCC +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKeUmhOgOG/5zScNnX3zDP6g +3TkjTTPV2YjFI3Ghp/VQx8Y4y4hBh+gldRS+Ce9PsUjHUPbeBYVKAXxs6eFOGF9D +OMtCOuNKfUmG9TDYRHBOyXc9utKkzKXfjOlY+C2ltHp+I04PiaBfD/FHlb30L+k7 +Drrv5xADCpSd/mWGSU3CT7bcI+cw5hBkDO1OF6odVh1vuD/ljGCK82daBG3zhJgB +2xHG4sT8Clozd+s4NSFFwLMwwpVLhXMDdeWf/aVyqiFkzSamjXq8aGo2q/6mFpy5 +k+kmz8s8nakmGNGDYSXkvGpHUXjJHqI4EI6SZKiqcEbTzdJbVsOYyvG04M/JSLcC +AwEAAaOByzCByDAdBgNVHQ4EFgQUQJEoIZ2T85wYG/8AnLIIoKOBfSowHwYDVR0j +BBgwFoAU5U6W5NmCNr1Rw1e95t48wUa0SQ0wNwYIKwYBBQUHAQEEKzApMCcGCCsG AQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUwIzAh oB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQEAwIB -BjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCE6fsoCU5OHxzq -xNLuVPr86wdVduiu4vTIo1chDuGoPkf+V4g9mnNxC3jWdzJr656owQoRThTIO+lh -3HskTEQO1SN3nNOZmP9W0wD4pQHUhLqeND8lBrep1tTdy0LlEkv8sv4+QPfWtt2J -iXsGtdEC13RKSF09+RPNa1p2r6wbCdDSlON0MC+oUao3bHUbew0s7jTxtBdqwfsX -FgLlPZtKJydIgG3Nt/DCl9r1sjXIxg/kKKPTR+MzQtEfOLvgJja9ercnjvziWo/d -P2lOmW+JzED2WZLkE4l7/gZ9wB/WvJ1p5VO9n2/kyaI4ZbevFUnx5GjhCQHSvZf/ -SlaqyVuw +BjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQDCg2N75tYrs6fx +gUc43GWa/D0apysCbJgya1CTqc/RAxK017cVSaQSnpXGK61kvBZK2bVLO6rZ1TmN +7KYdeTJTCmZByHjkdNfjWZMuKlKXkVbeWRNC+qdbgIJCgozIopCJRU+W4og7tVJw +IjryXS1PLRKBFdgQPKFyGQeGKsSseS0PpPyP1Rjr/OR+qBW7G1BaZFZyw5biNfcD +VE9KD0K2U2EpT/cPe6nQcgtDGAhNbDVLicPET4ThxIUXtMz6qUCtqmZw1u31enob +vxO5aLeKIxQpKlqvDlQohzF+tzSrf/+Dnbg6upH0k3AOjVAvZ9NJJ73bJdeA9FiL +0wEpOaks -----END CERTIFICATE-----
diff --git a/net/data/cert_issuer_source_aia_unittest/i3.pem b/net/data/cert_issuer_source_aia_unittest/i3.pem index 733c03f..064d732 100644 --- a/net/data/cert_issuer_source_aia_unittest/i3.pem +++ b/net/data/cert_issuer_source_aia_unittest/i3.pem
@@ -6,36 +6,36 @@ Issuer: CN=Root Validity Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT + Not After : Jan 1 12:00:00 2021 GMT Subject: CN=I Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b2:80:e2:cb:c2:ed:80:a5:7e:ac:10:1b:64:e9: - 57:2b:f2:a7:73:93:a3:f6:42:ef:38:1b:cd:82:d3: - 51:77:c4:87:76:f5:e5:17:d8:0d:da:2b:07:07:d3: - 37:88:4c:fd:2f:c0:e0:f1:79:04:fb:e7:b1:b0:80: - f1:95:b7:1c:ef:13:ca:c0:05:b5:2d:4a:f2:78:52: - d8:53:56:22:cd:f3:82:fb:ac:22:e8:ae:c5:14:35: - df:bd:83:f6:90:84:15:c7:b3:dc:ae:6c:16:e9:db: - a8:62:fe:66:8a:85:c8:d3:0d:9c:03:f8:ee:71:e9: - ab:8b:fe:f9:71:00:09:6a:67:90:c9:d6:43:e5:d8: - f4:12:d6:6f:4f:83:f4:00:58:e9:7a:df:11:9c:e7: - 28:fb:04:83:70:a8:9d:32:80:1c:ac:33:1c:78:0f: - a0:26:cc:37:29:08:41:65:1d:1e:95:40:e2:26:da: - 3e:6d:47:0b:b5:4f:7b:67:7e:72:2b:d3:f4:f0:fd: - 0c:d7:0d:2a:f1:82:11:2d:c0:f9:2d:d4:a0:bf:be: - 69:65:ce:3d:e8:a6:b2:8b:76:cb:9c:da:f0:a6:f8: - 0e:6b:ae:5c:47:ff:b1:0d:cd:ef:fc:d4:27:7b:d9: - 17:4a:f4:16:08:ae:bc:18:36:2e:8b:24:09:e2:9e: - d4:27 + 00:a7:94:9a:13:a0:38:6f:f9:cd:27:0d:9d:7d:f3: + 0c:fe:a0:dd:39:23:4d:33:d5:d9:88:c5:23:71:a1: + a7:f5:50:c7:c6:38:cb:88:41:87:e8:25:75:14:be: + 09:ef:4f:b1:48:c7:50:f6:de:05:85:4a:01:7c:6c: + e9:e1:4e:18:5f:43:38:cb:42:3a:e3:4a:7d:49:86: + f5:30:d8:44:70:4e:c9:77:3d:ba:d2:a4:cc:a5:df: + 8c:e9:58:f8:2d:a5:b4:7a:7e:23:4e:0f:89:a0:5f: + 0f:f1:47:95:bd:f4:2f:e9:3b:0e:ba:ef:e7:10:03: + 0a:94:9d:fe:65:86:49:4d:c2:4f:b6:dc:23:e7:30: + e6:10:64:0c:ed:4e:17:aa:1d:56:1d:6f:b8:3f:e5: + 8c:60:8a:f3:67:5a:04:6d:f3:84:98:01:db:11:c6: + e2:c4:fc:0a:5a:33:77:eb:38:35:21:45:c0:b3:30: + c2:95:4b:85:73:03:75:e5:9f:fd:a5:72:aa:21:64: + cd:26:a6:8d:7a:bc:68:6a:36:ab:fe:a6:16:9c:b9: + 93:e9:26:cf:cb:3c:9d:a9:26:18:d1:83:61:25:e4: + bc:6a:47:51:78:c9:1e:a2:38:10:8e:92:64:a8:aa: + 70:46:d3:cd:d2:5b:56:c3:98:ca:f1:b4:e0:cf:c9: + 48:b7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - A4:66:E2:46:F7:3F:A1:73:9D:A2:E2:4E:29:99:DB:2E:36:36:6C:B5 + 40:91:28:21:9D:93:F3:9C:18:1B:FF:00:9C:B2:08:A0:A3:81:7D:2A X509v3 Authority Key Identifier: - keyid:A7:58:01:D5:D6:00:71:D8:28:17:20:E0:01:09:EC:A5:39:90:7E:6E + keyid:E5:4E:96:E4:D9:82:36:BD:51:C3:57:BD:E6:DE:3C:C1:46:B4:49:0D Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -50,39 +50,39 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 91:5a:ce:ad:61:f3:92:5b:39:09:96:fd:0d:86:7f:29:0d:a0: - 2b:95:a8:58:74:7d:e4:bd:c8:63:54:cc:a6:cc:0e:4c:a4:da: - c7:11:17:d8:0e:11:d2:a9:9d:81:02:6a:3e:f0:62:e1:93:5f: - a8:53:81:4c:82:a9:48:3f:cd:b3:c3:a2:4a:10:8e:f3:e6:a3: - 40:c2:54:ee:ce:e5:dd:66:3a:34:ff:bd:b3:dd:8d:37:da:34: - 77:cb:85:c6:9f:fb:cb:41:e9:60:46:76:35:62:71:a6:16:4f: - 88:d3:42:0a:69:3d:95:cc:85:08:ae:a8:73:0a:39:74:4c:d0: - 74:d2:cd:8a:d0:0d:3f:ab:ff:47:a1:a2:bb:ea:e5:7b:a2:ed: - c0:33:ca:17:cb:5f:2b:de:06:c6:0c:4d:5d:ca:3b:16:a2:ad: - 86:bd:c8:74:5e:08:19:ec:a7:cf:71:83:96:8b:e9:cb:d6:5d: - 35:88:0a:96:36:d3:6c:f7:56:40:a5:e2:9a:e2:f5:e6:8c:98: - be:27:dc:f1:f8:07:f0:d0:f0:0d:71:dc:5a:9b:7f:44:17:ad: - 31:c8:d2:e1:cc:e3:dc:50:a2:f5:40:2f:47:3a:00:04:e6:23: - cf:17:3b:f6:d2:01:f2:5f:88:ff:88:99:87:78:8d:d6:1f:45: - a6:21:38:cd + b1:46:b0:1d:f8:a1:ea:4c:fc:b3:48:41:66:45:97:39:88:ca: + d6:0c:d0:ee:8e:47:40:f0:26:a2:87:af:00:20:a2:39:7f:57: + fd:f0:4f:13:b9:6c:0b:ad:5a:6e:ef:d5:e9:6d:54:7c:d3:92: + 19:e9:f8:0f:23:0c:87:51:b7:54:d4:b7:29:0a:f5:f6:6a:e1: + a2:1f:39:17:83:10:9f:52:b2:de:ac:02:a7:6a:04:88:15:bb: + f5:b3:0a:63:cf:db:b9:4a:53:c9:c1:f0:62:e0:90:a0:a8:3b: + 8c:97:eb:cc:a4:e5:93:e6:1a:d4:25:ac:96:7a:a5:fb:ae:b2: + ce:2a:07:8f:58:e6:bd:e6:ac:03:38:5a:03:e0:93:e0:3e:fd: + 11:90:93:86:3f:ca:8c:71:23:9c:af:24:95:20:c1:0e:bd:97: + dd:d7:85:8d:98:9b:b9:6d:b2:f9:4d:6a:e3:d0:3c:ea:b4:27: + 59:cd:38:40:31:67:18:3e:a4:48:f6:9b:d4:20:23:20:1b:0b: + b1:57:51:17:79:66:bd:31:b5:01:29:b9:98:87:d1:86:71:34: + fc:78:a0:25:fd:49:25:41:09:88:15:53:2d:33:c1:7f:5d:d7: + 66:2d:12:eb:90:d8:96:26:ee:7a:6c:50:f1:d9:90:0b:11:8d: + ff:7a:48:87 -----BEGIN CERTIFICATE----- MIIDYjCCAkqgAwIBAgIBBDANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDDEKMAgGA1UEAwwBSTCC -ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALKA4svC7YClfqwQG2TpVyvy -p3OTo/ZC7zgbzYLTUXfEh3b15RfYDdorBwfTN4hM/S/A4PF5BPvnsbCA8ZW3HO8T -ysAFtS1K8nhS2FNWIs3zgvusIuiuxRQ1372D9pCEFcez3K5sFunbqGL+ZoqFyNMN -nAP47nHpq4v++XEACWpnkMnWQ+XY9BLWb0+D9ABY6XrfEZznKPsEg3ConTKAHKwz -HHgPoCbMNykIQWUdHpVA4ibaPm1HC7VPe2d+civT9PD9DNcNKvGCES3A+S3UoL++ -aWXOPeimsot2y5za8Kb4DmuuXEf/sQ3N7/zUJ3vZF0r0FgiuvBg2LoskCeKe1CcC -AwEAAaOByzCByDAdBgNVHQ4EFgQUpGbiRvc/oXOdouJOKZnbLjY2bLUwHwYDVR0j -BBgwFoAUp1gB1dYAcdgoFyDgAQnspTmQfm4wNwYIKwYBBQUHAQEEKzApMCcGCCsG +MB4XDTE1MDEwMTEyMDAwMFoXDTIxMDEwMTEyMDAwMFowDDEKMAgGA1UEAwwBSTCC +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKeUmhOgOG/5zScNnX3zDP6g +3TkjTTPV2YjFI3Ghp/VQx8Y4y4hBh+gldRS+Ce9PsUjHUPbeBYVKAXxs6eFOGF9D +OMtCOuNKfUmG9TDYRHBOyXc9utKkzKXfjOlY+C2ltHp+I04PiaBfD/FHlb30L+k7 +Drrv5xADCpSd/mWGSU3CT7bcI+cw5hBkDO1OF6odVh1vuD/ljGCK82daBG3zhJgB +2xHG4sT8Clozd+s4NSFFwLMwwpVLhXMDdeWf/aVyqiFkzSamjXq8aGo2q/6mFpy5 +k+kmz8s8nakmGNGDYSXkvGpHUXjJHqI4EI6SZKiqcEbTzdJbVsOYyvG04M/JSLcC +AwEAAaOByzCByDAdBgNVHQ4EFgQUQJEoIZ2T85wYG/8AnLIIoKOBfSowHwYDVR0j +BBgwFoAU5U6W5NmCNr1Rw1e95t48wUa0SQ0wNwYIKwYBBQUHAQEEKzApMCcGCCsG AQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUwIzAh oB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQEAwIB -BjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCRWs6tYfOSWzkJ -lv0Nhn8pDaArlahYdH3kvchjVMymzA5MpNrHERfYDhHSqZ2BAmo+8GLhk1+oU4FM -gqlIP82zw6JKEI7z5qNAwlTuzuXdZjo0/72z3Y032jR3y4XGn/vLQelgRnY1YnGm -Fk+I00IKaT2VzIUIrqhzCjl0TNB00s2K0A0/q/9HoaK76uV7ou3AM8oXy18r3gbG -DE1dyjsWoq2Gvch0XggZ7KfPcYOWi+nL1l01iAqWNtNs91ZApeKa4vXmjJi+J9zx -+Afw0PANcdxam39EF60xyNLhzOPcUKL1QC9HOgAE5iPPFzv20gHyX4j/iJmHeI3W -H0WmITjN +BjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCxRrAd+KHqTPyz +SEFmRZc5iMrWDNDujkdA8Caih68AIKI5f1f98E8TuWwLrVpu79XpbVR805IZ6fgP +IwyHUbdU1LcpCvX2auGiHzkXgxCfUrLerAKnagSIFbv1swpjz9u5SlPJwfBi4JCg +qDuMl+vMpOWT5hrUJayWeqX7rrLOKgePWOa95qwDOFoD4JPgPv0RkJOGP8qMcSOc +rySVIMEOvZfd14WNmJu5bbL5TWrj0DzqtCdZzThAMWcYPqRI9pvUICMgGwuxV1EX +eWa9MbUBKbmYh9GGcTT8eKAl/UklQQmIFVMtM8F/XddmLRLrkNiWJu56bFDx2ZAL +EY3/ekiH -----END CERTIFICATE-----
diff --git a/net/data/cert_issuer_source_aia_unittest/root.pem b/net/data/cert_issuer_source_aia_unittest/root.pem new file mode 100644 index 0000000..3889c51 --- /dev/null +++ b/net/data/cert_issuer_source_aia_unittest/root.pem
@@ -0,0 +1,88 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2021 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c5:4d:a6:fe:7f:c0:31:03:69:d9:4b:40:aa:ea: + 7f:d8:a9:ba:5e:7f:05:a9:b1:14:38:11:fd:35:c9: + 21:06:4b:ae:91:51:ff:9b:fa:de:78:7b:ec:7f:85: + 49:18:91:97:3d:73:1f:71:2d:41:cf:9e:a7:26:d7: + 0a:11:51:79:0c:0d:40:18:8e:4d:8b:03:42:a9:25: + e4:e7:26:d9:d9:da:13:27:dd:ad:02:27:b3:53:07: + 8b:32:1d:1a:bd:6a:73:59:02:58:3d:8d:dc:e3:8d: + ee:9a:e5:b7:56:5f:b0:5e:a6:f9:cc:0f:13:9e:6f: + cf:73:77:84:23:8a:6b:6c:a5:cd:d8:19:1d:c5:8c: + d2:e3:a5:bc:4e:26:10:49:dc:95:5e:b6:8d:73:7e: + f1:e9:70:11:72:85:ab:b7:29:be:72:13:d0:18:8d: + ab:4c:67:22:7a:03:2e:0c:f8:47:27:af:f8:a1:87: + b2:99:36:65:9d:00:a6:70:87:64:bc:dc:86:c3:0a: + 73:06:12:d9:56:9c:72:cf:63:88:85:e7:46:0b:33: + 91:8e:4c:76:ab:b7:e0:3a:41:a7:a0:d4:92:d7:c9: + 11:d1:c8:77:c1:a9:69:69:57:eb:91:a4:49:a2:57: + 15:f1:9d:7d:fa:f9:f0:98:be:4b:0b:1b:d7:92:e4: + 50:47 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + E5:4E:96:E4:D9:82:36:BD:51:C3:57:BD:E6:DE:3C:C1:46:B4:49:0D + X509v3 Authority Key Identifier: + keyid:E5:4E:96:E4:D9:82:36:BD:51:C3:57:BD:E6:DE:3C:C1:46:B4:49:0D + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 5f:d4:9c:32:27:c2:19:48:51:1a:59:b3:16:7b:55:ec:c5:39: + e6:3b:08:0b:31:60:0b:8b:50:57:26:b9:67:12:f8:5b:95:ca: + f7:b9:88:28:65:50:ab:c6:60:9a:29:05:92:e6:b6:72:02:f4: + e2:95:b8:d9:29:fc:61:62:a4:1f:1e:0b:22:a7:80:5e:08:2c: + a2:c5:1c:20:47:cc:dc:6c:8e:95:c1:34:a0:c8:35:f1:48:f6: + 96:a6:ee:e4:cb:58:55:b2:6e:a5:25:c8:a9:b8:6d:bb:50:dd: + 0b:3b:83:f2:84:4b:b8:14:30:2c:38:a5:67:89:dd:be:d6:45: + 80:23:7c:87:02:96:39:22:87:58:ce:fa:7e:0d:2e:60:54:ca: + 9a:01:70:39:eb:6d:8f:82:d0:68:46:ee:3a:9a:54:df:d8:74: + 4c:3a:5e:96:d8:4b:c7:86:04:d0:b7:96:f9:b3:c1:a3:a7:95: + b8:d7:7e:8b:f1:2a:b7:e0:8c:fb:ce:15:d1:cc:81:4f:40:96: + 18:a8:aa:d7:97:3d:27:60:1f:ac:60:92:d1:b0:53:77:73:d7: + 85:c8:6c:8a:36:8f:6a:2d:e7:6a:16:d5:f9:a3:42:e3:84:32: + ee:d3:e9:18:41:b6:07:30:87:03:b0:54:c3:2a:49:bc:00:13: + d1:79:5e:06 +-----BEGIN CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTIxMDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMVNpv5/wDEDadlLQKrq +f9ipul5/BamxFDgR/TXJIQZLrpFR/5v63nh77H+FSRiRlz1zH3EtQc+epybXChFR +eQwNQBiOTYsDQqkl5Ocm2dnaEyfdrQIns1MHizIdGr1qc1kCWD2N3OON7prlt1Zf +sF6m+cwPE55vz3N3hCOKa2ylzdgZHcWM0uOlvE4mEEnclV62jXN+8elwEXKFq7cp +vnIT0BiNq0xnInoDLgz4Ryev+KGHspk2ZZ0ApnCHZLzchsMKcwYS2Vaccs9jiIXn +RgszkY5Mdqu34DpBp6DUktfJEdHId8GpaWlX65GkSaJXFfGdffr58Ji+Swsb15Lk +UEcCAwEAAaOByzCByDAdBgNVHQ4EFgQU5U6W5NmCNr1Rw1e95t48wUa0SQ0wHwYD +VR0jBBgwFoAU5U6W5NmCNr1Rw1e95t48wUa0SQ0wNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBf1JwyJ8IZ +SFEaWbMWe1XsxTnmOwgLMWALi1BXJrlnEvhblcr3uYgoZVCrxmCaKQWS5rZyAvTi +lbjZKfxhYqQfHgsip4BeCCyixRwgR8zcbI6VwTSgyDXxSPaWpu7ky1hVsm6lJcip +uG27UN0LO4PyhEu4FDAsOKVnid2+1kWAI3yHApY5IodYzvp+DS5gVMqaAXA5622P +gtBoRu46mlTf2HRMOl6W2EvHhgTQt5b5s8Gjp5W4136L8Sq34Iz7zhXRzIFPQJYY +qKrXlz0nYB+sYJLRsFN3c9eFyGyKNo9qLedqFtX5o0LjhDLu0+kYQbYHMIcDsFTD +Kkm8ABPReV4G +-----END CERTIFICATE-----
diff --git a/net/data/cert_issuer_source_aia_unittest/target_file_aia.pem b/net/data/cert_issuer_source_aia_unittest/target_file_aia.pem index d56a9dd..d9d08d5 100644 --- a/net/data/cert_issuer_source_aia_unittest/target_file_aia.pem +++ b/net/data/cert_issuer_source_aia_unittest/target_file_aia.pem
@@ -6,36 +6,36 @@ Issuer: CN=I Validity Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT + Not After : Jan 1 12:00:00 2021 GMT Subject: CN=target Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:95:e3:c7:51:de:15:eb:d1:de:10:91:aa:8a:96: - 74:ba:7e:34:dc:7e:05:45:4e:6e:fc:0c:d9:bc:10: - af:cd:4d:df:b4:25:29:e7:3d:cd:3d:de:e6:e3:d9: - 9c:fd:ea:14:03:01:a3:76:bd:d1:5b:70:31:3d:12: - 1a:4b:ec:df:5f:1f:51:74:ed:3c:26:10:a7:35:88: - d3:02:22:d0:25:17:46:fa:b0:a9:ce:96:aa:8e:67: - c8:8e:8e:13:d9:0f:88:d4:61:d4:b7:07:1e:ca:26: - 5f:e2:a5:17:96:0a:6f:27:97:c2:5e:28:29:37:7c: - 1c:c7:ad:82:2b:2d:77:94:5e:85:00:b9:91:68:a2: - c6:27:b5:ea:83:8b:b7:ed:83:73:8b:c1:73:a7:40: - 72:44:51:09:58:e9:eb:ec:80:0a:12:c6:8e:45:18: - ce:9c:a0:2a:5f:14:0c:59:be:14:16:49:14:82:d6: - 40:6a:45:0a:7c:0c:3f:f3:53:cb:45:13:18:4e:0b: - c5:95:3c:de:e0:43:fe:5a:dc:ea:b5:44:f7:e7:6d: - 43:47:76:82:21:0a:60:cf:3e:28:f5:0f:c4:1a:41: - 62:12:30:8d:5d:92:44:91:5b:e1:cb:7f:2f:eb:12: - 9c:13:c5:87:d5:09:72:3d:b2:79:c1:a9:df:49:ba: - fd:cd + 00:ee:22:a3:0e:ba:89:a9:fc:95:d9:52:63:da:11: + 41:eb:fe:16:b2:fb:28:bc:f0:46:43:3b:6d:72:04: + 33:d1:8c:ab:4c:1a:dc:af:68:7d:a4:61:a4:44:dc: + 1f:1f:8f:cf:e5:8b:e5:fa:ec:12:92:19:18:e1:ec: + a3:52:7c:06:c5:a6:9c:f6:af:0b:40:3c:44:cb:64: + a1:8b:60:65:5f:f0:e0:b7:cf:86:38:5a:2d:36:12: + 0b:f9:c2:b3:c4:ed:36:13:67:b6:c3:9a:43:97:e5: + 44:dc:5d:62:ed:37:da:c7:66:73:fc:67:0e:32:9a: + 5f:db:b1:8a:4a:12:a4:a5:47:24:84:b3:0d:3b:32: + bb:98:e9:24:db:58:41:4e:ef:51:a6:07:00:ed:e2: + 5d:22:43:b4:48:7f:82:f8:e4:c5:98:7f:4b:df:b0: + 9a:e1:78:65:c5:65:bf:7e:09:75:96:e4:9c:93:40: + 95:76:02:ae:dd:d0:cf:42:4d:53:c6:45:6c:80:cf: + a9:0c:f6:f5:b6:b2:f7:fd:47:68:53:5d:39:8c:3d: + 2b:e3:eb:7e:0a:b6:c9:19:f4:70:3b:df:4b:c0:ad: + 27:df:b2:80:a7:1b:4f:cf:2a:51:1a:f4:10:b8:1a: + ff:0f:36:e5:be:4e:b6:89:73:ca:56:5f:3b:89:48: + d0:c7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 82:52:F8:B3:52:A5:B3:49:4C:94:2B:57:7B:20:5D:41:1C:67:B9:00 + A7:CF:5E:6D:C8:A0:41:B5:7B:39:EA:C3:A5:F9:13:14:80:1E:3C:81 X509v3 Authority Key Identifier: - keyid:A4:66:E2:46:F7:3F:A1:73:9D:A2:E2:4E:29:99:DB:2E:36:36:6C:B5 + keyid:40:91:28:21:9D:93:F3:9C:18:1B:FF:00:9C:B2:08:A0:A3:81:7D:2A Authority Information Access: CA Issuers - URI:file:///dev/null @@ -50,39 +50,39 @@ X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - ae:95:9b:14:87:8a:f4:90:86:4f:07:95:89:88:3c:fd:4b:92: - 01:8b:00:4d:c4:45:b7:67:54:d8:19:0b:10:f6:c2:be:45:5b: - 63:f1:42:57:1a:5a:bd:f8:fc:ee:d6:d5:dc:0c:ee:73:a8:5e: - f2:d4:5b:f3:56:1b:28:d2:94:bc:3b:7d:a9:d5:4c:fb:5d:2f: - 4d:f2:04:3b:e5:12:ba:4d:9b:02:5e:6d:7e:aa:58:e6:45:3a: - 6f:66:10:b4:17:d1:3c:b4:c0:1d:42:f5:a7:61:00:9d:94:3f: - 3c:30:94:af:fe:ee:68:a7:ac:5b:d4:9a:3e:97:35:91:65:61: - d0:cb:0d:e6:af:0f:08:97:2f:0a:e4:97:3f:39:7a:8a:ca:9e: - 87:22:82:ef:c3:3e:ee:44:9a:37:95:85:76:39:37:7e:63:06: - b9:bd:70:ae:c0:8f:ff:6e:a2:a9:95:c2:be:91:0b:9f:70:de: - 4f:5b:3b:8a:c2:37:02:aa:52:ca:9d:d6:aa:48:0c:66:97:58: - 0e:48:f5:ab:c5:94:76:8a:c6:d9:06:20:62:72:0f:71:29:c3: - c5:16:57:45:12:d0:a7:7a:aa:9a:31:b4:f8:46:b6:f4:44:16: - 9a:5d:7d:dc:32:bf:53:77:79:4b:66:79:e5:9c:7a:30:41:6f: - 3f:b1:21:dc + 28:b6:d2:18:91:33:ed:df:67:ec:f5:c1:c7:37:25:1c:ec:95: + 71:d9:ec:80:4c:e9:8b:d5:66:15:c2:19:e3:47:da:a7:b5:bb: + df:59:84:2f:07:96:c5:80:26:d7:d6:df:ce:cd:0b:28:fc:de: + c9:cc:b0:43:76:83:46:02:b1:f0:d0:3d:2e:6b:52:be:24:54: + ab:03:72:ee:a6:8c:cf:17:81:0b:c3:29:2f:da:ed:7a:e8:43: + 90:57:97:56:6b:f9:76:25:93:ed:b7:a0:53:f1:ff:83:7e:53: + 0c:ca:bb:a6:16:25:4d:fc:b6:cd:54:5a:fa:f8:12:a5:8c:46: + 5a:64:e8:ba:f8:26:2e:15:8d:fa:00:e7:96:f7:47:73:5c:0c: + 30:68:4b:db:0b:92:31:2d:1a:a0:14:77:10:dc:cb:07:ef:f1: + 30:76:fa:dd:41:e4:b1:a3:d3:aa:c2:20:f7:77:f4:72:41:5b: + 38:96:ce:e6:72:60:ff:63:d2:25:8b:99:cd:f6:34:34:73:67: + 9a:cc:da:d3:76:da:ef:fb:d5:4a:cf:fe:34:27:fb:32:96:5b: + bf:b7:72:87:a7:f2:1e:7a:fc:e8:9d:ee:f6:94:44:88:63:47: + ec:e9:e8:61:74:9d:28:bd:2c:fd:b7:b3:b2:ed:68:c8:d6:ff: + 53:93:61:36 -----BEGIN CERTIFICATE----- MIIDZDCCAkygAwIBAgIBBjANBgkqhkiG9w0BAQsFADAMMQowCAYDVQQDDAFJMB4X -DTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlePHUd4V69HeEJGqipZ0 -un403H4FRU5u/AzZvBCvzU3ftCUp5z3NPd7m49mc/eoUAwGjdr3RW3AxPRIaS+zf -Xx9RdO08JhCnNYjTAiLQJRdG+rCpzpaqjmfIjo4T2Q+I1GHUtwceyiZf4qUXlgpv -J5fCXigpN3wcx62CKy13lF6FALmRaKLGJ7Xqg4u37YNzi8Fzp0ByRFEJWOnr7IAK -EsaORRjOnKAqXxQMWb4UFkkUgtZAakUKfAw/81PLRRMYTgvFlTze4EP+WtzqtUT3 -521DR3aCIQpgzz4o9Q/EGkFiEjCNXZJEkVvhy38v6xKcE8WH1QlyPbJ5wanfSbr9 -zQIDAQABo4HLMIHIMB0GA1UdDgQWBBSCUvizUqWzSUyUK1d7IF1BHGe5ADAfBgNV -HSMEGDAWgBSkZuJG9z+hc52i4k4pmdsuNjZstTAsBggrBgEFBQcBAQQgMB4wHAYI +DTE1MDEwMTEyMDAwMFoXDTIxMDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7iKjDrqJqfyV2VJj2hFB +6/4WsvsovPBGQzttcgQz0YyrTBrcr2h9pGGkRNwfH4/P5Yvl+uwSkhkY4eyjUnwG +xaac9q8LQDxEy2Shi2BlX/Dgt8+GOFotNhIL+cKzxO02E2e2w5pDl+VE3F1i7Tfa +x2Zz/GcOMppf27GKShKkpUckhLMNOzK7mOkk21hBTu9RpgcA7eJdIkO0SH+C+OTF +mH9L37Ca4XhlxWW/fgl1luSck0CVdgKu3dDPQk1TxkVsgM+pDPb1trL3/UdoU105 +jD0r4+t+CrbJGfRwO99LwK0n37KApxtPzypRGvQQuBr/Dzblvk62iXPKVl87iUjQ +xwIDAQABo4HLMIHIMB0GA1UdDgQWBBSnz15tyKBBtXs56sOl+RMUgB48gTAfBgNV +HSMEGDAWgBRAkSghnZPznBgb/wCcsgigo4F9KjAsBggrBgEFBQcBAQQgMB4wHAYI KwYBBQUHMAKGEGZpbGU6Ly8vZGV2L251bGwwKQYDVR0fBCIwIDAeoBygGoYYaHR0 cDovL3VybC1mb3ItY3JsL0kuY3JsMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAU -BggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAK6VmxSHivSQ -hk8HlYmIPP1LkgGLAE3ERbdnVNgZCxD2wr5FW2PxQlcaWr34/O7W1dwM7nOoXvLU -W/NWGyjSlLw7fanVTPtdL03yBDvlErpNmwJebX6qWOZFOm9mELQX0Ty0wB1C9adh -AJ2UPzwwlK/+7minrFvUmj6XNZFlYdDLDeavDwiXLwrklz85eorKnocigu/DPu5E -mjeVhXY5N35jBrm9cK7Aj/9uoqmVwr6RC59w3k9bO4rCNwKqUsqd1qpIDGaXWA5I -9avFlHaKxtkGIGJyD3Epw8UWV0US0Kd6qpoxtPhGtvREFppdfdwyv1N3eUtmeeWc -ejBBbz+xIdw= +BggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACi20hiRM+3f +Z+z1wcc3JRzslXHZ7IBM6YvVZhXCGeNH2qe1u99ZhC8HlsWAJtfW387NCyj83snM +sEN2g0YCsfDQPS5rUr4kVKsDcu6mjM8XgQvDKS/a7XroQ5BXl1Zr+XYlk+23oFPx +/4N+UwzKu6YWJU38ts1UWvr4EqWMRlpk6Lr4Ji4VjfoA55b3R3NcDDBoS9sLkjEt +GqAUdxDcywfv8TB2+t1B5LGj06rCIPd39HJBWziWzuZyYP9j0iWLmc32NDRzZ5rM +2tN22u/71UrP/jQn+zKWW7+3coen8h56/Oid7vaURIhjR+zp6GF0nSi9LP23s7Lt +aMjW/1OTYTY= -----END CERTIFICATE-----
diff --git a/net/data/cert_issuer_source_aia_unittest/target_file_and_http_aia.pem b/net/data/cert_issuer_source_aia_unittest/target_file_and_http_aia.pem index 01189a4..8066e42 100644 --- a/net/data/cert_issuer_source_aia_unittest/target_file_and_http_aia.pem +++ b/net/data/cert_issuer_source_aia_unittest/target_file_and_http_aia.pem
@@ -6,36 +6,36 @@ Issuer: CN=I Validity Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT + Not After : Jan 1 12:00:00 2021 GMT Subject: CN=target Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b8:a6:54:ad:e4:b3:01:6f:af:23:15:bc:3c:aa: - 51:59:1e:7e:65:23:a3:06:a7:4d:76:65:61:6c:c8: - 4c:6e:40:d8:92:40:2a:ed:09:cd:4d:fc:b4:ee:88: - 68:16:66:15:bc:96:6f:65:40:02:3c:76:7c:87:f1: - 93:f6:fa:92:90:7d:83:8a:81:73:01:95:e5:b6:3c: - 34:08:e9:3e:29:0f:61:db:79:b0:c5:b0:3d:ef:ba: - fc:7f:9d:a1:db:ef:bc:5c:5f:67:94:03:2e:e0:f6: - 87:d1:6d:77:49:b0:f0:ed:6c:bd:75:c6:31:85:6e: - d4:09:81:93:10:81:82:3f:32:04:ad:b9:02:20:ec: - 1f:28:49:83:47:8a:c2:f1:3b:f4:de:52:e4:da:5f: - 8c:8e:69:50:fb:bd:21:cb:b2:55:69:98:a1:ec:2e: - 27:3e:25:95:aa:0d:0e:d7:01:28:d8:00:b8:1f:d2: - 85:9b:71:f6:c5:70:78:2d:c6:a4:c2:39:56:39:0a: - ac:89:17:6a:8d:47:a4:e4:6a:e9:84:68:14:22:4c: - 6e:e7:87:59:7f:40:52:c7:20:46:b0:21:bd:42:a0: - f0:a5:78:b9:6f:fd:5f:6e:2f:50:61:9c:88:a6:54: - 69:da:fe:86:ab:7b:29:34:56:8d:d1:6d:82:33:f1: - 87:e3 + 00:c8:03:32:ae:0e:d4:6b:f1:27:56:39:2f:62:ae: + 56:60:79:57:73:86:89:35:8c:07:ba:b5:d1:55:c7: + a8:fc:91:d7:c9:20:4d:93:bd:7b:5d:40:73:d2:af: + 69:91:3b:69:49:58:4c:bb:6f:a9:a3:bc:51:9b:1c: + 7d:06:fa:67:3f:50:09:9e:1e:4d:08:8f:12:0a:1a: + be:8c:26:45:b7:2d:73:2d:3e:d8:fe:31:3f:c3:42: + bd:90:44:2b:05:7f:53:68:51:ef:59:88:6c:0e:7d: + e3:cd:7b:65:08:5f:7f:4f:85:11:0b:8d:ce:27:e3: + 69:7f:1d:24:6c:ea:12:6e:d0:6a:13:31:d5:8c:d4: + f4:b1:3a:df:20:cb:f4:1f:05:71:6d:17:ee:37:28: + c7:b8:b0:d5:5a:12:cd:7e:40:65:fa:33:49:c6:83: + bd:bb:37:0b:3b:a7:0c:c5:0b:99:ed:b7:d2:9a:ba: + ba:f8:d7:8c:23:ed:12:ad:ac:b3:29:a3:70:71:5c: + 42:7b:e5:46:8c:1f:95:0d:cc:22:24:3a:d8:4e:91: + 42:1e:c9:a5:77:c2:49:b7:04:68:9c:5e:bb:48:e8: + 1b:03:dd:28:69:5f:1a:43:2b:75:0f:86:c1:b0:af: + 98:b8:c8:0c:a6:2a:25:d7:73:4d:85:63:df:75:1f: + 39:4b Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - B6:F3:8F:73:17:0E:1C:CC:AB:23:8A:20:23:9F:27:84:1A:D9:D2:74 + 6D:14:70:82:6B:4A:03:46:1B:B4:E3:B1:BC:40:78:FF:7B:28:45:55 X509v3 Authority Key Identifier: - keyid:A4:66:E2:46:F7:3F:A1:73:9D:A2:E2:4E:29:99:DB:2E:36:36:6C:B5 + keyid:40:91:28:21:9D:93:F3:9C:18:1B:FF:00:9C:B2:08:A0:A3:81:7D:2A Authority Information Access: CA Issuers - URI:file:///dev/null @@ -51,39 +51,39 @@ X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 65:53:d0:30:a2:fe:7a:a1:9f:8b:56:d6:e8:0f:75:a1:5f:e1: - b1:e3:4c:11:9c:cc:30:a9:a9:65:cc:fa:9c:d3:c8:0a:0f:c7: - 4e:58:3a:8a:ce:86:65:70:81:64:2e:ff:ea:e1:f2:77:73:bb: - 59:64:eb:22:ee:a1:91:05:ad:09:f2:55:69:ef:27:1c:3c:79: - 36:9c:f5:ae:b0:73:c6:25:2b:3d:c5:0c:a8:66:44:1e:55:a4: - 5f:ff:e6:fc:74:3f:18:ac:cf:1a:8e:49:91:73:e8:43:e4:33: - 96:91:78:f5:5f:02:36:98:26:28:8a:8b:6a:33:ed:ec:b3:f3: - 3d:29:d5:a5:9f:d3:e5:cb:09:d9:65:da:78:10:99:dc:3b:4b: - 48:7f:c2:8a:14:06:2d:b0:50:d3:45:ba:8c:0c:ee:d9:44:5f: - fa:9d:44:00:b9:78:e6:70:76:58:98:d5:e3:81:47:3b:c3:b3: - 17:ef:3e:c8:14:e9:2a:4b:41:17:28:1e:7a:19:aa:8c:79:48: - 89:b8:7f:e2:f2:7c:aa:dc:70:ed:e0:1c:61:18:58:8a:a0:a7: - 86:18:36:11:8b:17:bf:59:eb:03:6c:32:e0:05:01:b7:44:9f: - b7:2d:fc:7d:5c:93:86:ec:b8:30:fd:be:6e:29:a2:08:2a:cd: - 88:29:20:8e + 90:dd:9e:1e:9a:20:5e:bc:dd:ea:be:35:6d:73:5e:9e:17:d7: + 06:92:2c:d6:05:3d:a5:90:5a:f0:b5:55:d6:1e:d6:78:8d:aa: + 8b:94:8f:2e:68:64:09:72:ff:a5:95:61:49:33:79:67:4d:1d: + 53:3b:59:16:82:bc:1b:27:05:7e:f2:41:80:09:e0:b2:92:85: + a0:fa:32:f2:99:49:ce:63:5a:c2:f4:89:d0:0f:39:a1:0f:b1: + 61:0c:fd:a7:b1:d4:8f:a4:b1:9a:4f:da:81:ec:41:ee:c1:5b: + 1b:3e:df:8e:0f:1c:aa:a6:63:0f:6b:e5:0a:36:a3:e1:72:3c: + 74:49:cd:2b:eb:f5:d0:c8:87:c0:22:3a:51:7b:58:3b:6c:4b: + 6a:70:74:be:1c:68:49:7b:9d:62:ef:4a:e8:d2:3f:5a:ec:5f: + 48:80:55:e0:10:b9:67:8c:12:3c:a2:3b:6a:f6:47:8a:59:30: + f9:67:92:59:da:ed:1e:b7:30:ef:2d:bf:53:c2:dd:08:a1:e0: + fd:78:4e:fa:36:59:ca:53:f8:62:c1:c4:56:c1:56:73:74:8e: + c9:ca:07:14:5e:d4:be:be:b2:38:6a:d4:74:e5:60:7c:e7:d4: + 8d:30:25:e2:da:85:c9:85:69:46:99:40:56:65:ca:40:59:59: + 98:9c:18:04 -----BEGIN CERTIFICATE----- MIIDjDCCAnSgAwIBAgIBCDANBgkqhkiG9w0BAQsFADAMMQowCAYDVQQDDAFJMB4X -DTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuKZUreSzAW+vIxW8PKpR -WR5+ZSOjBqdNdmVhbMhMbkDYkkAq7QnNTfy07ohoFmYVvJZvZUACPHZ8h/GT9vqS -kH2DioFzAZXltjw0COk+KQ9h23mwxbA977r8f52h2++8XF9nlAMu4PaH0W13SbDw -7Wy9dcYxhW7UCYGTEIGCPzIErbkCIOwfKEmDR4rC8Tv03lLk2l+MjmlQ+70hy7JV -aZih7C4nPiWVqg0O1wEo2AC4H9KFm3H2xXB4LcakwjlWOQqsiRdqjUek5GrphGgU -Ikxu54dZf0BSxyBGsCG9QqDwpXi5b/1fbi9QYZyIplRp2v6Gq3spNFaN0W2CM/GH -4wIDAQABo4HzMIHwMB0GA1UdDgQWBBS2849zFw4czKsjiiAjnyeEGtnSdDAfBgNV -HSMEGDAWgBSkZuJG9z+hc52i4k4pmdsuNjZstTBUBggrBgEFBQcBAQRIMEYwHAYI +DTE1MDEwMTEyMDAwMFoXDTIxMDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyAMyrg7Ua/EnVjkvYq5W +YHlXc4aJNYwHurXRVceo/JHXySBNk717XUBz0q9pkTtpSVhMu2+po7xRmxx9Bvpn +P1AJnh5NCI8SChq+jCZFty1zLT7Y/jE/w0K9kEQrBX9TaFHvWYhsDn3jzXtlCF9/ +T4URC43OJ+Npfx0kbOoSbtBqEzHVjNT0sTrfIMv0HwVxbRfuNyjHuLDVWhLNfkBl ++jNJxoO9uzcLO6cMxQuZ7bfSmrq6+NeMI+0SrayzKaNwcVxCe+VGjB+VDcwiJDrY +TpFCHsmld8JJtwRonF67SOgbA90oaV8aQyt1D4bBsK+YuMgMpiol13NNhWPfdR85 +SwIDAQABo4HzMIHwMB0GA1UdDgQWBBRtFHCCa0oDRhu047G8QHj/eyhFVTAfBgNV +HSMEGDAWgBRAkSghnZPznBgb/wCcsgigo4F9KjBUBggrBgEFBQcBAQRIMEYwHAYI KwYBBQUHMAKGEGZpbGU6Ly8vZGV2L251bGwwJgYIKwYBBQUHMAKGGmh0dHA6Ly91 cmwtZm9yLWFpYTIvSTIuZm9vMCkGA1UdHwQiMCAwHqAcoBqGGGh0dHA6Ly91cmwt Zm9yLWNybC9JLmNybDAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUH -AwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4IBAQBlU9Awov56oZ+LVtboD3Wh -X+Gx40wRnMwwqallzPqc08gKD8dOWDqKzoZlcIFkLv/q4fJ3c7tZZOsi7qGRBa0J -8lVp7yccPHk2nPWusHPGJSs9xQyoZkQeVaRf/+b8dD8YrM8ajkmRc+hD5DOWkXj1 -XwI2mCYoiotqM+3ss/M9KdWln9PlywnZZdp4EJncO0tIf8KKFAYtsFDTRbqMDO7Z -RF/6nUQAuXjmcHZYmNXjgUc7w7MX7z7IFOkqS0EXKB56GaqMeUiJuH/i8nyq3HDt -4BxhGFiKoKeGGDYRixe/WesDbDLgBQG3RJ+3Lfx9XJOG7Lgw/b5uKaIIKs2IKSCO +AwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4IBAQCQ3Z4emiBevN3qvjVtc16e +F9cGkizWBT2lkFrwtVXWHtZ4jaqLlI8uaGQJcv+llWFJM3lnTR1TO1kWgrwbJwV+ +8kGACeCykoWg+jLymUnOY1rC9InQDzmhD7FhDP2nsdSPpLGaT9qB7EHuwVsbPt+O +DxyqpmMPa+UKNqPhcjx0Sc0r6/XQyIfAIjpRe1g7bEtqcHS+HGhJe51i70ro0j9a +7F9IgFXgELlnjBI8ojtq9keKWTD5Z5JZ2u0etzDvLb9Twt0IoeD9eE76NlnKU/hi +wcRWwVZzdI7JygcUXtS+vrI4atR05WB859SNMCXi2oXJhWlGmUBWZcpAWVmYnBgE -----END CERTIFICATE-----
diff --git a/net/data/cert_issuer_source_aia_unittest/target_invalid_and_http_aia.pem b/net/data/cert_issuer_source_aia_unittest/target_invalid_and_http_aia.pem index 6ed879f3..ef2e666 100644 --- a/net/data/cert_issuer_source_aia_unittest/target_invalid_and_http_aia.pem +++ b/net/data/cert_issuer_source_aia_unittest/target_invalid_and_http_aia.pem
@@ -6,36 +6,36 @@ Issuer: CN=I Validity Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT + Not After : Jan 1 12:00:00 2021 GMT Subject: CN=target Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b4:31:1e:0c:43:8e:90:3e:2c:0e:a0:71:58:70: - aa:3a:92:51:14:b6:3f:b3:43:2c:3d:0a:74:0c:30: - 48:34:76:90:57:e4:80:f2:8d:ec:5d:02:95:94:9e: - 5d:04:49:28:49:d9:6e:81:47:57:69:be:b3:4a:5e: - f5:65:2f:f1:66:a5:8f:63:98:ee:3b:97:09:7f:d9: - 65:57:00:80:55:f1:ae:42:af:a7:56:3a:b4:5b:b5: - 85:55:8d:40:d3:f7:7b:c8:fd:45:af:f4:95:9a:f2: - 72:18:89:2c:90:4d:3c:73:c2:eb:91:d0:d5:75:ec: - fd:80:89:c3:12:a5:99:3b:d0:00:0b:a3:c4:2a:2c: - 62:a0:8b:97:4f:51:2f:83:07:57:f4:8f:50:a1:62: - 4d:2e:69:cd:25:5a:16:30:10:de:a8:0b:3b:7b:58: - 64:33:08:ff:4d:e2:06:1a:03:bd:f4:02:90:d2:ed: - 05:0b:b5:4a:36:d1:d1:f0:f5:44:0d:16:a2:3c:ca: - 20:0b:36:c9:0e:70:9e:bc:d8:11:d4:fe:2b:49:71: - 91:6d:c8:83:6d:45:75:e7:e1:63:53:7d:74:a6:34: - 18:d4:66:77:c9:04:79:09:08:46:f4:b1:21:f5:19: - 92:53:7b:74:1b:84:83:01:6f:1e:ac:9d:09:1e:9b: - 2f:9d + 00:b3:04:b7:2a:7f:85:9a:b4:30:29:77:0b:50:c8: + 1f:b3:0d:98:9b:f7:4f:ab:32:79:11:fd:73:f7:c4: + af:28:f8:c7:15:66:50:2e:26:ab:76:ca:72:f2:d9: + 7f:1a:ee:64:e8:f2:87:4f:8d:32:09:1d:e8:14:fc: + 18:c5:13:f5:d7:74:94:61:8b:5f:e0:67:0a:84:fa: + 8b:2c:7e:8d:47:5b:7e:91:98:ef:14:58:b0:77:07: + c7:78:12:6c:e1:60:82:f4:fb:44:c3:64:7c:59:52: + f7:bb:ca:a0:28:4e:da:a0:53:95:80:d5:fd:1f:a6: + d7:8b:27:2a:f0:fc:67:e9:b2:c6:54:97:a2:9b:92: + b6:4f:c1:c8:82:2b:a4:ff:2a:d0:c2:7c:83:8d:b2: + 0c:29:a1:d9:86:b2:a0:f1:8a:50:fa:e7:e6:a6:f0: + fa:52:85:28:98:da:53:05:d8:62:1e:33:8a:c2:89: + e3:e8:98:f1:64:1a:bc:8d:c0:90:54:7b:8d:c4:00: + 77:52:fe:14:f3:79:0f:34:e9:6f:b2:b0:e1:e1:e5: + b5:77:71:c8:f3:cf:3e:38:4c:d4:b0:bf:aa:74:45: + 22:7e:18:23:ab:39:b0:a4:09:e3:35:73:8e:4e:91: + b6:c1:77:4f:39:b6:e4:24:95:92:5b:0b:6e:3f:ee: + f9:cf Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - A7:11:A2:44:B9:CC:AA:AD:09:63:9D:D6:9D:E1:76:32:A9:F4:A5:7B + 11:AD:0A:17:B2:9E:A2:12:F6:B2:82:F7:92:A9:01:AD:9C:D3:98:3B X509v3 Authority Key Identifier: - keyid:A4:66:E2:46:F7:3F:A1:73:9D:A2:E2:4E:29:99:DB:2E:36:36:6C:B5 + keyid:40:91:28:21:9D:93:F3:9C:18:1B:FF:00:9C:B2:08:A0:A3:81:7D:2A Authority Information Access: CA Issuers - URI:foobar @@ -51,39 +51,39 @@ X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 56:74:27:6f:5f:7b:a4:b5:c4:62:98:ae:70:4e:a9:92:44:fd: - 78:17:54:d0:ed:02:62:ad:cd:7a:28:09:56:16:9f:42:10:e2: - 9b:d4:d5:3b:8d:f6:97:a5:2a:c3:42:54:14:31:e9:7a:a8:23: - 00:69:41:6b:9d:c3:af:e4:fb:ad:6c:a4:ff:51:0b:c5:de:ae: - 69:9b:d9:fd:79:50:59:8e:5f:1e:b4:e8:35:c3:de:f1:c5:6e: - 2f:19:98:b5:b9:31:ac:b2:f5:ef:9c:9f:11:c9:82:5d:73:36: - f5:74:d1:af:b4:8d:a2:c3:e1:bb:90:4c:f8:dc:fe:68:2f:ec: - ef:c4:b2:4c:7b:24:1d:b5:58:1f:e4:c0:70:a6:68:f8:a3:a9: - 4a:2c:95:35:09:2b:23:c2:4d:29:09:cc:f3:85:1f:fc:77:76: - eb:f4:d0:0a:6a:cb:df:aa:e1:79:6d:53:8b:0b:9a:03:99:9a: - 27:84:6d:25:bf:68:b2:25:0b:ca:bd:a1:01:83:45:0b:2d:3a: - 2f:08:07:01:85:29:10:de:e0:82:68:30:20:78:79:a2:7e:fc: - f0:5e:f2:f5:91:b4:55:2a:8d:89:3e:62:6f:ee:12:47:16:0b: - 41:e3:2d:42:e1:9f:09:10:7c:9f:62:99:b1:67:66:ce:a8:06: - 5a:fd:05:d3 + 11:05:b5:d9:cd:93:1b:2e:e1:6a:71:d1:e1:a5:53:7f:b6:75: + 6f:ac:4a:56:f9:1b:f0:cc:ef:5d:37:56:23:72:75:c5:bb:cb: + b7:3e:04:e3:e7:de:af:97:e1:6a:6e:86:f1:55:6b:42:95:a3: + 16:fa:2f:38:cb:c0:0e:a9:eb:af:91:55:49:d6:65:21:25:83: + 2a:50:06:68:c4:e7:2d:09:da:0b:8f:d1:ce:30:21:74:66:02: + 17:3a:6c:5b:67:d7:20:64:69:a7:83:60:bb:08:9e:2f:ae:38: + 9e:8e:83:9e:5a:24:a8:65:0f:9f:b0:bb:ae:db:4f:ba:b4:4e: + 80:53:9e:4a:a7:23:ac:7f:db:f1:0e:8b:d9:7c:6c:bd:6c:8e: + b3:07:29:d8:9d:88:33:1f:40:ec:33:8b:a7:52:96:cf:e9:8d: + 15:48:57:cb:77:df:bd:f5:31:ee:64:bc:55:89:48:1b:26:56: + 73:a8:a5:88:fc:61:5f:d1:9a:28:0f:f7:69:88:0a:87:b0:a9: + ca:f4:e4:b2:31:11:b2:b2:15:88:7d:0c:8a:29:5a:ad:1a:29: + 74:13:06:2f:45:c0:48:83:60:89:fd:8c:7f:a3:4d:9e:5d:1c: + a9:61:19:fd:d5:a0:7e:a3:b7:59:a6:bb:bd:72:f2:da:ea:0b: + 05:05:56:e1 -----BEGIN CERTIFICATE----- MIIDgjCCAmqgAwIBAgIBCTANBgkqhkiG9w0BAQsFADAMMQowCAYDVQQDDAFJMB4X -DTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtDEeDEOOkD4sDqBxWHCq -OpJRFLY/s0MsPQp0DDBINHaQV+SA8o3sXQKVlJ5dBEkoSdlugUdXab6zSl71ZS/x -ZqWPY5juO5cJf9llVwCAVfGuQq+nVjq0W7WFVY1A0/d7yP1Fr/SVmvJyGIkskE08 -c8LrkdDVdez9gInDEqWZO9AAC6PEKixioIuXT1EvgwdX9I9QoWJNLmnNJVoWMBDe -qAs7e1hkMwj/TeIGGgO99AKQ0u0FC7VKNtHR8PVEDRaiPMogCzbJDnCevNgR1P4r -SXGRbciDbUV15+FjU310pjQY1GZ3yQR5CQhG9LEh9RmSU3t0G4SDAW8erJ0JHpsv -nQIDAQABo4HpMIHmMB0GA1UdDgQWBBSnEaJEucyqrQljndad4XYyqfSlezAfBgNV -HSMEGDAWgBSkZuJG9z+hc52i4k4pmdsuNjZstTBKBggrBgEFBQcBAQQ+MDwwEgYI +DTE1MDEwMTEyMDAwMFoXDTIxMDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAswS3Kn+FmrQwKXcLUMgf +sw2Ym/dPqzJ5Ef1z98SvKPjHFWZQLiardspy8tl/Gu5k6PKHT40yCR3oFPwYxRP1 +13SUYYtf4GcKhPqLLH6NR1t+kZjvFFiwdwfHeBJs4WCC9PtEw2R8WVL3u8qgKE7a +oFOVgNX9H6bXiycq8Pxn6bLGVJeim5K2T8HIgiuk/yrQwnyDjbIMKaHZhrKg8YpQ ++ufmpvD6UoUomNpTBdhiHjOKwonj6JjxZBq8jcCQVHuNxAB3Uv4U83kPNOlvsrDh +4eW1d3HI888+OEzUsL+qdEUifhgjqzmwpAnjNXOOTpG2wXdPObbkJJWSWwtuP+75 +zwIDAQABo4HpMIHmMB0GA1UdDgQWBBQRrQoXsp6iEvaygveSqQGtnNOYOzAfBgNV +HSMEGDAWgBRAkSghnZPznBgb/wCcsgigo4F9KjBKBggrBgEFBQcBAQQ+MDwwEgYI KwYBBQUHMAKGBmZvb2JhcjAmBggrBgEFBQcwAoYaaHR0cDovL3VybC1mb3ItYWlh Mi9JMi5mb28wKQYDVR0fBCIwIDAeoBygGoYYaHR0cDovL3VybC1mb3ItY3JsL0ku Y3JsMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUH -AwIwDQYJKoZIhvcNAQELBQADggEBAFZ0J29fe6S1xGKYrnBOqZJE/XgXVNDtAmKt -zXooCVYWn0IQ4pvU1TuN9pelKsNCVBQx6XqoIwBpQWudw6/k+61spP9RC8Xermmb -2f15UFmOXx606DXD3vHFbi8ZmLW5Mayy9e+cnxHJgl1zNvV00a+0jaLD4buQTPjc -/mgv7O/Eskx7JB21WB/kwHCmaPijqUoslTUJKyPCTSkJzPOFH/x3duv00Apqy9+q -4XltU4sLmgOZmieEbSW/aLIlC8q9oQGDRQstOi8IBwGFKRDe4IJoMCB4eaJ+/PBe -8vWRtFUqjYk+Ym/uEkcWC0HjLULhnwkQfJ9imbFnZs6oBlr9BdM= +AwIwDQYJKoZIhvcNAQELBQADggEBABEFtdnNkxsu4Wpx0eGlU3+2dW+sSlb5G/DM +7103ViNydcW7y7c+BOPn3q+X4WpuhvFVa0KVoxb6LzjLwA6p66+RVUnWZSElgypQ +BmjE5y0J2guP0c4wIXRmAhc6bFtn1yBkaaeDYLsIni+uOJ6Og55aJKhlD5+wu67b +T7q0ToBTnkqnI6x/2/EOi9l8bL1sjrMHKdidiDMfQOwzi6dSls/pjRVIV8t33731 +Me5kvFWJSBsmVnOopYj8YV/RmigP92mICoewqcr05LIxEbKyFYh9DIopWq0aKXQT +Bi9FwEiDYIn9jH+jTZ5dHKlhGf3VoH6jt1mmu71y8trqCwUFVuE= -----END CERTIFICATE-----
diff --git a/net/data/cert_issuer_source_aia_unittest/target_invalid_url_aia.pem b/net/data/cert_issuer_source_aia_unittest/target_invalid_url_aia.pem index 0eed1d0..2bf9b606 100644 --- a/net/data/cert_issuer_source_aia_unittest/target_invalid_url_aia.pem +++ b/net/data/cert_issuer_source_aia_unittest/target_invalid_url_aia.pem
@@ -6,36 +6,36 @@ Issuer: CN=I Validity Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT + Not After : Jan 1 12:00:00 2021 GMT Subject: CN=target Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:c7:27:f1:17:3f:71:b3:2a:98:b1:c0:c0:45:e2: - 0f:da:92:27:6e:44:6d:18:4d:87:b9:eb:c0:63:c9: - 2d:24:75:7a:15:85:68:3a:cc:cc:a5:9b:7f:82:c0: - 02:86:76:f9:28:b2:f7:2c:f3:48:bb:6d:17:11:38: - 4d:5e:86:bf:8a:89:e8:0f:70:c6:a6:81:bd:d1:92: - cd:eb:c0:99:90:3c:51:ca:14:d9:dd:75:66:17:1c: - 52:c2:d8:3e:8a:6b:0d:94:32:54:a6:b0:35:b9:5a: - 58:b0:80:28:38:2e:f1:c9:2f:b2:30:80:e5:05:c5: - b2:5b:6f:41:30:27:fd:02:7a:89:b1:74:90:cb:1f: - da:25:1d:7b:b7:00:2a:bf:0b:9c:5f:8b:25:ca:ae: - c5:56:33:1a:a2:72:a9:3c:23:8a:bc:3d:d2:50:0f: - 1a:0b:09:cc:c3:49:1b:81:c6:e1:aa:a5:db:68:cc: - 97:02:0f:1b:0d:c3:da:e0:c2:b8:18:8d:9f:04:37: - c5:65:79:30:2f:58:5a:21:a4:df:b2:85:c0:ec:59: - cf:8c:2a:c6:f3:8e:f8:56:95:63:b6:67:6e:4e:07: - 61:6d:34:17:36:fe:57:e7:a2:2d:8d:ce:71:86:53: - 2c:a2:07:02:f7:e2:a2:b9:5b:28:fa:bd:5c:70:15: - 55:69 + 00:a2:bc:d6:77:b0:d2:ca:cf:ec:a9:ae:5a:5d:88: + 50:50:12:9e:76:62:86:dc:61:78:d8:13:b3:e0:4f: + a8:d3:54:57:b5:ce:bf:75:c7:56:27:d2:8e:61:9c: + 48:cb:3e:d2:bb:17:69:63:ca:eb:a4:56:bd:90:32: + 28:bb:0a:ae:9d:4d:60:40:16:3b:4c:ca:4e:da:55: + d2:84:16:ae:c5:66:eb:bb:8b:3d:33:05:dc:e8:f3: + db:4d:4f:87:5c:eb:11:28:bc:ed:c8:fe:9d:b1:8a: + eb:c3:79:d0:e6:99:41:52:ec:68:97:48:78:4a:c3: + e1:b6:ec:38:1e:38:5b:fe:1b:f5:b4:76:94:d0:f3: + 89:50:da:97:0b:f3:5e:86:bd:26:72:de:bb:41:92: + a4:a1:bf:77:55:aa:b1:f3:95:6f:c2:ac:bf:ad:8a: + a6:c4:2b:5e:ed:55:55:a6:c4:fe:6c:68:dd:ea:54: + 3f:46:b2:98:e7:fa:54:fa:be:65:7a:5f:4f:c8:45: + d4:5d:7b:a0:56:35:83:d8:f0:e9:7f:63:0f:87:b6: + 82:bc:2f:53:5d:01:f2:94:bf:12:37:84:e6:a0:63: + 8c:8a:bc:a1:c9:1f:3c:1e:fb:95:60:41:47:bf:60: + 1a:f3:7c:99:7d:66:75:99:5d:c2:ca:53:c1:8b:99: + 59:37 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 67:BE:87:AA:D9:FB:88:9C:E8:F8:14:D3:FC:8E:44:95:EE:7D:7C:4E + 09:96:BA:42:0D:69:29:BC:6A:FB:3C:58:30:08:12:31:BF:5B:C0:CB X509v3 Authority Key Identifier: - keyid:A4:66:E2:46:F7:3F:A1:73:9D:A2:E2:4E:29:99:DB:2E:36:36:6C:B5 + keyid:40:91:28:21:9D:93:F3:9C:18:1B:FF:00:9C:B2:08:A0:A3:81:7D:2A Authority Information Access: CA Issuers - URI:foobar @@ -50,38 +50,38 @@ X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 84:53:97:e8:ce:6e:20:dc:41:bf:19:7f:f6:1a:a3:53:d3:8a: - fa:de:74:3a:78:ca:95:55:be:b3:f8:28:af:2b:94:c6:40:bd: - bd:ec:fd:c0:5a:8c:66:6c:00:08:6a:2b:3b:b7:b4:25:90:de: - 4d:5f:d7:e7:40:3b:cf:e0:98:7a:42:f6:4e:14:9b:02:fb:fa: - 8e:e7:d4:88:a5:92:cc:0d:40:36:f0:f7:6e:65:f3:d0:89:26: - d2:76:bf:46:ea:ec:42:af:cb:f2:06:57:fb:2d:67:a5:c9:12: - 54:a0:3b:a3:f3:de:30:15:58:ab:0c:91:ec:d2:7f:3d:86:67: - df:08:6d:36:8e:65:09:fe:d1:01:00:4b:bf:71:f8:4c:6b:6d: - f9:61:d6:91:e0:63:9a:f2:13:f0:93:c6:45:64:23:26:1a:69: - 9e:13:32:0b:a1:68:9f:77:15:0e:bc:d2:14:18:22:75:84:4e: - 33:9d:42:c4:77:b0:9f:14:9a:b5:fb:3a:b7:c5:46:ac:4c:59: - 1c:0c:33:c9:c0:aa:4e:54:37:dd:53:d8:bf:34:32:cb:a9:db: - 17:f9:14:17:9f:c3:62:71:29:02:6a:3a:8a:48:44:c8:08:de: - 32:7a:70:40:ce:27:b9:d9:1e:64:33:1d:e8:fd:0a:4e:54:c4: - 76:12:48:66 + 40:71:3c:29:92:1a:64:8e:7f:5b:3f:89:2f:33:b6:5f:9f:a7: + de:3a:c8:30:97:4d:67:96:c1:28:e0:7e:49:bb:07:05:09:d3: + 47:62:4f:79:8b:e7:12:ad:59:ff:84:4f:e8:a8:49:99:93:47: + e8:14:85:ff:dc:de:4c:e7:e5:69:c8:3c:93:5f:11:d1:0b:e0: + 98:e3:41:5b:25:5a:90:dd:c1:ce:d9:5c:de:fb:0a:74:fc:fd: + 52:49:55:cc:cc:85:f3:00:e9:48:5f:72:06:8e:82:4d:54:62: + d2:fe:a3:8c:6d:87:6e:30:d7:26:34:d2:db:ec:cf:7e:e6:38: + 0c:b0:c9:0b:16:09:e1:15:3d:ed:63:87:9d:63:a6:3f:78:29: + 1a:71:c0:6e:c4:0c:9f:ad:3f:29:0a:7d:7f:3a:09:36:ee:1f: + 4e:9f:d9:95:0f:c9:21:e4:92:ae:eb:76:bb:b9:41:ca:e3:86: + 92:54:c7:48:c9:89:d5:0a:5a:f4:b0:48:8a:ef:bd:99:03:dd: + 93:bc:22:ee:97:78:79:3a:1e:d1:2c:b2:d7:59:d6:79:a3:f9: + 28:47:e8:9a:fe:21:4b:f4:d8:a7:8b:de:9a:49:d6:6b:86:2c: + 8f:ad:76:70:e1:f2:12:ad:26:85:c4:4a:d5:48:58:61:fa:79: + 42:9c:03:6f -----BEGIN CERTIFICATE----- MIIDWjCCAkKgAwIBAgIBBzANBgkqhkiG9w0BAQsFADAMMQowCAYDVQQDDAFJMB4X -DTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxyfxFz9xsyqYscDAReIP -2pInbkRtGE2HuevAY8ktJHV6FYVoOszMpZt/gsAChnb5KLL3LPNIu20XEThNXoa/ -ionoD3DGpoG90ZLN68CZkDxRyhTZ3XVmFxxSwtg+imsNlDJUprA1uVpYsIAoOC7x -yS+yMIDlBcWyW29BMCf9AnqJsXSQyx/aJR17twAqvwucX4slyq7FVjMaonKpPCOK -vD3SUA8aCwnMw0kbgcbhqqXbaMyXAg8bDcPa4MK4GI2fBDfFZXkwL1haIaTfsoXA -7FnPjCrG8474VpVjtmduTgdhbTQXNv5X56Itjc5xhlMsogcC9+KiuVso+r1ccBVV -aQIDAQABo4HBMIG+MB0GA1UdDgQWBBRnvoeq2fuInOj4FNP8jkSV7n18TjAfBgNV -HSMEGDAWgBSkZuJG9z+hc52i4k4pmdsuNjZstTAiBggrBgEFBQcBAQQWMBQwEgYI +DTE1MDEwMTEyMDAwMFoXDTIxMDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAorzWd7DSys/sqa5aXYhQ +UBKedmKG3GF42BOz4E+o01RXtc6/dcdWJ9KOYZxIyz7SuxdpY8rrpFa9kDIouwqu +nU1gQBY7TMpO2lXShBauxWbru4s9MwXc6PPbTU+HXOsRKLztyP6dsYrrw3nQ5plB +Uuxol0h4SsPhtuw4Hjhb/hv1tHaU0POJUNqXC/Nehr0mct67QZKkob93Vaqx85Vv +wqy/rYqmxCte7VVVpsT+bGjd6lQ/RrKY5/pU+r5lel9PyEXUXXugVjWD2PDpf2MP +h7aCvC9TXQHylL8SN4TmoGOMiryhyR88HvuVYEFHv2Aa83yZfWZ1mV3CylPBi5lZ +NwIDAQABo4HBMIG+MB0GA1UdDgQWBBQJlrpCDWkpvGr7PFgwCBIxv1vAyzAfBgNV +HSMEGDAWgBRAkSghnZPznBgb/wCcsgigo4F9KjAiBggrBgEFBQcBAQQWMBQwEgYI KwYBBQUHMAKGBmZvb2JhcjApBgNVHR8EIjAgMB6gHKAahhhodHRwOi8vdXJsLWZv ci1jcmwvSS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMB -BggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAhFOX6M5uINxBvxl/9hqjU9OK -+t50OnjKlVW+s/goryuUxkC9vez9wFqMZmwACGorO7e0JZDeTV/X50A7z+CYekL2 -ThSbAvv6jufUiKWSzA1ANvD3bmXz0Ikm0na/RursQq/L8gZX+y1npckSVKA7o/Pe -MBVYqwyR7NJ/PYZn3whtNo5lCf7RAQBLv3H4TGtt+WHWkeBjmvIT8JPGRWQjJhpp -nhMyC6Fon3cVDrzSFBgidYROM51CxHewnxSatfs6t8VGrExZHAwzycCqTlQ33VPY -vzQyy6nbF/kUF5/DYnEpAmo6ikhEyAjeMnpwQM4nudkeZDMd6P0KTlTEdhJIZg== +BggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAQHE8KZIaZI5/Wz+JLzO2X5+n +3jrIMJdNZ5bBKOB+SbsHBQnTR2JPeYvnEq1Z/4RP6KhJmZNH6BSF/9zeTOflacg8 +k18R0QvgmONBWyVakN3Bztlc3vsKdPz9UklVzMyF8wDpSF9yBo6CTVRi0v6jjG2H +bjDXJjTS2+zPfuY4DLDJCxYJ4RU97WOHnWOmP3gpGnHAbsQMn60/KQp9fzoJNu4f +Tp/ZlQ/JIeSSrut2u7lByuOGklTHSMmJ1Qpa9LBIiu+9mQPdk7wi7pd4eToe0Syy +11nWeaP5KEfomv4hS/TYp4vemknWa4Ysj612cOHyEq0mhcRK1UhYYfp5QpwDbw== -----END CERTIFICATE-----
diff --git a/net/data/cert_issuer_source_aia_unittest/target_no_aia.pem b/net/data/cert_issuer_source_aia_unittest/target_no_aia.pem index c9146efc..e1279a4 100644 --- a/net/data/cert_issuer_source_aia_unittest/target_no_aia.pem +++ b/net/data/cert_issuer_source_aia_unittest/target_no_aia.pem
@@ -6,36 +6,36 @@ Issuer: CN=I Validity Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT + Not After : Jan 1 12:00:00 2021 GMT Subject: CN=target Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:c8:d2:4b:11:93:9a:57:64:a6:36:33:e6:dd:b9: - 4f:b0:ba:86:e5:cc:76:b6:ec:22:4d:c4:25:26:0a: - 3e:0b:d8:24:1f:f1:fa:0f:ac:ff:c5:d5:01:97:ab: - 54:fd:01:76:b4:15:bc:66:c0:f2:a4:0b:45:49:2d: - 9f:56:81:95:86:62:11:8e:65:39:d7:42:6a:a8:9c: - 57:d2:47:90:d2:32:fc:bc:ac:ce:99:70:ae:ec:24: - 3b:b2:e6:b7:6b:60:be:27:59:d0:75:bf:b8:f4:ce: - 23:94:56:79:64:32:a0:f1:20:1c:38:3d:1c:0c:ed: - af:86:ca:78:b9:84:e7:f1:ee:04:2a:81:1e:ad:d9: - 58:c7:1e:63:3e:ce:3b:80:01:5f:42:06:d2:85:d9: - d5:8d:b6:0a:72:c5:9c:6d:2d:ee:88:57:ab:71:8c: - c7:4a:40:6a:cc:7a:1e:4f:4b:a4:3d:fa:cd:aa:31: - 9b:4e:6e:be:6d:e0:7b:90:ba:88:f6:a3:c8:7d:a7: - d8:7c:84:e1:7e:a2:63:2d:28:5e:c7:af:d6:0d:a3: - ab:24:06:ec:97:22:f8:2f:78:1d:f6:36:49:10:c3: - d2:64:e3:e7:9a:f6:70:c5:19:ae:fc:fc:c7:0a:31: - 0b:e5:23:78:50:b2:7b:7e:d8:43:8a:6d:a7:44:94: - e7:35 + 00:b3:43:32:88:c1:3b:65:14:01:c1:e3:e7:52:74: + 40:83:65:0d:97:4a:0a:64:60:86:72:b8:89:99:da: + f9:ab:21:74:ce:f8:89:f7:34:d8:4c:51:34:3d:56: + 1a:a2:fb:90:55:5a:62:e3:ab:16:3b:a8:8f:cd:f7: + 43:5a:e9:f0:1c:d5:38:a6:f7:e0:26:11:d7:bb:01: + 74:88:a6:e2:86:57:a0:78:ac:d4:1e:01:c6:4b:08: + f7:d3:02:6f:fa:3d:7b:6f:ca:7b:1d:ae:44:59:e2: + 86:4a:34:5b:e2:18:c9:fd:f9:a4:39:4e:e0:2a:41: + 4e:86:f3:d5:9b:0c:00:a7:b5:81:92:e2:44:56:9d: + 02:66:e6:50:02:02:44:b4:5f:02:ac:ae:50:12:75: + 7e:62:7e:b7:44:17:e1:e2:43:f7:1a:03:31:84:86: + 8a:63:4f:76:73:49:92:ab:8e:61:78:4c:a2:c5:53: + a7:c4:c1:91:20:08:45:fd:4d:97:1f:65:20:d4:e5: + e8:db:67:2c:7b:aa:dd:98:de:d8:3b:0e:af:09:52: + 17:af:d8:21:67:08:1d:df:ad:41:f1:62:f2:6e:8e: + f7:0b:80:a8:d4:29:7b:5f:87:e0:a1:96:e3:60:98: + 5f:c1:63:b8:eb:01:9d:b7:51:30:01:bd:1b:a7:7e: + be:ad Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 62:47:32:0D:D2:47:B0:F5:FF:3A:B7:07:59:69:49:D9:71:CC:9A:33 + B7:FF:6C:44:69:C6:FE:C3:8B:69:5F:60:FB:BC:5D:76:FE:50:D3:1A X509v3 Authority Key Identifier: - keyid:A4:66:E2:46:F7:3F:A1:73:9D:A2:E2:4E:29:99:DB:2E:36:36:6C:B5 + keyid:40:91:28:21:9D:93:F3:9C:18:1B:FF:00:9C:B2:08:A0:A3:81:7D:2A X509v3 CRL Distribution Points: @@ -47,38 +47,38 @@ X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 00:e7:9b:5f:56:c4:61:39:39:ae:a8:a2:f6:c7:c1:ca:d2:e7: - db:4e:e1:9b:0f:ef:5c:11:88:49:9f:d7:85:69:54:86:3a:cc: - 40:f1:14:2a:4b:a3:75:d3:a5:8d:6d:9e:bf:8c:ce:8b:85:07: - 37:ef:05:5e:51:fe:28:55:db:75:ec:0e:30:c1:7e:7f:53:67: - e1:87:ed:df:69:75:08:27:f9:33:58:af:96:84:ab:0b:10:0f: - ff:3a:98:68:de:bf:9e:78:ef:92:12:40:bd:c3:a1:22:0e:ea: - ca:3e:52:93:5e:5b:b6:67:61:ac:b9:dd:9f:2f:26:ca:e6:b6: - d2:ad:a1:1a:7c:e3:c7:f6:3f:61:3d:7e:2b:35:e0:29:39:35: - d1:82:69:a4:4e:09:77:ab:7c:16:7b:e6:56:2b:c4:17:87:25: - 57:59:ed:44:d1:99:23:26:1b:d0:79:67:ad:ae:cd:df:87:7a: - 5f:48:fe:2f:63:90:ca:da:56:90:32:3c:6c:fa:87:8b:d2:51: - 2f:2e:ce:c8:a9:19:a2:8f:f1:54:03:08:ad:85:a3:dd:b2:ac: - e2:47:06:65:c0:47:ee:ff:f5:eb:9d:82:89:f1:03:71:d5:e1: - e6:87:45:5e:f5:da:f2:21:53:78:62:9a:dc:cf:74:a8:9e:12: - a9:ff:6c:00 + 76:cf:2a:df:5e:f3:e8:b2:b2:13:c6:59:a2:98:4e:46:42:48: + 9a:a4:5e:d1:3a:c9:5b:4d:4f:69:74:ca:26:af:43:79:52:5c: + 7d:13:7f:ba:1e:0c:1a:47:6d:72:89:8c:5b:2d:11:de:3f:df: + 20:3d:32:94:9a:34:87:b6:e1:93:ae:73:98:31:c7:40:b4:ad: + 95:97:e5:2a:f8:17:c2:2e:a3:ac:7c:d6:a6:db:66:1c:1f:85: + ae:7b:e8:cd:d4:95:27:16:80:b0:d8:4c:e9:02:40:61:89:7f: + 58:40:7e:0d:74:cc:f3:d4:98:f9:eb:18:b9:12:78:17:22:f0: + 13:aa:0f:1b:c4:12:fc:77:9d:ef:cb:12:e5:99:aa:03:76:ff: + 41:07:20:3c:3f:5f:cb:de:a4:9c:6f:a0:eb:83:84:d2:32:1b: + c9:ee:e8:30:9b:a9:d9:2d:57:72:e0:a1:b1:f2:94:82:fe:8f: + 05:6d:52:c4:17:96:14:79:be:22:85:27:78:6e:25:fb:56:3c: + 34:d5:8b:a5:e5:f8:2d:31:6a:d5:fc:7c:e6:9d:8b:fc:d8:42: + 24:c3:b7:67:99:8a:46:fb:f0:a3:74:fd:eb:71:94:a4:31:b3: + 94:b1:90:c4:42:04:32:56:0c:c6:70:b0:bd:22:ce:1f:95:f1: + 25:80:ac:8e -----BEGIN CERTIFICATE----- MIIDNjCCAh6gAwIBAgIBAjANBgkqhkiG9w0BAQsFADAMMQowCAYDVQQDDAFJMB4X -DTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyNJLEZOaV2SmNjPm3blP -sLqG5cx2tuwiTcQlJgo+C9gkH/H6D6z/xdUBl6tU/QF2tBW8ZsDypAtFSS2fVoGV -hmIRjmU510JqqJxX0keQ0jL8vKzOmXCu7CQ7sua3a2C+J1nQdb+49M4jlFZ5ZDKg -8SAcOD0cDO2vhsp4uYTn8e4EKoEerdlYxx5jPs47gAFfQgbShdnVjbYKcsWcbS3u -iFercYzHSkBqzHoeT0ukPfrNqjGbTm6+beB7kLqI9qPIfafYfIThfqJjLShex6/W -DaOrJAbslyL4L3gd9jZJEMPSZOPnmvZwxRmu/PzHCjEL5SN4ULJ7fthDim2nRJTn -NQIDAQABo4GdMIGaMB0GA1UdDgQWBBRiRzIN0kew9f86twdZaUnZccyaMzAfBgNV -HSMEGDAWgBSkZuJG9z+hc52i4k4pmdsuNjZstTApBgNVHR8EIjAgMB6gHKAahhho +DTE1MDEwMTEyMDAwMFoXDTIxMDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs0MyiME7ZRQBwePnUnRA +g2UNl0oKZGCGcriJmdr5qyF0zviJ9zTYTFE0PVYaovuQVVpi46sWO6iPzfdDWunw +HNU4pvfgJhHXuwF0iKbihlegeKzUHgHGSwj30wJv+j17b8p7Ha5EWeKGSjRb4hjJ +/fmkOU7gKkFOhvPVmwwAp7WBkuJEVp0CZuZQAgJEtF8CrK5QEnV+Yn63RBfh4kP3 +GgMxhIaKY092c0mSq45heEyixVOnxMGRIAhF/U2XH2Ug1OXo22cse6rdmN7YOw6v +CVIXr9ghZwgd361B8WLybo73C4Co1Cl7X4fgoZbjYJhfwWO46wGdt1EwAb0bp36+ +rQIDAQABo4GdMIGaMB0GA1UdDgQWBBS3/2xEacb+w4tpX2D7vF12/lDTGjAfBgNV +HSMEGDAWgBRAkSghnZPznBgb/wCcsgigo4F9KjApBgNVHR8EIjAgMB6gHKAahhho dHRwOi8vdXJsLWZvci1jcmwvSS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQW -MBQGCCsGAQUFBwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAAOebX1bE -YTk5rqii9sfBytLn207hmw/vXBGISZ/XhWlUhjrMQPEUKkujddOljW2ev4zOi4UH -N+8FXlH+KFXbdewOMMF+f1Nn4Yft32l1CCf5M1ivloSrCxAP/zqYaN6/nnjvkhJA -vcOhIg7qyj5Sk15btmdhrLndny8myua20q2hGnzjx/Y/YT1+KzXgKTk10YJppE4J -d6t8FnvmVivEF4clV1ntRNGZIyYb0Hlnra7N34d6X0j+L2OQytpWkDI8bPqHi9JR -Ly7OyKkZoo/xVAMIrYWj3bKs4kcGZcBH7v/1652CifEDcdXh5odFXvXa8iFTeGKa -3M90qJ4Sqf9sAA== +MBQGCCsGAQUFBwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAds8q317z +6LKyE8ZZophORkJImqRe0TrJW01PaXTKJq9DeVJcfRN/uh4MGkdtcomMWy0R3j/f +ID0ylJo0h7bhk65zmDHHQLStlZflKvgXwi6jrHzWpttmHB+FrnvozdSVJxaAsNhM +6QJAYYl/WEB+DXTM89SY+esYuRJ4FyLwE6oPG8QS/Hed78sS5ZmqA3b/QQcgPD9f +y96knG+g64OE0jIbye7oMJup2S1XcuChsfKUgv6PBW1SxBeWFHm+IoUneG4l+1Y8 +NNWLpeX4LTFq1fx85p2L/NhCJMO3Z5mKRvvwo3T963GUpDGzlLGQxEIEMlYMxnCw +vSLOH5XxJYCsjg== -----END CERTIFICATE-----
diff --git a/net/data/cert_issuer_source_aia_unittest/target_one_aia.pem b/net/data/cert_issuer_source_aia_unittest/target_one_aia.pem index b166477..c89862f7 100644 --- a/net/data/cert_issuer_source_aia_unittest/target_one_aia.pem +++ b/net/data/cert_issuer_source_aia_unittest/target_one_aia.pem
@@ -6,36 +6,36 @@ Issuer: CN=I Validity Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT + Not After : Jan 1 12:00:00 2021 GMT Subject: CN=target Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:bc:98:17:cf:5b:06:da:5d:7b:50:6b:c3:d5:d1: - c0:0a:0f:81:ef:1c:a6:31:1b:0f:75:66:71:70:73: - fa:69:1a:a7:bd:e7:3f:b3:50:34:9e:39:36:eb:e7: - 64:0c:f0:61:3a:90:35:f5:26:e5:9b:ed:d6:6e:06: - 01:ae:c8:1d:1b:e7:c0:54:00:17:32:87:81:55:64: - e6:27:72:47:d8:ed:fe:f9:9d:c0:b3:4f:a6:79:90: - 61:48:6b:18:3f:c7:f8:b5:ec:d8:e2:cb:64:d0:6b: - c9:63:9d:58:9a:17:bf:87:08:18:18:81:af:1f:ec: - fe:db:5a:31:4f:c1:af:a0:84:86:bb:f9:87:eb:fa: - 58:1a:d7:bc:4f:52:e7:29:52:5c:fc:6a:72:ca:46: - 3f:89:f2:d3:4c:02:b4:fb:73:be:85:f5:3d:aa:2d: - 4d:92:1f:27:e0:9a:59:74:83:74:12:ce:e9:02:ee: - fd:b1:f7:35:59:41:c2:53:3c:60:24:79:a6:46:8e: - 99:65:a5:91:ee:52:df:1a:b5:4e:22:3c:b2:be:cf: - b6:0f:d3:28:fe:2e:b7:23:87:4e:4f:b3:4a:e0:33: - b4:e1:ff:78:89:9f:60:7f:ac:e3:3d:a9:7d:ce:a6: - 8c:c3:59:56:10:51:fc:b3:f2:a1:a9:3e:7d:1f:1e: - 2e:37 + 00:ba:f4:30:40:ee:e8:c3:44:66:c1:07:f4:27:30: + bc:76:aa:df:c1:f9:84:f8:2d:60:d8:a3:96:8c:9e: + e6:9d:ea:d9:98:dc:64:01:3e:ae:9f:82:23:52:64: + 60:75:98:9c:2d:ea:55:a3:80:42:be:31:9d:51:49: + a6:ea:e3:9d:a8:cc:89:93:36:3a:a3:33:5c:56:e9: + 4b:f0:cf:81:bd:5e:52:05:44:34:ad:25:af:61:b5: + da:d5:30:e9:18:e0:23:64:1c:08:d2:8f:43:8f:84: + 3b:62:7e:2e:e8:71:8a:0b:9a:4d:0e:20:90:14:77: + 40:83:39:92:93:66:44:7f:c9:94:e0:ba:7b:82:95: + 4d:bf:3a:72:8f:00:4c:62:dc:72:a7:43:43:53:0b: + bb:52:b5:3f:42:5b:3b:6a:89:a2:ed:c9:27:0b:49: + 74:51:da:0e:53:72:87:7c:4c:30:26:a4:ca:53:59: + 8e:4f:75:b7:c8:1e:7b:77:35:d8:5e:f7:9f:f4:1b: + 77:31:19:4f:4b:f9:1f:e6:c0:84:9c:21:b0:5f:1d: + 5e:24:14:35:ee:80:98:8d:eb:77:06:6f:27:61:fc: + ac:3b:99:f5:d9:86:85:ee:e1:79:90:62:05:b6:58: + a2:9e:31:34:d7:b9:38:39:3b:91:92:37:de:68:e0: + 4b:85 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 7B:FF:76:7A:1E:BC:68:80:7E:C7:56:AB:B2:24:6B:45:65:48:B2:21 + F4:04:58:42:C7:F3:33:C8:D7:AE:12:EC:87:E9:98:48:2D:E9:33:1E X509v3 Authority Key Identifier: - keyid:A4:66:E2:46:F7:3F:A1:73:9D:A2:E2:4E:29:99:DB:2E:36:36:6C:B5 + keyid:40:91:28:21:9D:93:F3:9C:18:1B:FF:00:9C:B2:08:A0:A3:81:7D:2A Authority Information Access: CA Issuers - URI:http://url-for-aia/I.cer @@ -50,39 +50,39 @@ X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 81:f3:ab:93:d6:70:1a:5c:e7:2c:02:7d:3f:6d:f1:58:47:f1: - 84:2e:07:ff:63:74:df:2b:ad:0c:a2:bc:36:e5:fb:eb:1b:f9: - f2:38:90:5b:9d:fd:9b:c7:dd:ca:b7:d2:27:5a:ef:19:e2:c0: - 1f:a3:ea:bc:7a:f8:b9:b5:d6:16:15:e7:25:58:1c:8b:69:d5: - 69:d6:15:d1:85:4d:ba:21:3b:e8:06:46:5f:b1:4a:b1:fe:da: - 59:26:bb:5d:11:96:e2:7b:e2:19:3c:11:58:67:5c:fd:91:a3: - 9e:84:ff:50:34:27:ba:95:a5:7c:c7:7b:63:ad:2b:72:8c:d7: - e2:3c:3e:c0:e8:9e:43:40:70:20:46:8c:1d:69:2f:8d:c8:1c: - 0d:44:9f:f0:e8:07:69:cf:08:1c:7f:ff:0c:bb:36:8e:3d:e0: - d8:14:8f:b9:9e:12:d9:28:c2:2c:39:3a:2d:a7:01:5d:d4:3a: - ca:b7:a0:66:68:be:28:c6:dc:a1:69:a6:ba:ed:04:82:2d:3d: - 45:42:cf:b7:58:4f:a3:1a:50:66:2d:c0:07:e6:4f:05:de:49: - 57:b8:81:e6:99:77:4c:0b:e8:19:4c:7a:c2:8a:a9:4b:92:63: - 15:91:8e:a0:fa:ce:fa:19:a5:05:4b:a0:f3:de:60:48:37:e2: - 92:16:06:e7 + 0f:eb:81:92:ea:ac:d4:ac:84:d7:a2:b0:b0:55:78:47:37:af: + e5:0d:97:a6:ff:67:ff:e7:3b:71:8b:0d:67:84:b5:d2:4f:8f: + 5f:2b:26:f7:92:66:1d:8a:5d:b6:25:24:6f:84:2f:bc:ea:30: + 1d:f8:34:84:12:ea:69:05:76:d5:61:dd:eb:d3:70:3b:68:58: + 87:f9:c6:cf:04:6e:8a:e5:02:94:39:9d:a1:45:50:92:00:20: + 98:d6:6f:a4:45:08:83:f8:3a:f0:67:aa:67:01:79:c9:bc:89: + 8e:77:68:15:20:00:d0:3d:80:d4:c4:e1:7a:73:cd:16:18:bd: + 7c:a4:5c:2f:5c:c9:d7:2e:63:e8:38:63:b5:f4:6a:11:c9:1f: + 8e:3b:44:9a:51:d0:d8:8d:a6:33:ab:12:4c:76:27:36:67:ec: + 15:2e:93:79:e5:33:b5:7a:74:c6:ac:c2:82:79:4f:cf:96:79: + 20:81:4f:aa:12:25:03:9c:0c:45:83:65:5e:45:e1:01:00:a2: + b7:a4:27:00:4f:ad:c1:2a:e6:66:46:16:44:0e:9d:c4:32:73: + 72:ae:f9:2b:d9:71:0a:d6:ca:56:a8:9b:8b:c2:44:b5:fe:48: + 54:c9:b8:60:d8:5d:c2:2f:2c:34:73:66:54:5c:c3:c9:8d:c6: + c7:a8:76:d8 -----BEGIN CERTIFICATE----- MIIDbDCCAlSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAMMQowCAYDVQQDDAFJMB4X -DTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvJgXz1sG2l17UGvD1dHA -Cg+B7xymMRsPdWZxcHP6aRqnvec/s1A0njk26+dkDPBhOpA19Sblm+3WbgYBrsgd -G+fAVAAXMoeBVWTmJ3JH2O3++Z3As0+meZBhSGsYP8f4tezY4stk0GvJY51Ymhe/ -hwgYGIGvH+z+21oxT8GvoISGu/mH6/pYGte8T1LnKVJc/GpyykY/ifLTTAK0+3O+ -hfU9qi1Nkh8n4JpZdIN0Es7pAu79sfc1WUHCUzxgJHmmRo6ZZaWR7lLfGrVOIjyy -vs+2D9Mo/i63I4dOT7NK4DO04f94iZ9gf6zjPal9zqaMw1lWEFH8s/KhqT59Hx4u -NwIDAQABo4HTMIHQMB0GA1UdDgQWBBR7/3Z6HrxogH7HVquyJGtFZUiyITAfBgNV -HSMEGDAWgBSkZuJG9z+hc52i4k4pmdsuNjZstTA0BggrBgEFBQcBAQQoMCYwJAYI +DTE1MDEwMTEyMDAwMFoXDTIxMDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuvQwQO7ow0RmwQf0JzC8 +dqrfwfmE+C1g2KOWjJ7mnerZmNxkAT6un4IjUmRgdZicLepVo4BCvjGdUUmm6uOd +qMyJkzY6ozNcVulL8M+BvV5SBUQ0rSWvYbXa1TDpGOAjZBwI0o9Dj4Q7Yn4u6HGK +C5pNDiCQFHdAgzmSk2ZEf8mU4Lp7gpVNvzpyjwBMYtxyp0NDUwu7UrU/Qls7aomi +7cknC0l0UdoOU3KHfEwwJqTKU1mOT3W3yB57dzXYXvef9Bt3MRlPS/kf5sCEnCGw +Xx1eJBQ17oCYjet3Bm8nYfysO5n12YaF7uF5kGIFtliinjE017k4OTuRkjfeaOBL +hQIDAQABo4HTMIHQMB0GA1UdDgQWBBT0BFhCx/MzyNeuEuyH6ZhILekzHjAfBgNV +HSMEGDAWgBRAkSghnZPznBgb/wCcsgigo4F9KjA0BggrBgEFBQcBAQQoMCYwJAYI KwYBBQUHMAKGGGh0dHA6Ly91cmwtZm9yLWFpYS9JLmNlcjApBgNVHR8EIjAgMB6g HKAahhhodHRwOi8vdXJsLWZvci1jcmwvSS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0G A1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEA -gfOrk9ZwGlznLAJ9P23xWEfxhC4H/2N03yutDKK8NuX76xv58jiQW539m8fdyrfS -J1rvGeLAH6PqvHr4ubXWFhXnJVgci2nVadYV0YVNuiE76AZGX7FKsf7aWSa7XRGW -4nviGTwRWGdc/ZGjnoT/UDQnupWlfMd7Y60rcozX4jw+wOieQ0BwIEaMHWkvjcgc -DUSf8OgHac8IHH//DLs2jj3g2BSPuZ4S2SjCLDk6LacBXdQ6yregZmi+KMbcoWmm -uu0Egi09RULPt1hPoxpQZi3AB+ZPBd5JV7iB5pl3TAvoGUx6woqpS5JjFZGOoPrO -+hmlBUug895gSDfikhYG5w== +D+uBkuqs1KyE16KwsFV4Rzev5Q2Xpv9n/+c7cYsNZ4S10k+PXysm95JmHYpdtiUk +b4QvvOowHfg0hBLqaQV21WHd69NwO2hYh/nGzwRuiuUClDmdoUVQkgAgmNZvpEUI +g/g68GeqZwF5ybyJjndoFSAA0D2A1MThenPNFhi9fKRcL1zJ1y5j6DhjtfRqEckf +jjtEmlHQ2I2mM6sSTHYnNmfsFS6TeeUztXp0xqzCgnlPz5Z5IIFPqhIlA5wMRYNl +XkXhAQCit6QnAE+twSrmZkYWRA6dxDJzcq75K9lxCtbKVqibi8JEtf5IVMm4YNhd +wi8sNHNmVFzDyY3Gx6h22A== -----END CERTIFICATE-----
diff --git a/net/data/cert_issuer_source_aia_unittest/target_six_aia.pem b/net/data/cert_issuer_source_aia_unittest/target_six_aia.pem index 79c573c..1ded810f 100644 --- a/net/data/cert_issuer_source_aia_unittest/target_six_aia.pem +++ b/net/data/cert_issuer_source_aia_unittest/target_six_aia.pem
@@ -6,36 +6,36 @@ Issuer: CN=I Validity Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT + Not After : Jan 1 12:00:00 2021 GMT Subject: CN=target Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:cd:b6:44:0e:5c:1c:cf:03:89:04:19:c9:c0:e5: - 0d:86:bc:44:e1:54:31:33:24:2a:9f:50:9e:68:a5: - d2:17:1b:e1:96:1b:31:40:e2:05:4f:8b:c3:0c:41: - d0:66:8a:8b:03:a6:4a:64:40:f4:8b:f9:a1:f4:84: - 18:fc:93:6c:7c:80:37:e2:a6:f6:93:bb:9d:14:63: - 63:b8:66:b0:71:b9:2c:9d:f4:4d:55:41:e3:04:ad: - 1f:ff:56:13:a5:7a:97:fd:12:ec:21:d4:99:85:77: - ec:bd:d1:13:12:2f:e3:ac:1f:34:0e:ff:cf:00:05: - b0:c2:40:e0:a6:ba:48:1a:a4:0b:37:7a:e5:ea:d6: - bf:15:e2:21:f3:6b:23:c9:16:26:44:c9:cc:61:4c: - 77:d4:e2:5d:04:0e:2b:f5:38:49:14:11:4b:d2:91: - 45:d3:b9:cd:3b:df:f7:99:fd:3c:ae:ce:f2:76:e7: - 80:b0:7d:b1:cd:9f:29:67:8a:61:c7:ae:1c:15:fb: - 46:76:d8:1c:0e:fc:82:29:85:da:4d:ae:24:1c:63: - 36:bb:e0:43:1a:73:7f:ac:e5:81:a5:0c:aa:bb:32: - 96:41:48:f4:4d:2d:f6:a2:c7:9f:d0:94:72:29:05: - ee:7d:69:1f:4a:ea:7f:a8:77:d4:75:c6:66:67:2e: - f5:d1 + 00:b2:52:ee:94:90:a8:1a:32:bb:4f:64:17:a6:31: + ab:08:09:91:ef:ec:ad:0a:e9:fb:5b:fa:6a:1f:e6: + 68:2f:53:8b:04:74:32:75:9d:bc:fd:b3:c9:a2:ba: + 6a:0d:94:6f:02:e5:c6:06:1a:5c:2a:d2:95:25:6e: + 53:86:88:d3:1c:11:db:b8:b8:9a:94:9a:89:65:c6: + c5:6a:2e:b3:4f:07:80:40:d1:21:29:4c:52:84:e9: + b4:a7:2d:f3:21:66:23:24:a7:b3:de:95:a3:79:4f: + 26:31:6c:b9:da:76:d6:ec:d4:7e:d1:44:b7:63:d3: + 8b:75:ff:04:a0:e2:96:57:5a:85:28:3b:0f:f3:12: + 0c:15:b9:7f:39:6a:9a:0b:95:ee:bc:d9:09:00:3e: + b3:04:b5:7e:d8:af:42:6e:c5:cf:0f:d2:9b:71:aa: + 14:b6:cb:b0:9b:d6:5f:2c:97:24:c4:3f:27:e6:a7: + 47:5a:54:bf:84:68:ea:4f:e1:f0:1a:3b:7a:1b:85: + d3:e9:8e:5f:b5:18:93:36:54:f1:15:e8:6f:52:c9: + b7:5d:90:9d:d5:2f:fb:49:8c:b8:52:4e:34:bf:46: + f4:8f:ee:76:1b:ca:9d:56:4d:f5:96:07:c3:76:60: + 66:3b:8c:e7:ef:fc:29:51:6d:0f:f0:f9:fb:db:44: + e3:f5 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 78:F9:75:F9:80:E3:8F:14:93:E7:8D:DC:DF:D5:72:81:19:88:83:6F + D9:D1:6E:42:D5:27:F3:97:CB:FD:15:37:54:E7:C9:A4:EA:F1:FB:D9 X509v3 Authority Key Identifier: - keyid:A4:66:E2:46:F7:3F:A1:73:9D:A2:E2:4E:29:99:DB:2E:36:36:6C:B5 + keyid:40:91:28:21:9D:93:F3:9C:18:1B:FF:00:9C:B2:08:A0:A3:81:7D:2A Authority Information Access: CA Issuers - URI:http://url-for-aia/I.cer @@ -55,32 +55,32 @@ X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 2a:f3:04:7a:5b:af:49:a5:51:f5:29:21:1d:67:90:85:0e:50: - 1e:17:41:3a:47:41:8a:db:69:bb:48:42:81:9d:d5:98:71:8f: - 05:b7:d4:18:f7:db:1f:79:98:e5:04:67:19:47:55:f9:92:42: - cc:41:32:c1:9b:bc:ae:2a:04:8f:bf:5a:ab:93:e5:bb:e0:93: - e8:74:60:0f:ea:cc:12:5c:fa:26:67:17:03:8d:74:36:e9:85: - a5:e9:14:3c:60:14:97:0c:76:0e:d7:69:ea:4d:a9:20:b4:7a: - e7:c9:30:19:35:13:ff:c8:0c:b8:1b:30:19:60:62:76:cd:21: - 67:c4:65:bd:7e:9a:79:d0:3b:8e:15:fd:24:ef:5b:89:49:65: - 25:5e:af:f9:d5:03:87:a6:da:6d:dd:ce:75:45:7b:3c:5f:58: - fd:3a:cb:22:a8:02:5b:2d:83:3e:7c:e2:67:bc:5f:e4:4c:54: - f4:e1:f0:3b:d8:04:51:2e:3b:95:75:c2:da:b1:e5:44:cd:0d: - 8a:53:f0:2b:6c:1f:26:7b:1d:0e:cf:ce:fd:6b:b8:2a:b0:87: - af:a6:e4:55:f6:13:b3:ee:5c:70:b8:31:5d:14:b9:6c:22:a3: - a2:cf:76:20:0b:cf:37:c7:65:5f:93:a9:91:cb:90:89:0e:9e: - e8:29:62:4d + a4:55:b4:2e:7a:ab:a8:51:ce:14:7a:de:8f:6b:15:ae:ce:a1: + 6f:ea:00:d8:9d:2f:55:55:42:a9:9c:f5:88:56:eb:b6:fa:be: + 59:42:98:c7:c9:52:5c:52:1a:eb:a8:f7:29:48:fa:c9:66:41: + 2b:77:24:9d:0b:d9:cf:c4:77:42:a1:44:58:64:a3:13:13:4f: + 2f:c0:9b:e6:20:f5:35:bd:6d:d7:50:55:2d:30:e9:22:09:e1: + 03:b9:8f:5f:77:66:14:d4:d7:26:3a:dc:bf:65:07:1e:8b:ee: + ca:d5:2a:3d:57:b9:8a:0f:df:27:9a:3e:d6:15:5f:ff:28:b1: + af:c6:35:1a:ba:b5:6c:ae:9e:3d:1e:38:2a:77:d7:d2:19:db: + a6:4d:5f:28:7e:19:80:d5:71:e5:11:0a:1e:db:46:f5:db:29: + 4f:bb:d3:4d:3c:f2:6b:84:b1:87:6a:b5:56:b7:b0:76:61:a1: + 2c:25:6d:6e:79:28:8a:40:fc:18:d9:a7:9c:4c:94:c5:28:75: + e9:2f:0d:12:35:d8:17:07:a4:aa:51:fe:b3:a0:57:e8:04:b2: + 89:c0:c2:c3:85:4c:da:26:0a:f6:53:1a:be:f0:88:f1:a6:ff: + d7:85:1f:3d:02:ae:33:7b:b8:10:16:ce:4a:92:de:d5:e5:ef: + 0c:72:47:3e -----BEGIN CERTIFICATE----- MIIEOTCCAyGgAwIBAgIBBTANBgkqhkiG9w0BAQsFADAMMQowCAYDVQQDDAFJMB4X -DTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzbZEDlwczwOJBBnJwOUN -hrxE4VQxMyQqn1CeaKXSFxvhlhsxQOIFT4vDDEHQZoqLA6ZKZED0i/mh9IQY/JNs -fIA34qb2k7udFGNjuGawcbksnfRNVUHjBK0f/1YTpXqX/RLsIdSZhXfsvdETEi/j -rB80Dv/PAAWwwkDgprpIGqQLN3rl6ta/FeIh82sjyRYmRMnMYUx31OJdBA4r9ThJ -FBFL0pFF07nNO9/3mf08rs7ydueAsH2xzZ8pZ4phx64cFftGdtgcDvyCKYXaTa4k -HGM2u+BDGnN/rOWBpQyquzKWQUj0TS32osef0JRyKQXufWkfSup/qHfUdcZmZy71 -0QIDAQABo4IBnzCCAZswHQYDVR0OBBYEFHj5dfmA448Uk+eN3N/VcoEZiINvMB8G -A1UdIwQYMBaAFKRm4kb3P6FznaLiTimZ2y42Nmy1MIH+BggrBgEFBQcBAQSB8TCB +DTE1MDEwMTEyMDAwMFoXDTIxMDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAslLulJCoGjK7T2QXpjGr +CAmR7+ytCun7W/pqH+ZoL1OLBHQydZ28/bPJorpqDZRvAuXGBhpcKtKVJW5ThojT +HBHbuLialJqJZcbFai6zTweAQNEhKUxShOm0py3zIWYjJKez3pWjeU8mMWy52nbW +7NR+0US3Y9OLdf8EoOKWV1qFKDsP8xIMFbl/OWqaC5XuvNkJAD6zBLV+2K9CbsXP +D9KbcaoUtsuwm9ZfLJckxD8n5qdHWlS/hGjqT+HwGjt6G4XT6Y5ftRiTNlTxFehv +Usm3XZCd1S/7SYy4Uk40v0b0j+52G8qdVk31lgfDdmBmO4zn7/wpUW0P8Pn720Tj +9QIDAQABo4IBnzCCAZswHQYDVR0OBBYEFNnRbkLVJ/OXy/0VN1TnyaTq8fvZMB8G +A1UdIwQYMBaAFECRKCGdk/OcGBv/AJyyCKCjgX0qMIH+BggrBgEFBQcBAQSB8TCB 7jAkBggrBgEFBQcwAoYYaHR0cDovL3VybC1mb3ItYWlhL0kuY2VyMCYGCCsGAQUF BzAChhpodHRwOi8vdXJsLWZvci1haWEyL0kyLmZvbzAmBggrBgEFBQcwAoYaaHR0 cDovL3VybC1mb3ItYWlhMy9JMy5mb28wJgYIKwYBBQUHMAKGGmh0dHA6Ly91cmwt @@ -88,10 +88,10 @@ L0k1LmZvbzAmBggrBgEFBQcwAoYaaHR0cDovL3VybC1mb3ItYWlhNi9JNi5mb28w KQYDVR0fBCIwIDAeoBygGoYYaHR0cDovL3VybC1mb3ItY3JsL0kuY3JsMA4GA1Ud DwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZI -hvcNAQELBQADggEBACrzBHpbr0mlUfUpIR1nkIUOUB4XQTpHQYrbabtIQoGd1Zhx -jwW31Bj32x95mOUEZxlHVfmSQsxBMsGbvK4qBI+/WquT5bvgk+h0YA/qzBJc+iZn -FwONdDbphaXpFDxgFJcMdg7XaepNqSC0eufJMBk1E//IDLgbMBlgYnbNIWfEZb1+ -mnnQO44V/STvW4lJZSVer/nVA4em2m3dznVFezxfWP06yyKoAlstgz584me8X+RM -VPTh8DvYBFEuO5V1wtqx5UTNDYpT8CtsHyZ7HQ7Pzv1ruCqwh6+m5FX2E7PuXHC4 -MV0UuWwio6LPdiALzzfHZV+TqZHLkIkOnugpYk0= +hvcNAQELBQADggEBAKRVtC56q6hRzhR63o9rFa7OoW/qANidL1VVQqmc9YhW67b6 +vllCmMfJUlxSGuuo9ylI+slmQSt3JJ0L2c/Ed0KhRFhkoxMTTy/Am+Yg9TW9bddQ +VS0w6SIJ4QO5j193ZhTU1yY63L9lBx6L7srVKj1XuYoP3yeaPtYVX/8osa/GNRq6 +tWyunj0eOCp319IZ26ZNXyh+GYDVceURCh7bRvXbKU+700088muEsYdqtVa3sHZh +oSwlbW55KIpA/BjZp5xMlMUodekvDRI12BcHpKpR/rOgV+gEsonAwsOFTNomCvZT +Gr7wiPGm/9eFHz0CrjN7uBAWzkqS3tXl7wxyRz4= -----END CERTIFICATE-----
diff --git a/net/data/cert_issuer_source_aia_unittest/target_three_aia.pem b/net/data/cert_issuer_source_aia_unittest/target_three_aia.pem index cf0b1e19..18699cf 100644 --- a/net/data/cert_issuer_source_aia_unittest/target_three_aia.pem +++ b/net/data/cert_issuer_source_aia_unittest/target_three_aia.pem
@@ -6,36 +6,36 @@ Issuer: CN=I Validity Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT + Not After : Jan 1 12:00:00 2021 GMT Subject: CN=target Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:c5:05:c8:6a:51:45:70:b5:38:56:09:b1:35:3e: - e6:14:d4:93:13:d1:4e:05:1d:e1:49:e6:5e:0d:7b: - b1:02:96:31:a0:1c:73:5a:d9:4b:2c:ea:5d:23:71: - 43:cf:88:5e:92:e1:35:b2:5b:4d:89:b2:b5:e4:bd: - ac:37:cd:f8:42:7b:53:43:9a:ab:05:82:6c:67:8d: - 40:2c:15:b8:67:3d:f7:fa:d4:75:40:d1:31:58:e2: - e8:48:f6:13:f1:c9:d1:8f:8d:78:33:00:f1:89:a9: - 35:8e:22:f9:ff:b3:a4:83:92:59:75:e3:43:90:d9: - 83:b3:a8:ce:64:04:0e:a1:1d:5c:a4:b2:c0:19:d4: - 03:c9:bc:39:ad:33:9c:26:e2:ca:bf:44:85:34:20: - 92:a8:34:60:4e:a3:ec:11:c2:5f:e4:aa:19:6c:fe: - 40:c0:ad:cd:41:69:c4:93:94:d6:4b:e5:cf:98:0c: - 68:f1:94:25:ec:8f:c7:62:7f:8b:9d:14:13:18:51: - 10:63:a9:bc:b8:71:24:44:86:27:01:d6:3d:84:ae: - 7d:da:50:db:9c:64:bf:5e:ff:35:3e:ee:90:2f:72: - 44:ac:86:f2:4a:78:16:00:43:06:10:bd:4f:83:ca: - e0:9a:07:52:b3:2c:df:eb:4b:f3:e7:72:80:21:ad: - 12:33 + 00:ce:0f:06:90:e0:8b:9f:3b:85:b8:f4:fc:73:6c: + 5c:8a:8d:b9:1d:cf:03:37:36:ec:c6:da:e6:c3:7b: + ff:59:8b:3b:c7:ef:9d:e4:6f:52:08:c9:89:cb:f6: + a1:98:70:c5:72:a0:49:a8:92:7b:a4:fe:7f:4e:e7: + 04:dd:14:5c:64:ed:bd:6e:e0:6b:8a:dd:ff:ac:37: + ba:6d:24:44:0b:0a:51:34:ae:51:a2:3c:50:90:e5: + 8e:26:22:f0:93:c0:ae:65:de:a4:cb:58:50:4c:01: + ee:eb:64:d0:31:5c:7c:3a:d5:74:d5:59:b7:5d:bb: + 7a:bf:93:46:a8:fd:66:ad:81:5d:af:69:2c:f3:42: + d4:7b:76:9c:12:8b:90:c8:52:38:d8:d5:74:b7:65: + c2:ae:cf:d4:78:78:19:e6:ce:2c:dc:2b:c5:2f:96: + a4:72:18:21:86:2e:77:65:10:a8:47:8b:e0:2a:01: + e4:d2:62:df:61:71:06:04:e3:1e:76:3f:55:a1:79: + d6:11:ed:24:79:3b:f3:13:08:99:d8:88:4f:25:39: + d9:1b:d1:2a:e7:93:a4:ba:01:eb:f1:fc:a4:c8:c3: + 8b:d9:91:2d:64:48:5c:9a:1e:d1:35:f9:a0:67:7d: + 21:8a:1a:a0:58:75:a4:31:17:73:1a:c0:e3:1c:a5: + b3:19 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - EC:26:51:40:B1:40:90:32:30:DB:5E:7C:A4:52:EE:B7:87:82:B3:0A + 1B:54:9F:9B:A8:BB:5F:37:19:D9:66:AE:B3:0A:65:58:04:81:29:8D X509v3 Authority Key Identifier: - keyid:A4:66:E2:46:F7:3F:A1:73:9D:A2:E2:4E:29:99:DB:2E:36:36:6C:B5 + keyid:40:91:28:21:9D:93:F3:9C:18:1B:FF:00:9C:B2:08:A0:A3:81:7D:2A Authority Information Access: CA Issuers - URI:http://url-for-aia/I.cer @@ -52,41 +52,41 @@ X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 29:19:26:6f:9b:96:e4:3d:38:b7:89:84:79:9e:73:09:0c:fe: - f8:4a:8d:13:84:15:ae:0f:56:4a:42:fb:17:81:8b:34:52:c3: - 51:93:96:04:75:9b:35:54:e1:05:31:c4:9d:28:0f:20:d5:7c: - 18:86:6e:02:4f:d8:58:2a:02:7e:d0:72:39:16:03:24:77:34: - 58:98:2e:f8:9a:ef:97:a3:11:b1:06:94:ec:1f:bb:3f:00:10: - 0b:24:d1:10:d6:c1:87:bf:f1:1e:fa:e0:99:e7:d9:22:d3:e9: - 80:7c:98:be:2c:af:b4:d9:c6:a7:52:35:fb:a4:a8:34:1d:e9: - 00:c7:f5:79:14:06:17:40:dd:15:62:04:0f:87:84:98:72:ed: - 47:da:6b:0c:d3:09:51:c3:d1:ae:df:96:8c:b7:68:e7:81:b9: - d1:a6:e0:3c:b7:93:f4:39:d5:c1:d7:78:3a:06:95:5c:e5:a5: - 13:bf:27:ca:7c:3c:69:b6:f8:3b:a1:40:3e:2f:d5:28:e3:c1: - f8:ed:76:19:2a:93:e4:2b:a4:09:8a:9c:9a:ad:c6:36:23:fb: - 6d:70:02:fc:77:a9:4d:0e:c0:e9:61:f7:06:73:9e:42:4a:92: - b3:4e:47:c2:fe:fe:1d:46:81:d4:85:a8:e4:52:6a:92:28:18: - c7:8c:69:8e + 01:98:3b:ee:4c:4e:91:e7:97:bf:1d:18:2b:bd:f4:a5:ba:75: + fd:f1:9f:73:0e:25:dc:4d:7b:e8:69:0a:22:55:4f:96:30:64: + e5:05:73:ef:ef:ef:5a:50:48:50:a8:e5:e5:c6:a3:3b:0e:e8: + 48:b7:6f:0d:d4:ae:5e:2a:15:e5:86:45:02:83:f8:1a:b0:2d: + 0f:19:df:ed:dd:5d:fb:e4:31:b7:18:5e:de:8a:62:cd:53:77: + b0:cf:1c:a0:9a:fc:20:94:6f:37:2a:3b:af:36:65:e1:98:c4: + e1:f6:b4:fc:d7:08:c5:6d:90:ba:67:2c:06:ff:1c:62:af:99: + f2:f6:40:41:30:6c:4a:66:fb:ae:5f:2b:0e:33:f4:9a:34:62: + 4d:ca:a1:b9:da:f9:14:7a:ff:87:c7:89:d5:c0:da:1d:6d:5e: + 7f:81:84:77:53:cb:24:d9:dc:25:51:51:7a:85:c3:9c:22:9f: + b9:4f:17:cf:80:b7:21:7c:6d:6d:15:dd:11:23:66:f7:58:77: + 32:c3:88:2b:6c:e3:db:d7:c8:cb:a8:52:02:f6:85:3f:00:22: + 5e:33:3f:d6:5b:fc:7d:41:3c:de:0d:6e:c4:83:a8:32:e5:29: + 40:d7:c4:0f:50:22:9f:5b:55:d8:4f:0c:93:08:cb:c5:b7:fc: + b0:f1:24:14 -----BEGIN CERTIFICATE----- MIIDvzCCAqegAwIBAgIBBDANBgkqhkiG9w0BAQsFADAMMQowCAYDVQQDDAFJMB4X -DTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxQXIalFFcLU4VgmxNT7m -FNSTE9FOBR3hSeZeDXuxApYxoBxzWtlLLOpdI3FDz4hekuE1sltNibK15L2sN834 -QntTQ5qrBYJsZ41ALBW4Zz33+tR1QNExWOLoSPYT8cnRj414MwDxiak1jiL5/7Ok -g5JZdeNDkNmDs6jOZAQOoR1cpLLAGdQDybw5rTOcJuLKv0SFNCCSqDRgTqPsEcJf -5KoZbP5AwK3NQWnEk5TWS+XPmAxo8ZQl7I/HYn+LnRQTGFEQY6m8uHEkRIYnAdY9 -hK592lDbnGS/Xv81Pu6QL3JErIbySngWAEMGEL1Pg8rgmgdSsyzf60vz53KAIa0S -MwIDAQABo4IBJTCCASEwHQYDVR0OBBYEFOwmUUCxQJAyMNtefKRS7reHgrMKMB8G -A1UdIwQYMBaAFKRm4kb3P6FznaLiTimZ2y42Nmy1MIGEBggrBgEFBQcBAQR4MHYw +DTE1MDEwMTEyMDAwMFoXDTIxMDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzg8GkOCLnzuFuPT8c2xc +io25Hc8DNzbsxtrmw3v/WYs7x++d5G9SCMmJy/ahmHDFcqBJqJJ7pP5/TucE3RRc +ZO29buBrit3/rDe6bSRECwpRNK5RojxQkOWOJiLwk8CuZd6ky1hQTAHu62TQMVx8 +OtV01Vm3Xbt6v5NGqP1mrYFdr2ks80LUe3acEouQyFI42NV0t2XCrs/UeHgZ5s4s +3CvFL5akchghhi53ZRCoR4vgKgHk0mLfYXEGBOMedj9VoXnWEe0keTvzEwiZ2IhP +JTnZG9Eq55OkugHr8fykyMOL2ZEtZEhcmh7RNfmgZ30hihqgWHWkMRdzGsDjHKWz +GQIDAQABo4IBJTCCASEwHQYDVR0OBBYEFBtUn5uou183GdlmrrMKZVgEgSmNMB8G +A1UdIwQYMBaAFECRKCGdk/OcGBv/AJyyCKCjgX0qMIGEBggrBgEFBQcBAQR4MHYw JAYIKwYBBQUHMAKGGGh0dHA6Ly91cmwtZm9yLWFpYS9JLmNlcjAmBggrBgEFBQcw AoYaaHR0cDovL3VybC1mb3ItYWlhMi9JMi5mb28wJgYIKwYBBQUHMAKGGmh0dHA6 Ly91cmwtZm9yLWFpYTMvSTMuZm9vMCkGA1UdHwQiMCAwHqAcoBqGGGh0dHA6Ly91 cmwtZm9yLWNybC9JLmNybDAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYB -BQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4IBAQApGSZvm5bkPTi3iYR5 -nnMJDP74So0ThBWuD1ZKQvsXgYs0UsNRk5YEdZs1VOEFMcSdKA8g1XwYhm4CT9hY -KgJ+0HI5FgMkdzRYmC74mu+XoxGxBpTsH7s/ABALJNEQ1sGHv/Ee+uCZ59ki0+mA -fJi+LK+02canUjX7pKg0HekAx/V5FAYXQN0VYgQPh4SYcu1H2msM0wlRw9Gu35aM -t2jngbnRpuA8t5P0OdXB13g6BpVc5aUTvyfKfDxptvg7oUA+L9Uo48H47XYZKpPk -K6QJipyarcY2I/ttcAL8d6lNDsDpYfcGc55CSpKzTkfC/v4dRoHUhajkUmqSKBjH -jGmO +BQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4IBAQABmDvuTE6R55e/HRgr +vfSlunX98Z9zDiXcTXvoaQoiVU+WMGTlBXPv7+9aUEhQqOXlxqM7DuhIt28N1K5e +KhXlhkUCg/gasC0PGd/t3V375DG3GF7eimLNU3ewzxygmvwglG83KjuvNmXhmMTh +9rT81wjFbZC6ZywG/xxir5ny9kBBMGxKZvuuXysOM/SaNGJNyqG52vkUev+Hx4nV +wNodbV5/gYR3U8sk2dwlUVF6hcOcIp+5TxfPgLchfG1tFd0RI2b3WHcyw4grbOPb +18jLqFIC9oU/ACJeMz/WW/x9QTzeDW7Eg6gy5SlA18QPUCKfW1XYTwyTCMvFt/yw +8SQU -----END CERTIFICATE-----
diff --git a/net/data/cert_issuer_source_aia_unittest/target_two_aia.pem b/net/data/cert_issuer_source_aia_unittest/target_two_aia.pem index d3c54787..f7de319 100644 --- a/net/data/cert_issuer_source_aia_unittest/target_two_aia.pem +++ b/net/data/cert_issuer_source_aia_unittest/target_two_aia.pem
@@ -6,36 +6,36 @@ Issuer: CN=I Validity Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT + Not After : Jan 1 12:00:00 2021 GMT Subject: CN=target Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:c7:7e:c5:20:13:8f:2f:6f:f4:b8:ab:93:2c:8c: - f5:1f:fe:91:44:a1:81:db:81:f4:12:5c:24:60:f3: - 7a:b2:67:a3:7e:9a:31:52:ee:7d:40:1a:3f:e5:88: - 12:33:55:ec:c9:6e:ac:78:01:95:d2:8b:bb:e3:8f: - 37:4a:3e:0c:3f:7f:ae:27:d5:26:7d:65:03:c3:2b: - fe:73:58:67:88:ca:53:e8:cd:2d:41:32:6d:f9:06: - 4a:5c:7c:02:1f:43:1a:5a:80:48:68:ea:46:fa:b5: - b7:cd:cb:46:9a:b9:d7:fe:1c:ba:34:c3:cc:d9:fa: - 29:73:81:84:33:ff:bd:25:54:4c:bc:21:76:0b:a7: - 02:00:8f:b0:23:b1:54:07:da:f6:10:01:3f:8d:5a: - 3e:fb:f5:e6:73:c0:87:c5:f8:3a:e0:d6:69:9b:d4: - 3b:31:29:cb:44:d7:44:db:7f:d2:62:08:b5:91:dd: - d9:1f:f4:7c:23:11:8e:1d:4e:5e:02:b9:7d:6f:f6: - b0:25:b6:a7:5b:3d:26:68:63:ee:71:b9:26:06:cf: - 26:34:84:5d:05:80:33:2d:c9:d7:15:eb:18:8a:7a: - de:60:57:05:2b:c6:fe:92:41:ec:d5:3d:e5:73:3a: - 02:fb:68:8c:47:81:04:68:ff:f5:a4:ac:6c:0d:4b: - 34:59 + 00:ab:cb:9a:c2:db:b8:1c:3d:1a:b7:37:e8:97:9c: + 51:f4:8a:61:67:1d:37:8a:88:fe:8a:65:24:54:51: + 18:be:9c:13:83:0c:91:0b:52:32:c6:6d:4c:8a:48: + 10:06:83:da:81:db:10:2a:77:81:16:d0:85:cd:04: + ce:06:56:3d:53:29:e3:11:6d:25:d9:bd:81:df:50: + bb:42:0c:c4:6a:3b:6c:5c:e5:47:54:25:8b:21:cb: + 22:00:8e:31:75:c0:21:29:89:e7:76:5a:2c:97:56: + 87:29:ab:35:16:23:41:0d:25:d0:62:7d:91:0e:02: + 9c:9a:7b:a3:fa:b6:d9:16:75:36:ea:62:cc:61:ab: + ae:15:9d:71:ff:5a:90:af:b4:a0:b2:d2:99:3b:2d: + 92:45:64:44:fd:07:d8:86:c7:47:bf:d4:b5:35:07: + 46:a7:93:4f:e9:2b:71:9e:a4:76:78:42:b7:17:1e: + 2b:0e:b1:f2:f5:1a:99:d5:ce:d2:9d:f6:99:0a:20: + 03:19:4e:f9:e0:45:68:75:e6:08:63:95:f5:34:21: + 78:d6:68:06:b4:c8:cb:e3:77:6c:61:ef:c3:12:e8: + 71:87:e2:99:2e:5a:2f:b8:d9:d8:51:aa:af:20:47: + c8:cd:eb:73:11:8e:a2:4b:fa:4e:8c:3c:d2:5e:1d: + 17:5f Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - BF:E5:92:1F:97:33:C4:D7:72:C3:BC:27:2E:AE:D9:A2:62:ED:4F:A4 + E8:D5:6F:99:50:16:68:CA:BF:06:34:2A:8B:0A:E2:25:88:40:CF:15 X509v3 Authority Key Identifier: - keyid:A4:66:E2:46:F7:3F:A1:73:9D:A2:E2:4E:29:99:DB:2E:36:36:6C:B5 + keyid:40:91:28:21:9D:93:F3:9C:18:1B:FF:00:9C:B2:08:A0:A3:81:7D:2A Authority Information Access: CA Issuers - URI:http://url-for-aia/I.cer @@ -51,40 +51,40 @@ X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 83:06:60:e4:a1:2b:c6:df:4f:7a:02:d1:b4:7d:79:c7:23:73: - d8:4f:35:f4:ca:18:67:13:d5:93:47:c6:8e:9f:4c:2a:5b:ea: - 53:db:8b:a2:64:96:3c:4c:3f:e1:e1:1b:1e:c1:14:26:6f:95: - 68:07:28:c9:92:c6:ea:24:a8:ea:c2:85:4b:be:a5:6c:52:86: - 43:47:b8:bf:a6:7b:c6:58:00:0e:eb:a7:73:3d:4b:e4:ac:2a: - 94:d0:5b:68:26:19:90:ad:59:78:34:27:84:d2:11:5c:67:02: - ba:90:bf:91:3f:99:84:c9:af:98:1b:9b:73:70:16:55:8c:d7: - 5f:11:8e:49:ce:14:82:20:17:ca:b3:ed:21:a1:a6:d4:dc:3d: - 14:67:d2:05:a2:59:81:73:42:e8:24:82:b3:97:f6:82:43:b5: - db:e0:a3:22:eb:bd:f9:e3:d0:de:2a:92:dc:4a:4b:b0:02:c1: - 3c:30:de:0a:fa:17:20:f5:9a:76:c8:c7:b7:b0:3b:52:05:d2: - 91:b2:39:18:74:9d:4b:77:d3:29:2d:ce:e3:c4:ba:c5:25:8d: - 22:17:b0:cc:42:0d:50:b0:2b:fc:99:b7:cb:d6:8a:4b:1e:a7: - 3b:3e:0c:c1:a4:b6:2e:da:10:0b:98:b7:f8:4b:5f:65:ca:44: - d7:7b:19:08 + 64:0c:e5:4b:4a:6f:ec:3f:49:37:89:ce:54:6b:72:8a:a9:f1: + db:1a:c3:d7:84:9f:d5:29:73:12:ba:a3:03:99:5d:45:b5:62: + f6:7e:83:74:f9:ff:d8:49:15:76:7d:65:eb:ad:11:bd:b2:b5: + 77:15:d3:c2:5f:ad:ca:c2:24:e4:92:8b:5d:10:65:07:6e:99: + 4e:e5:16:f0:8a:62:ba:91:50:bd:a2:1b:12:c9:d8:a1:c0:49: + a1:3a:5d:3c:75:87:4e:07:0d:ce:6f:27:90:94:3d:10:cd:aa: + b0:6d:37:ac:97:3a:af:45:f3:86:94:b3:d8:ae:d4:49:27:d6: + e2:7e:d7:e1:54:1f:e8:85:86:cd:02:d1:83:ae:c4:2a:63:6b: + 33:87:ad:70:3b:81:87:a8:2c:30:d1:28:04:cc:a3:5c:75:d0: + 08:86:67:99:10:5f:be:94:5d:4f:ed:d7:2e:eb:bf:85:61:a1: + 58:be:8a:61:08:a8:43:38:32:b7:33:09:09:03:61:4d:4d:55: + dc:e2:1b:f4:be:3d:d0:76:b0:00:df:72:48:57:f9:1c:3e:bd: + 83:7a:47:fd:09:53:16:f7:00:32:8f:94:16:0a:ef:19:26:4d: + b0:b8:6c:02:f8:51:5e:27:6a:c5:1e:62:c2:5b:5e:c2:a1:d4: + 82:56:90:fe -----BEGIN CERTIFICATE----- MIIDlDCCAnygAwIBAgIBAzANBgkqhkiG9w0BAQsFADAMMQowCAYDVQQDDAFJMB4X -DTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx37FIBOPL2/0uKuTLIz1 -H/6RRKGB24H0ElwkYPN6smejfpoxUu59QBo/5YgSM1XsyW6seAGV0ou74483Sj4M -P3+uJ9UmfWUDwyv+c1hniMpT6M0tQTJt+QZKXHwCH0MaWoBIaOpG+rW3zctGmrnX -/hy6NMPM2fopc4GEM/+9JVRMvCF2C6cCAI+wI7FUB9r2EAE/jVo++/Xmc8CHxfg6 -4NZpm9Q7MSnLRNdE23/SYgi1kd3ZH/R8IxGOHU5eArl9b/awJbanWz0maGPucbkm -Bs8mNIRdBYAzLcnXFesYinreYFcFK8b+kkHs1T3lczoC+2iMR4EEaP/1pKxsDUs0 -WQIDAQABo4H7MIH4MB0GA1UdDgQWBBS/5ZIflzPE13LDvCcurtmiYu1PpDAfBgNV -HSMEGDAWgBSkZuJG9z+hc52i4k4pmdsuNjZstTBcBggrBgEFBQcBAQRQME4wJAYI +DTE1MDEwMTEyMDAwMFoXDTIxMDEwMTEyMDAwMFowETEPMA0GA1UEAwwGdGFyZ2V0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq8uawtu4HD0atzfol5xR +9IphZx03ioj+imUkVFEYvpwTgwyRC1Iyxm1MikgQBoPagdsQKneBFtCFzQTOBlY9 +UynjEW0l2b2B31C7QgzEajtsXOVHVCWLIcsiAI4xdcAhKYnndlosl1aHKas1FiNB +DSXQYn2RDgKcmnuj+rbZFnU26mLMYauuFZ1x/1qQr7SgstKZOy2SRWRE/QfYhsdH +v9S1NQdGp5NP6StxnqR2eEK3Fx4rDrHy9RqZ1c7SnfaZCiADGU754EVodeYIY5X1 +NCF41mgGtMjL43dsYe/DEuhxh+KZLlovuNnYUaqvIEfIzetzEY6iS/pOjDzSXh0X +XwIDAQABo4H7MIH4MB0GA1UdDgQWBBTo1W+ZUBZoyr8GNCqLCuIliEDPFTAfBgNV +HSMEGDAWgBRAkSghnZPznBgb/wCcsgigo4F9KjBcBggrBgEFBQcBAQRQME4wJAYI KwYBBQUHMAKGGGh0dHA6Ly91cmwtZm9yLWFpYS9JLmNlcjAmBggrBgEFBQcwAoYa aHR0cDovL3VybC1mb3ItYWlhMi9JMi5mb28wKQYDVR0fBCIwIDAeoBygGoYYaHR0 cDovL3VybC1mb3ItY3JsL0kuY3JsMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAU -BggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAIMGYOShK8bf -T3oC0bR9eccjc9hPNfTKGGcT1ZNHxo6fTCpb6lPbi6JkljxMP+HhGx7BFCZvlWgH -KMmSxuokqOrChUu+pWxShkNHuL+me8ZYAA7rp3M9S+SsKpTQW2gmGZCtWXg0J4TS -EVxnArqQv5E/mYTJr5gbm3NwFlWM118RjknOFIIgF8qz7SGhptTcPRRn0gWiWYFz -QugkgrOX9oJDtdvgoyLrvfnj0N4qktxKS7ACwTww3gr6FyD1mnbIx7ewO1IF0pGy -ORh0nUt30yktzuPEusUljSIXsMxCDVCwK/yZt8vWiksepzs+DMGkti7aEAuYt/hL -X2XKRNd7GQg= +BggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGQM5UtKb+w/ +STeJzlRrcoqp8dsaw9eEn9UpcxK6owOZXUW1YvZ+g3T5/9hJFXZ9ZeutEb2ytXcV +08JfrcrCJOSSi10QZQdumU7lFvCKYrqRUL2iGxLJ2KHASaE6XTx1h04HDc5vJ5CU +PRDNqrBtN6yXOq9F84aUs9iu1Ekn1uJ+1+FUH+iFhs0C0YOuxCpjazOHrXA7gYeo +LDDRKATMo1x10AiGZ5kQX76UXU/t1y7rv4VhoVi+imEIqEM4MrczCQkDYU1NVdzi +G/S+PdB2sADfckhX+Rw+vYN6R/0JUxb3ADKPlBYK7xkmTbC4bAL4UV4nasUeYsJb +XsKh1IJWkP4= -----END CERTIFICATE-----
diff --git a/net/data/verify_certificate_chain_unittest/common.py b/net/data/verify_certificate_chain_unittest/common.py index c5bcd972..14ee909 100755 --- a/net/data/verify_certificate_chain_unittest/common.py +++ b/net/data/verify_certificate_chain_unittest/common.py
@@ -36,6 +36,9 @@ # January 1st, 2016 12:00 UTC JANUARY_1_2016_UTC = '160101120000Z' +# January 1st, 2021 12:00 UTC +JANUARY_1_2021_UTC = '210101120000Z' + # The default time tests should use when verifying. DEFAULT_TIME = MARCH_2_2015_UTC @@ -52,6 +55,19 @@ g_out_dir = None g_out_pem = None +# The default validity range of generated certificates. Can be modified with +# set_default_validity_range(). +g_default_start_date = JANUARY_1_2015_UTC +g_default_end_date = JANUARY_1_2016_UTC + + +def set_default_validity_range(start_date, end_date): + """Sets the validity range that will be used for certificates created with + Certificate""" + global g_default_start_date + global g_default_end_date + g_default_start_date = start_date + g_default_end_date = end_date def get_unique_path_id(name): """Returns a base filename that contains 'name', but is unique to the output @@ -156,7 +172,7 @@ # By default OpenSSL will use the current time for the start time. Instead # default to using a fixed timestamp for more predictable results each time # the certificates are re-generated. - self.set_validity_range(JANUARY_1_2015_UTC, JANUARY_1_2016_UTC) + self.set_validity_range(g_default_start_date, g_default_end_date) # Use SHA-256 when THIS certificate is signed (setting it in the # configuration would instead set the hash to use when signing other
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc index 5e48262..ffa7b261 100644 --- a/net/http/http_network_session.cc +++ b/net/http/http_network_session.cc
@@ -155,6 +155,7 @@ quic_race_cert_verification(false), quic_do_not_fragment(false), quic_do_not_mark_as_broken_on_network_change(false), + quic_estimate_initial_rtt(false), proxy_delegate(nullptr), enable_token_binding(false), http_09_on_non_default_ports_enabled(false), @@ -217,6 +218,7 @@ params.quic_force_hol_blocking, params.quic_race_cert_verification, params.quic_do_not_fragment, + params.quic_estimate_initial_rtt, params.quic_connection_options, params.enable_token_binding), spdy_session_pool_(params.host_resolver,
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h index f3482686..6f4e509 100644 --- a/net/http/http_network_session.h +++ b/net/http/http_network_session.h
@@ -198,6 +198,8 @@ // If true, alternative service is not marked as broken if the alternative // job fails due to a network change event. bool quic_do_not_mark_as_broken_on_network_change; + // If true, estimate the initial RTT for QUIC connections based on network. + bool quic_estimate_initial_rtt; ProxyDelegate* proxy_delegate; // Enable support for Token Binding.
diff --git a/net/http2/decoder/frame_parts.cc b/net/http2/decoder/frame_parts.cc index 5d321889..2731516 100644 --- a/net/http2/decoder/frame_parts.cc +++ b/net/http2/decoder/frame_parts.cc
@@ -55,7 +55,7 @@ FrameParts::FrameParts(const Http2FrameHeader& header, StringPiece payload) : FrameParts(header) { VLOG(1) << "FrameParts with payload.size() = " << payload.size(); - payload.AppendToString(&this->payload); + this->payload.append(payload.data(), payload.size()); opt_payload_length = payload.size(); } FrameParts::FrameParts(const Http2FrameHeader& header, @@ -118,8 +118,8 @@ } void FrameParts::SetAltSvcExpected(StringPiece origin, StringPiece value) { - origin.AppendToString(&altsvc_origin); - value.AppendToString(&altsvc_value); + altsvc_origin.append(origin.data(), origin.size()); + altsvc_value.append(value.data(), value.size()); opt_altsvc_origin_length = origin.size(); opt_altsvc_value_length = value.size(); } @@ -507,7 +507,7 @@ AssertionResult FrameParts::AppendString(StringPiece source, string* target, base::Optional<size_t>* opt_length) { - source.AppendToString(target); + target->append(source.data(), source.size()); if (opt_length != nullptr) { VERIFY_TRUE(*opt_length) << "Length is not set yet\n" << *this; VERIFY_LE(target->size(), static_cast<size_t>(opt_length->value()))
diff --git a/net/http2/decoder/http2_frame_decoder_test.cc b/net/http2/decoder/http2_frame_decoder_test.cc index 0d1d278..cb7017d 100644 --- a/net/http2/decoder/http2_frame_decoder_test.cc +++ b/net/http2/decoder/http2_frame_decoder_test.cc
@@ -153,8 +153,7 @@ // Repeat with more input; it should stop without reading that input. string next_frame = Random().RandString(10); - string input; - payload.AppendToString(&input); + string input(payload.data(), payload.size()); input += next_frame; ResetDecodeSpeedCounters();
diff --git a/net/http2/hpack/tools/hpack_block_builder.cc b/net/http2/hpack/tools/hpack_block_builder.cc index 49eba0d..0c8929e 100644 --- a/net/http2/hpack/tools/hpack_block_builder.cc +++ b/net/http2/hpack/tools/hpack_block_builder.cc
@@ -77,7 +77,7 @@ uint8_t high_bits = is_huffman_encoded ? 0x80 : 0; uint8_t prefix_length = 7; AppendHighBitsAndVarint(high_bits, prefix_length, str.size()); - str.AppendToString(&buffer_); + buffer_.append(str.data(), str.size()); } } // namespace test
diff --git a/net/http2/hpack/tools/hpack_block_builder.h b/net/http2/hpack/tools/hpack_block_builder.h index 06502b2a..f594a30 100644 --- a/net/http2/hpack/tools/hpack_block_builder.h +++ b/net/http2/hpack/tools/hpack_block_builder.h
@@ -27,9 +27,8 @@ class HpackBlockBuilder { public: - explicit HpackBlockBuilder(base::StringPiece initial_contents) { - initial_contents.AppendToString(&buffer_); - } + explicit HpackBlockBuilder(base::StringPiece initial_contents) + : buffer_(initial_contents.data(), initial_contents.size()) {} HpackBlockBuilder() {} ~HpackBlockBuilder() {}
diff --git a/net/http2/http2_constants.cc b/net/http2/http2_constants.cc index ca28f15e..82cdf03 100644 --- a/net/http2/http2_constants.cc +++ b/net/http2/http2_constants.cc
@@ -57,7 +57,7 @@ if (!s.empty()) { s.push_back('|'); } - v.AppendToString(&s); + s.append(v.data(), v.size()); flags ^= bit; }; if (flags & 0x01) {
diff --git a/net/quic/chromium/mock_network_change_notifier.cc b/net/quic/chromium/mock_network_change_notifier.cc index e72ba25..86326e210 100644 --- a/net/quic/chromium/mock_network_change_notifier.cc +++ b/net/quic/chromium/mock_network_change_notifier.cc
@@ -10,12 +10,13 @@ namespace test { MockNetworkChangeNotifier::MockNetworkChangeNotifier() - : force_network_handles_supported_(false) {} + : force_network_handles_supported_(false), + connection_type_(CONNECTION_UNKNOWN) {} MockNetworkChangeNotifier::~MockNetworkChangeNotifier() {} MockNetworkChangeNotifier::ConnectionType MockNetworkChangeNotifier::GetCurrentConnectionType() const { - return CONNECTION_UNKNOWN; + return connection_type_; } void MockNetworkChangeNotifier::ForceNetworkHandlesSupported() {
diff --git a/net/quic/chromium/mock_network_change_notifier.h b/net/quic/chromium/mock_network_change_notifier.h index d81b4efa..7a4511c92 100644 --- a/net/quic/chromium/mock_network_change_notifier.h +++ b/net/quic/chromium/mock_network_change_notifier.h
@@ -21,6 +21,10 @@ bool AreNetworkHandlesCurrentlySupported() const override; + void SetConnectionType(ConnectionType connection_type) { + connection_type_ = connection_type; + } + void SetConnectedNetworksList(const NetworkList& network_list); void GetCurrentConnectedNetworks(NetworkList* network_list) const override; @@ -44,6 +48,7 @@ private: bool force_network_handles_supported_; + ConnectionType connection_type_; NetworkChangeNotifier::NetworkList connected_networks_; };
diff --git a/net/quic/chromium/network_connection.cc b/net/quic/chromium/network_connection.cc index 6bfed05..63e0a527 100644 --- a/net/quic/chromium/network_connection.cc +++ b/net/quic/chromium/network_connection.cc
@@ -10,66 +10,62 @@ NetworkConnection::NetworkConnection() : connection_type_(NetworkChangeNotifier::CONNECTION_UNKNOWN), - connection_description_(nullptr) {} - -const char* NetworkConnection::GetDescription() { - NetworkChangeNotifier::ConnectionType type = - NetworkChangeNotifier::GetConnectionType(); - if (connection_description_ != nullptr && type == connection_type_) - return connection_description_; - - DVLOG(1) << "Updating NetworkConnection's Cached Data"; - - connection_description_ = NetworkChangeNotifier::ConnectionTypeToString(type); - connection_type_ = type; - if (connection_type_ == NetworkChangeNotifier::CONNECTION_UNKNOWN || - connection_type_ == NetworkChangeNotifier::CONNECTION_WIFI) { - // This function only seems usefully defined on Windows currently. - WifiPHYLayerProtocol wifi_type = GetWifiPHYLayerProtocol(); - switch (wifi_type) { - case WIFI_PHY_LAYER_PROTOCOL_NONE: - // No wifi support or no associated AP. - break; - case WIFI_PHY_LAYER_PROTOCOL_ANCIENT: - // An obsolete modes introduced by the original 802.11, e.g. IR, FHSS. - connection_description_ = "CONNECTION_WIFI_ANCIENT"; - break; - case WIFI_PHY_LAYER_PROTOCOL_A: - // 802.11a, OFDM-based rates. - connection_description_ = "CONNECTION_WIFI_802.11a"; - break; - case WIFI_PHY_LAYER_PROTOCOL_B: - // 802.11b, DSSS or HR DSSS. - connection_description_ = "CONNECTION_WIFI_802.11b"; - break; - case WIFI_PHY_LAYER_PROTOCOL_G: - // 802.11g, same rates as 802.11a but compatible with 802.11b. - connection_description_ = "CONNECTION_WIFI_802.11g"; - break; - case WIFI_PHY_LAYER_PROTOCOL_N: - // 802.11n, HT rates. - connection_description_ = "CONNECTION_WIFI_802.11n"; - break; - case WIFI_PHY_LAYER_PROTOCOL_UNKNOWN: - // Unclassified mode or failure to identify. - break; - } - } - return connection_description_; + connection_description_(nullptr) { + NetworkChangeNotifier::AddIPAddressObserver(this); + NetworkChangeNotifier::AddConnectionTypeObserver(this); + OnIPAddressChanged(); } -void NetworkConnection::Clear() { - connection_type_ = NetworkChangeNotifier::CONNECTION_UNKNOWN; - connection_description_ = nullptr; +NetworkConnection::~NetworkConnection() { + NetworkChangeNotifier::RemoveConnectionTypeObserver(this); + NetworkChangeNotifier::RemoveIPAddressObserver(this); } void NetworkConnection::OnIPAddressChanged() { - Clear(); + OnConnectionTypeChanged(NetworkChangeNotifier::GetConnectionType()); } void NetworkConnection::OnConnectionTypeChanged( NetworkChangeNotifier::ConnectionType type) { - Clear(); + DVLOG(1) << "Updating NetworkConnection's Cached Data"; + + connection_type_ = type; + connection_description_ = NetworkChangeNotifier::ConnectionTypeToString(type); + if (connection_type_ != NetworkChangeNotifier::CONNECTION_UNKNOWN && + connection_type_ != NetworkChangeNotifier::CONNECTION_WIFI) { + return; + } + + // This function only seems usefully defined on Windows currently. + WifiPHYLayerProtocol wifi_type = GetWifiPHYLayerProtocol(); + switch (wifi_type) { + case WIFI_PHY_LAYER_PROTOCOL_NONE: + // No wifi support or no associated AP. + break; + case WIFI_PHY_LAYER_PROTOCOL_ANCIENT: + // An obsolete modes introduced by the original 802.11, e.g. IR, FHSS. + connection_description_ = "CONNECTION_WIFI_ANCIENT"; + break; + case WIFI_PHY_LAYER_PROTOCOL_A: + // 802.11a, OFDM-based rates. + connection_description_ = "CONNECTION_WIFI_802.11a"; + break; + case WIFI_PHY_LAYER_PROTOCOL_B: + // 802.11b, DSSS or HR DSSS. + connection_description_ = "CONNECTION_WIFI_802.11b"; + break; + case WIFI_PHY_LAYER_PROTOCOL_G: + // 802.11g, same rates as 802.11a but compatible with 802.11b. + connection_description_ = "CONNECTION_WIFI_802.11g"; + break; + case WIFI_PHY_LAYER_PROTOCOL_N: + // 802.11n, HT rates. + connection_description_ = "CONNECTION_WIFI_802.11n"; + break; + case WIFI_PHY_LAYER_PROTOCOL_UNKNOWN: + // Unclassified mode or failure to identify. + break; + } } } // namespace net
diff --git a/net/quic/chromium/network_connection.h b/net/quic/chromium/network_connection.h index e9c64d2..f1407d8 100644 --- a/net/quic/chromium/network_connection.h +++ b/net/quic/chromium/network_connection.h
@@ -11,18 +11,19 @@ namespace net { -namespace test { -class NetworkConnectionPeer; -} // namespace test - -// This class returns the current network's connection description. It also -// cache's the connection description to fix crbug.com/422516. +// This class stores information about the current network type and +// provides a textual description of it. class NET_EXPORT NetworkConnection : public NetworkChangeNotifier::IPAddressObserver, public NetworkChangeNotifier::ConnectionTypeObserver { public: NetworkConnection(); - ~NetworkConnection() override {} + ~NetworkConnection() override; + + // Returns the underlying connection type. + NetworkChangeNotifier::ConnectionType connection_type() { + return connection_type_; + } // Return a string equivalent of current connection type. Callers don't need // to make a copy of the returned C-string value. If the connection type is @@ -33,10 +34,7 @@ // don't distinguish Wifi vs Etherenet, and call everything CONNECTION_UNKNOWN // :-(. Fo non CONNECTIION_WIFI, this returns the C-string returned by // NetworkChangeNotifier::ConnectionTypeToString. - const char* GetDescription(); - - // It clears the cached connection_type_ and connection_description_. - void Clear(); + const char* connection_description() { return connection_description_; } // NetworkChangeNotifier::IPAddressObserver methods: void OnIPAddressChanged() override; @@ -46,11 +44,11 @@ NetworkChangeNotifier::ConnectionType type) override; private: - friend class test::NetworkConnectionPeer; - - // Cache the connection_type and the connection description string to avoid - // calling expensive GetWifiPHYLayerProtocol() function. + // Cache the connection type to avoid calling the potentially expensive + // NetworkChangeNotifier::GetConnectionType() function. NetworkChangeNotifier::ConnectionType connection_type_; + // Cache the connection description string to avoid calling the expensive + // GetWifiPHYLayerProtocol() function. const char* connection_description_; DISALLOW_COPY_AND_ASSIGN(NetworkConnection);
diff --git a/net/quic/chromium/network_connection_unittest.cc b/net/quic/chromium/network_connection_unittest.cc index 6b0ec3a8..f9372a18 100644 --- a/net/quic/chromium/network_connection_unittest.cc +++ b/net/quic/chromium/network_connection_unittest.cc
@@ -4,76 +4,98 @@ #include "net/quic/chromium/network_connection.h" +#include "base/run_loop.h" +#include "net/quic/chromium/mock_network_change_notifier.h" #include "testing/gtest/include/gtest/gtest.h" namespace net { namespace test { -class NetworkConnectionPeer { - public: - static NetworkChangeNotifier::ConnectionType connection_type( - const NetworkConnection& network_connection) { - return network_connection.connection_type_; - } - static void set_connection_type(NetworkConnection* network_connection, - NetworkChangeNotifier::ConnectionType type) { - network_connection->connection_type_ = type; - } +constexpr auto CONNECTION_3G = NetworkChangeNotifier::CONNECTION_3G; +constexpr auto CONNECTION_2G = NetworkChangeNotifier::CONNECTION_2G; +constexpr auto CONNECTION_ETHERNET = NetworkChangeNotifier::CONNECTION_ETHERNET; +constexpr auto CONNECTION_WIFI = NetworkChangeNotifier::CONNECTION_WIFI; - static const char* connection_description( - const NetworkConnection& network_connection) { - return network_connection.connection_description_; - } - static void set_connection_description(NetworkConnection* network_connection, - const char* description) { - network_connection->connection_description_ = description; - } -}; - -// Test NetworkConnection(). class NetworkConnectionTest : public testing::Test { protected: - void CheckNetworkConnectionDescription() { - NetworkChangeNotifier::ConnectionType type = - NetworkChangeNotifier::GetConnectionType(); - const char* description = network_connection_.GetDescription(); - // Verify GetDescription() updated the cached data. - EXPECT_EQ(NetworkConnectionPeer::connection_type(network_connection_), - type); - EXPECT_EQ( - NetworkConnectionPeer::connection_description(network_connection_), - description); + NetworkConnectionTest() + : notifier_(scoped_notifier_.mock_network_change_notifier()) {} - if (type != NetworkChangeNotifier::CONNECTION_WIFI) - EXPECT_EQ(description, - NetworkChangeNotifier::ConnectionTypeToString(type)); - else - EXPECT_NE(nullptr, network_connection_.GetDescription()); - } - - NetworkConnection network_connection_; + ScopedMockNetworkChangeNotifier scoped_notifier_; + MockNetworkChangeNotifier* notifier_; }; -TEST_F(NetworkConnectionTest, GetDescription) { - const char* description = network_connection_.GetDescription(); +TEST_F(NetworkConnectionTest, Connection2G) { + notifier_->SetConnectionType(CONNECTION_2G); - // Set connection description to nullptr. - NetworkConnectionPeer::set_connection_description(&network_connection_, - nullptr); - CheckNetworkConnectionDescription(); - - // Set connection type to a junk value. - NetworkConnectionPeer::set_connection_type( - &network_connection_, NetworkChangeNotifier::CONNECTION_LAST); - CheckNetworkConnectionDescription(); - - EXPECT_EQ(description, network_connection_.GetDescription()); + NetworkConnection network_connection; + EXPECT_EQ(CONNECTION_2G, network_connection.connection_type()); + const char* description = network_connection.connection_description(); + EXPECT_EQ(NetworkChangeNotifier::ConnectionTypeToString(CONNECTION_2G), + description); } -TEST_F(NetworkConnectionTest, Clear) { - CheckNetworkConnectionDescription(); - network_connection_.Clear(); - CheckNetworkConnectionDescription(); +TEST_F(NetworkConnectionTest, Connection3G) { + notifier_->SetConnectionType(CONNECTION_3G); + + NetworkConnection network_connection; + EXPECT_EQ(CONNECTION_3G, network_connection.connection_type()); + const char* description = network_connection.connection_description(); + EXPECT_EQ(NetworkChangeNotifier::ConnectionTypeToString(CONNECTION_3G), + description); +} + +TEST_F(NetworkConnectionTest, ConnectionEthnernet) { + notifier_->SetConnectionType(CONNECTION_ETHERNET); + + NetworkConnection network_connection; + EXPECT_EQ(CONNECTION_ETHERNET, network_connection.connection_type()); + const char* description = network_connection.connection_description(); + EXPECT_EQ(NetworkChangeNotifier::ConnectionTypeToString(CONNECTION_ETHERNET), + description); +} + +TEST_F(NetworkConnectionTest, ConnectionWifi) { + notifier_->SetConnectionType(CONNECTION_WIFI); + + NetworkConnection network_connection; + EXPECT_EQ(CONNECTION_WIFI, network_connection.connection_type()); + const char* description = network_connection.connection_description(); + // On some platforms, the description for wifi will be more detailed + // than what is returned by NetworkChangeNotifier::ConnectionTypeToString. + EXPECT_NE(nullptr, description); +} + +TEST_F(NetworkConnectionTest, ConnectionChange) { + notifier_->SetConnectionType(CONNECTION_2G); + + NetworkConnection network_connection; + const char* description_2g = network_connection.connection_description(); + + notifier_->SetConnectionType(CONNECTION_3G); + NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); + // Spin the message loop so the notification is delivered. + base::RunLoop().RunUntilIdle(); + EXPECT_EQ(CONNECTION_3G, network_connection.connection_type()); + const char* description_3g = network_connection.connection_description(); + + NetworkChangeNotifier::NotifyObserversOfConnectionTypeChangeForTests( + CONNECTION_ETHERNET); + // Spin the message loop so the notification is delivered. + base::RunLoop().RunUntilIdle(); + EXPECT_EQ(CONNECTION_ETHERNET, network_connection.connection_type()); + const char* description_ethernet = + network_connection.connection_description(); + + NetworkChangeNotifier::NotifyObserversOfConnectionTypeChangeForTests( + CONNECTION_WIFI); + EXPECT_NE(nullptr, network_connection.connection_description()); + EXPECT_EQ(NetworkChangeNotifier::ConnectionTypeToString(CONNECTION_2G), + description_2g); + EXPECT_EQ(NetworkChangeNotifier::ConnectionTypeToString(CONNECTION_3G), + description_3g); + EXPECT_EQ(NetworkChangeNotifier::ConnectionTypeToString(CONNECTION_ETHERNET), + description_ethernet); } } // namespace test
diff --git a/net/quic/chromium/quic_stream_factory.cc b/net/quic/chromium/quic_stream_factory.cc index 45cbcd8..58ce8e4 100644 --- a/net/quic/chromium/quic_stream_factory.cc +++ b/net/quic/chromium/quic_stream_factory.cc
@@ -76,6 +76,14 @@ CREATION_ERROR_MAX }; +enum InitialRttEstimateSource { + INITIAL_RTT_DEFAULT, + INITIAL_RTT_CACHED, + INITIAL_RTT_2G, + INITIAL_RTT_3G, + INITIAL_RTT_SOURCE_MAX, +}; + // The maximum receive window sizes for QUIC sessions and streams. const int32_t kQuicSessionMaxRecvWindowSize = 15 * 1024 * 1024; // 15 MB const int32_t kQuicStreamMaxRecvWindowSize = 6 * 1024 * 1024; // 6 MB @@ -155,6 +163,15 @@ MIGRATION_STATUS_MAX); } +void SetInitialRttEstimate(base::TimeDelta estimate, + enum InitialRttEstimateSource source, + QuicConfig* config) { + UMA_HISTOGRAM_ENUMERATION("Net.QuicSession.InitialRttEsitmateSource", source, + INITIAL_RTT_SOURCE_MAX); + if (estimate != base::TimeDelta()) + config->SetInitialRoundTripTimeUsToSend(estimate.InMicroseconds()); +} + QuicConfig InitializeQuicConfig(const QuicTagVector& connection_options, int idle_connection_timeout_seconds) { DCHECK_GT(idle_connection_timeout_seconds, 0); @@ -746,7 +763,8 @@ bool allow_server_migration, bool force_hol_blocking, bool race_cert_verification, - bool quic_do_not_fragment, + bool do_not_fragment, + bool estimate_initial_rtt, const QuicTagVector& connection_options, bool enable_token_binding) : require_confirmation_(true), @@ -802,7 +820,8 @@ allow_server_migration_(allow_server_migration), force_hol_blocking_(force_hol_blocking), race_cert_verification_(race_cert_verification), - quic_do_not_fragment_(quic_do_not_fragment), + do_not_fragment_(do_not_fragment), + estimate_initial_rtt(estimate_initial_rtt), check_persisted_supports_quic_(true), has_initialized_data_(false), num_push_streams_created_(0), @@ -1596,7 +1615,7 @@ return rv; } - if (quic_do_not_fragment_) { + if (do_not_fragment_) { rv = socket->SetDoNotFragment(); // SetDoNotFragment is not implemented on all platforms, so ignore errors. if (rv != OK && rv != ERR_NOT_IMPLEMENTED) { @@ -1685,10 +1704,8 @@ config.SetInitialSessionFlowControlWindowToSend( kQuicSessionMaxRecvWindowSize); config.SetInitialStreamFlowControlWindowToSend(kQuicStreamMaxRecvWindowSize); - int64_t srtt = GetServerNetworkStatsSmoothedRttInMicroseconds(server_id); - if (srtt > 0) - config.SetInitialRoundTripTimeUsToSend(static_cast<uint32_t>(srtt)); config.SetBytesForConnectionIdToSend(0); + ConfigureInitialRttEstimate(server_id, &config); if (force_hol_blocking_) config.SetForceHolBlocking(); @@ -1714,7 +1731,7 @@ connection, std::move(socket), this, quic_crypto_client_stream_factory_, clock_.get(), transport_security_state_, std::move(server_info), server_id, yield_after_packets_, yield_after_duration_, cert_verify_flags, - config, &crypto_config_, network_connection_.GetDescription(), + config, &crypto_config_, network_connection_.connection_description(), dns_resolution_start_time, dns_resolution_end_time, &push_promise_index_, push_delegate_, task_runner_, std::move(socket_performance_watcher), net_log.net_log()); @@ -1750,15 +1767,47 @@ session_peer_ip_[session] = peer_address; } -int64_t QuicStreamFactory::GetServerNetworkStatsSmoothedRttInMicroseconds( +void QuicStreamFactory::ConfigureInitialRttEstimate( + const QuicServerId& server_id, + QuicConfig* config) { + const base::TimeDelta* srtt = GetServerNetworkStatsSmoothedRtt(server_id); + if (srtt != nullptr) { + SetInitialRttEstimate(*srtt, INITIAL_RTT_CACHED, config); + return; + } + + NetworkChangeNotifier::ConnectionType type = + network_connection_.connection_type(); + if (type == NetworkChangeNotifier::CONNECTION_2G) { + SetInitialRttEstimate(base::TimeDelta::FromMilliseconds(1200), + INITIAL_RTT_CACHED, config); + return; + } + + if (type == NetworkChangeNotifier::CONNECTION_3G) { + SetInitialRttEstimate(base::TimeDelta::FromMilliseconds(400), + INITIAL_RTT_CACHED, config); + return; + } + + SetInitialRttEstimate(base::TimeDelta(), INITIAL_RTT_DEFAULT, config); +} + +const base::TimeDelta* QuicStreamFactory::GetServerNetworkStatsSmoothedRtt( const QuicServerId& server_id) const { url::SchemeHostPort server("https", server_id.host_port_pair().host(), server_id.host_port_pair().port()); const ServerNetworkStats* stats = http_server_properties_->GetServerNetworkStats(server); if (stats == nullptr) - return 0; - return stats->srtt.InMicroseconds(); + return nullptr; + return &(stats->srtt); +} + +int64_t QuicStreamFactory::GetServerNetworkStatsSmoothedRttInMicroseconds( + const QuicServerId& server_id) const { + const base::TimeDelta* srtt = GetServerNetworkStatsSmoothedRtt(server_id); + return srtt == nullptr ? 0 : srtt->InMicroseconds(); } bool QuicStreamFactory::WasQuicRecentlyBroken(
diff --git a/net/quic/chromium/quic_stream_factory.h b/net/quic/chromium/quic_stream_factory.h index cab262f0..48828daf 100644 --- a/net/quic/chromium/quic_stream_factory.h +++ b/net/quic/chromium/quic_stream_factory.h
@@ -225,7 +225,8 @@ bool allow_server_migration, bool force_hol_blocking, bool race_cert_verification, - bool quic_do_not_fragment, + bool do_not_fragment, + bool estimate_initial_rtt, const QuicTagVector& connection_options, bool enable_token_binding); ~QuicStreamFactory() override; @@ -456,12 +457,21 @@ void ActivateSession(const QuicSessionKey& key, QuicChromiumClientSession* session); + void ConfigureInitialRttEstimate(const QuicServerId& server_id, + QuicConfig* config); + // Returns |srtt| in micro seconds from ServerNetworkStats. Returns 0 if there // is no |http_server_properties_| or if |http_server_properties_| doesn't // have ServerNetworkStats for the given |server_id|. int64_t GetServerNetworkStatsSmoothedRttInMicroseconds( const QuicServerId& server_id) const; + // Returns |srtt| from ServerNetworkStats. Returns null if there + // is no |http_server_properties_| or if |http_server_properties_| doesn't + // have ServerNetworkStats for the given |server_id|. + const base::TimeDelta* GetServerNetworkStatsSmoothedRtt( + const QuicServerId& server_id) const; + // Helper methods. bool WasQuicRecentlyBroken(const QuicServerId& server_id) const; @@ -635,7 +645,10 @@ bool race_cert_verification_; // If set, configure QUIC sockets to not fragment packets. - bool quic_do_not_fragment_; + bool do_not_fragment_; + + // If true, estimate the initial RTT based on network type. + bool estimate_initial_rtt; // Local address of socket that was created in CreateSession. IPEndPoint local_address_;
diff --git a/net/quic/chromium/quic_stream_factory_test.cc b/net/quic/chromium/quic_stream_factory_test.cc index 66baa77..a0ba4c1 100644 --- a/net/quic/chromium/quic_stream_factory_test.cc +++ b/net/quic/chromium/quic_stream_factory_test.cc
@@ -259,7 +259,8 @@ migrate_sessions_early_(false), allow_server_migration_(false), force_hol_blocking_(false), - race_cert_verification_(false) { + race_cert_verification_(false), + estimate_initial_rtt_(false) { clock_->AdvanceTime(QuicTime::Delta::FromSeconds(1)); } @@ -291,7 +292,7 @@ packet_reader_yield_after_duration_milliseconds_, migrate_sessions_on_network_change_, migrate_sessions_early_, allow_server_migration_, force_hol_blocking_, race_cert_verification_, - /*do_not_fragment*/ true, QuicTagVector(), + /*do_not_fragment*/ true, estimate_initial_rtt_, QuicTagVector(), /*enable_token_binding*/ false)); factory_->set_require_confirmation(false); EXPECT_FALSE(factory_->has_quic_server_info_factory()); @@ -793,6 +794,7 @@ bool allow_server_migration_; bool force_hol_blocking_; bool race_cert_verification_; + bool estimate_initial_rtt_; }; class QuicStreamFactoryTest : public QuicStreamFactoryTestBase, @@ -898,6 +900,133 @@ EXPECT_TRUE(socket_data.AllWriteDataConsumed()); } +TEST_P(QuicStreamFactoryTest, DefaultInitialRtt) { + Initialize(); + ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails(); + crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details); + + MockQuicData socket_data; + socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING); + socket_data.AddWrite( + ConstructSettingsPacket(1, SETTINGS_MAX_HEADER_LIST_SIZE, + kDefaultMaxUncompressedHeaderSize, nullptr)); + socket_data.AddSocketDataToFactory(&socket_factory_); + + QuicStreamRequest request(factory_.get()); + EXPECT_EQ(ERR_IO_PENDING, + request.Request(host_port_pair_, privacy_mode_, + /*cert_verify_flags=*/0, url_, "GET", net_log_, + callback_.callback())); + + EXPECT_THAT(callback_.WaitForResult(), IsOk()); + std::unique_ptr<QuicHttpStream> stream = request.CreateStream(); + EXPECT_TRUE(stream.get()); + + QuicChromiumClientSession* session = GetActiveSession(host_port_pair_); + EXPECT_EQ(100000u, session->connection()->GetStats().srtt_us); + ASSERT_FALSE(session->config()->HasInitialRoundTripTimeUsToSend()); +} + +TEST_P(QuicStreamFactoryTest, CachedInitialRtt) { + ServerNetworkStats stats; + stats.srtt = base::TimeDelta::FromMilliseconds(10); + http_server_properties_.SetServerNetworkStats(url::SchemeHostPort(url_), + stats); + estimate_initial_rtt_ = true; + + Initialize(); + ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails(); + crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details); + + MockQuicData socket_data; + socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING); + socket_data.AddWrite( + ConstructSettingsPacket(1, SETTINGS_MAX_HEADER_LIST_SIZE, + kDefaultMaxUncompressedHeaderSize, nullptr)); + socket_data.AddSocketDataToFactory(&socket_factory_); + + QuicStreamRequest request(factory_.get()); + EXPECT_EQ(ERR_IO_PENDING, + request.Request(host_port_pair_, privacy_mode_, + /*cert_verify_flags=*/0, url_, "GET", net_log_, + callback_.callback())); + + EXPECT_THAT(callback_.WaitForResult(), IsOk()); + std::unique_ptr<QuicHttpStream> stream = request.CreateStream(); + EXPECT_TRUE(stream.get()); + + QuicChromiumClientSession* session = GetActiveSession(host_port_pair_); + EXPECT_EQ(10000u, session->connection()->GetStats().srtt_us); + ASSERT_TRUE(session->config()->HasInitialRoundTripTimeUsToSend()); + EXPECT_EQ(10000u, session->config()->GetInitialRoundTripTimeUsToSend()); +} + +TEST_P(QuicStreamFactoryTest, 2gInitialRtt) { + ScopedMockNetworkChangeNotifier notifier; + notifier.mock_network_change_notifier()->SetConnectionType( + NetworkChangeNotifier::CONNECTION_2G); + estimate_initial_rtt_ = true; + + Initialize(); + ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails(); + crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details); + + MockQuicData socket_data; + socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING); + socket_data.AddWrite( + ConstructSettingsPacket(1, SETTINGS_MAX_HEADER_LIST_SIZE, + kDefaultMaxUncompressedHeaderSize, nullptr)); + socket_data.AddSocketDataToFactory(&socket_factory_); + + QuicStreamRequest request(factory_.get()); + EXPECT_EQ(ERR_IO_PENDING, + request.Request(host_port_pair_, privacy_mode_, + /*cert_verify_flags=*/0, url_, "GET", net_log_, + callback_.callback())); + + EXPECT_THAT(callback_.WaitForResult(), IsOk()); + std::unique_ptr<QuicHttpStream> stream = request.CreateStream(); + EXPECT_TRUE(stream.get()); + + QuicChromiumClientSession* session = GetActiveSession(host_port_pair_); + EXPECT_EQ(1200000u, session->connection()->GetStats().srtt_us); + ASSERT_TRUE(session->config()->HasInitialRoundTripTimeUsToSend()); + EXPECT_EQ(1200000u, session->config()->GetInitialRoundTripTimeUsToSend()); +} + +TEST_P(QuicStreamFactoryTest, 3gInitialRtt) { + ScopedMockNetworkChangeNotifier notifier; + notifier.mock_network_change_notifier()->SetConnectionType( + NetworkChangeNotifier::CONNECTION_3G); + estimate_initial_rtt_ = true; + + Initialize(); + ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails(); + crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details); + + MockQuicData socket_data; + socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING); + socket_data.AddWrite( + ConstructSettingsPacket(1, SETTINGS_MAX_HEADER_LIST_SIZE, + kDefaultMaxUncompressedHeaderSize, nullptr)); + socket_data.AddSocketDataToFactory(&socket_factory_); + + QuicStreamRequest request(factory_.get()); + EXPECT_EQ(ERR_IO_PENDING, + request.Request(host_port_pair_, privacy_mode_, + /*cert_verify_flags=*/0, url_, "GET", net_log_, + callback_.callback())); + + EXPECT_THAT(callback_.WaitForResult(), IsOk()); + std::unique_ptr<QuicHttpStream> stream = request.CreateStream(); + EXPECT_TRUE(stream.get()); + + QuicChromiumClientSession* session = GetActiveSession(host_port_pair_); + EXPECT_EQ(400000u, session->connection()->GetStats().srtt_us); + ASSERT_TRUE(session->config()->HasInitialRoundTripTimeUsToSend()); + EXPECT_EQ(400000u, session->config()->GetInitialRoundTripTimeUsToSend()); +} + TEST_P(QuicStreamFactoryTest, GoAway) { Initialize(); ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails();
diff --git a/net/quic/core/crypto/crypto_handshake_message.cc b/net/quic/core/crypto/crypto_handshake_message.cc index 754aa2e..968f7556 100644 --- a/net/quic/core/crypto/crypto_handshake_message.cc +++ b/net/quic/core/crypto/crypto_handshake_message.cc
@@ -6,17 +6,16 @@ #include <memory> -#include "base/strings/stringprintf.h" #include "net/quic/core/crypto/crypto_framer.h" #include "net/quic/core/crypto/crypto_protocol.h" #include "net/quic/core/crypto/crypto_utils.h" #include "net/quic/core/quic_socket_address_coder.h" #include "net/quic/core/quic_utils.h" #include "net/quic/platform/api/quic_map_util.h" +#include "net/quic/platform/api/quic_str_cat.h" #include "net/quic/platform/api/quic_text_utils.h" using base::StringPiece; -using base::StringPrintf; using std::string; namespace net { @@ -304,8 +303,8 @@ } break; case kPAD: - ret += StringPrintf("(%d bytes of padding)", - static_cast<int>(it->second.size())); + ret += QuicStringPrintf("(%d bytes of padding)", + static_cast<int>(it->second.size())); done = true; break; case kSNI:
diff --git a/net/quic/core/quic_bandwidth.cc b/net/quic/core/quic_bandwidth.cc index 3dce6de..86f0664 100644 --- a/net/quic/core/quic_bandwidth.cc +++ b/net/quic/core/quic_bandwidth.cc
@@ -7,13 +7,11 @@ #include <cinttypes> #include <limits> -#include "base/strings/stringprintf.h" #include "net/quic/core/quic_constants.h" #include "net/quic/core/quic_time.h" #include "net/quic/core/quic_types.h" #include "net/quic/platform/api/quic_bug_tracker.h" - -using base::StringPrintf; +#include "net/quic/platform/api/quic_str_cat.h" namespace net { @@ -114,8 +112,8 @@ std::string QuicBandwidth::ToDebugValue() const { if (bits_per_second_ < 80000) { - return StringPrintf("%" PRId64 " bits/s (%" PRId64 " bytes/s)", - bits_per_second_, bits_per_second_ / 8); + return QuicStringPrintf("%" PRId64 " bits/s (%" PRId64 " bytes/s)", + bits_per_second_, bits_per_second_ / 8); } double divisor; @@ -133,9 +131,9 @@ double bits_per_second_with_unit = bits_per_second_ / divisor; double bytes_per_second_with_unit = bits_per_second_with_unit / 8; - return StringPrintf("%.2f %cbits/s (%.2f %cbytes/s)", - bits_per_second_with_unit, unit, - bytes_per_second_with_unit, unit); + return QuicStringPrintf("%.2f %cbits/s (%.2f %cbytes/s)", + bits_per_second_with_unit, unit, + bytes_per_second_with_unit, unit); } } // namespace net
diff --git a/net/quic/core/quic_time.cc b/net/quic/core/quic_time.cc index d1cfbaf..af761929 100644 --- a/net/quic/core/quic_time.cc +++ b/net/quic/core/quic_time.cc
@@ -8,9 +8,8 @@ #include <cstdlib> #include <limits> -#include "base/strings/stringprintf.h" +#include "net/quic/platform/api/quic_str_cat.h" -using base::StringPrintf; using std::string; namespace net { @@ -24,12 +23,12 @@ // For debugging purposes, always display the value with the highest precision // available. if (absolute_value > one_s && absolute_value % one_s == 0) { - return StringPrintf("%" PRId64 "s", time_offset_ / one_s); + return QuicStringPrintf("%" PRId64 "s", time_offset_ / one_s); } if (absolute_value > one_ms && absolute_value % one_ms == 0) { - return StringPrintf("%" PRId64 "ms", time_offset_ / one_ms); + return QuicStringPrintf("%" PRId64 "ms", time_offset_ / one_ms); } - return StringPrintf("%" PRId64 "us", time_offset_); + return QuicStringPrintf("%" PRId64 "us", time_offset_); } uint64_t QuicWallTime::ToUNIXSeconds() const {
diff --git a/net/quic/platform/api/quic_str_cat.h b/net/quic/platform/api/quic_str_cat.h index cfbc67d..ff60dac 100644 --- a/net/quic/platform/api/quic_str_cat.h +++ b/net/quic/platform/api/quic_str_cat.h
@@ -14,6 +14,11 @@ return std::move(QuicStrCatImpl(std::forward<const Args&>(args)...)); } +template <typename... Args> +inline std::string QuicStringPrintf(const Args&... args) { + return std::move(QuicStringPrintfImpl(std::forward<const Args&>(args)...)); +} + } // namespace net #endif // NET_QUIC_PLATFORM_API_QUIC_STR_CAT_H_
diff --git a/net/quic/platform/impl/quic_str_cat_impl.h b/net/quic/platform/impl/quic_str_cat_impl.h index 1989e8d..3e07d64 100644 --- a/net/quic/platform/impl/quic_str_cat_impl.h +++ b/net/quic/platform/impl/quic_str_cat_impl.h
@@ -8,6 +8,8 @@ #include <sstream> #include <string> +#include "base/strings/stringprintf.h" + namespace net { template <typename... Args> @@ -18,6 +20,11 @@ return oss.str(); } +template <typename... Args> +inline std::string QuicStringPrintfImpl(const Args&... args) { + return std::move(base::StringPrintf(std::forward<const Args&>(args)...)); +} + } // namespace net #endif // NET_QUIC_PLATFORM_IMPL_QUIC_STR_CAT_IMPL_H_
diff --git a/net/quic/test_tools/simulator/alarm_factory.cc b/net/quic/test_tools/simulator/alarm_factory.cc index 43eb54d..2f87b59 100644 --- a/net/quic/test_tools/simulator/alarm_factory.cc +++ b/net/quic/test_tools/simulator/alarm_factory.cc
@@ -2,11 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/strings/stringprintf.h" #include "net/quic/core/quic_alarm.h" +#include "net/quic/platform/api/quic_str_cat.h" #include "net/quic/test_tools/simulator/alarm_factory.h" -using base::StringPrintf; using std::string; namespace net { @@ -60,7 +59,7 @@ string AlarmFactory::GetNewAlarmName() { ++counter_; - return StringPrintf("%s (alarm %i)", name_.c_str(), counter_); + return QuicStringPrintf("%s (alarm %i)", name_.c_str(), counter_); } QuicAlarm* AlarmFactory::CreateAlarm(QuicAlarm::Delegate* delegate) {
diff --git a/net/quic/test_tools/simulator/link.cc b/net/quic/test_tools/simulator/link.cc index 2ce999e3..2bc7499 100644 --- a/net/quic/test_tools/simulator/link.cc +++ b/net/quic/test_tools/simulator/link.cc
@@ -4,10 +4,9 @@ #include "net/quic/test_tools/simulator/link.h" -#include "base/strings/stringprintf.h" +#include "net/quic/platform/api/quic_str_cat.h" #include "net/quic/test_tools/simulator/simulator.h" -using base::StringPrintf; using std::string; namespace net { @@ -92,12 +91,12 @@ QuicBandwidth bandwidth, QuicTime::Delta propagation_delay) : a_to_b_link_(simulator, - StringPrintf("%s (A-to-B)", name.c_str()), + QuicStringPrintf("%s (A-to-B)", name.c_str()), sink_b, bandwidth, propagation_delay), b_to_a_link_(simulator, - StringPrintf("%s (B-to-A)", name.c_str()), + QuicStringPrintf("%s (B-to-A)", name.c_str()), sink_a, bandwidth, propagation_delay) {} @@ -107,9 +106,9 @@ QuicBandwidth bandwidth, QuicTime::Delta propagation_delay) : SymmetricLink(endpoint_a->simulator(), - StringPrintf("Link [%s]<->[%s]", - endpoint_a->name().c_str(), - endpoint_b->name().c_str()), + QuicStringPrintf("Link [%s]<->[%s]", + endpoint_a->name().c_str(), + endpoint_b->name().c_str()), endpoint_a->GetRxPort(), endpoint_b->GetRxPort(), bandwidth,
diff --git a/net/quic/test_tools/simulator/quic_endpoint.cc b/net/quic/test_tools/simulator/quic_endpoint.cc index 7adb701b..638ad2e 100644 --- a/net/quic/test_tools/simulator/quic_endpoint.cc +++ b/net/quic/test_tools/simulator/quic_endpoint.cc
@@ -5,14 +5,13 @@ #include "net/quic/test_tools/simulator/quic_endpoint.h" #include "base/sha1.h" -#include "base/strings/stringprintf.h" #include "net/quic/core/crypto/crypto_handshake_message.h" #include "net/quic/core/crypto/crypto_protocol.h" #include "net/quic/platform/api/quic_ptr_util.h" +#include "net/quic/platform/api/quic_str_cat.h" #include "net/quic/test_tools/quic_test_utils.h" #include "net/quic/test_tools/simulator/simulator.h" -using base::StringPrintf; using std::string; namespace net { @@ -64,7 +63,7 @@ peer_name_(peer_name), writer_(this), nic_tx_queue_(simulator, - StringPrintf("%s (TX Queue)", name.c_str()), + QuicStringPrintf("%s (TX Queue)", name.c_str()), kMaxPacketSize * kTxQueueSize), connection_(connection_id, GetAddressFromName(peer_name),
diff --git a/net/quic/test_tools/simulator/switch.cc b/net/quic/test_tools/simulator/switch.cc index 85c9e3b..a27f6d905 100644 --- a/net/quic/test_tools/simulator/switch.cc +++ b/net/quic/test_tools/simulator/switch.cc
@@ -5,11 +5,10 @@ #include <cinttypes> #include "base/format_macros.h" -#include "base/strings/stringprintf.h" #include "net/quic/platform/api/quic_ptr_util.h" +#include "net/quic/platform/api/quic_str_cat.h" #include "net/quic/test_tools/simulator/switch.h" -using base::StringPrintf; using std::string; namespace net { @@ -20,8 +19,8 @@ SwitchPortNumber port_count, QuicByteCount queue_capacity) { for (size_t port_number = 1; port_number <= port_count; port_number++) { - ports_.emplace_back(simulator, StringPrintf("%s (port %" PRIuS ")", - name.c_str(), port_number), + ports_.emplace_back(simulator, QuicStringPrintf("%s (port %" PRIuS ")", + name.c_str(), port_number), this, port_number, queue_capacity); } } @@ -38,7 +37,7 @@ port_number_(port_number), connected_(false), queue_(simulator, - StringPrintf("%s (queue)", name.c_str()), + QuicStringPrintf("%s (queue)", name.c_str()), queue_capacity) {} void Switch::Port::AcceptPacket(std::unique_ptr<Packet> packet) {
diff --git a/net/spdy/spdy_deframer_visitor.cc b/net/spdy/spdy_deframer_visitor.cc index 15ff32c..fd0ef33 100644 --- a/net/spdy/spdy_deframer_visitor.cc +++ b/net/spdy/spdy_deframer_visitor.cc
@@ -509,7 +509,7 @@ CHECK_EQ(frame_type_, GOAWAY) << " frame_type_=" << Http2FrameTypeToString(frame_type_); CHECK(goaway_description_); - StringPiece(goaway_data, len).AppendToString(goaway_description_.get()); + goaway_description_->append(goaway_data, len); return true; } @@ -707,7 +707,7 @@ << " len: " << len; CHECK_EQ(stream_id_, stream_id); CHECK_EQ(frame_type_, DATA); - StringPiece(data, len).AppendToString(data_.get()); + data_->append(data, len); } // Called when padding is skipped over, including the padding length field at
diff --git a/net/spdy/spdy_deframer_visitor_test.cc b/net/spdy/spdy_deframer_visitor_test.cc index f2dc4c74..cb946a11 100644 --- a/net/spdy/spdy_deframer_visitor_test.cc +++ b/net/spdy/spdy_deframer_visitor_test.cc
@@ -72,7 +72,7 @@ string result; for (const auto& frame_ptr : frames) { auto sf = SerializeFrame(*frame_ptr); - base::StringPiece(sf.data(), sf.size()).AppendToString(&result); + result.append(sf.data(), sf.size()); } return result; }
diff --git a/net/spdy/spdy_frame_builder.cc b/net/spdy/spdy_frame_builder.cc index bf96a3a..141b15a 100644 --- a/net/spdy/spdy_frame_builder.cc +++ b/net/spdy/spdy_frame_builder.cc
@@ -39,7 +39,7 @@ SpdyFrameType type, uint8_t flags, SpdyStreamId stream_id) { - DCHECK(IsValidFrameType(SerializeFrameType(type))); + DCHECK(IsDefinedFrameType(SerializeFrameType(type))); DCHECK_EQ(0u, stream_id & ~kStreamIdMask); bool success = true; if (length_ > 0) { @@ -70,7 +70,7 @@ uint8_t flags, SpdyStreamId stream_id, size_t length) { - DCHECK(IsValidFrameType(SerializeFrameType(type))); + DCHECK(IsDefinedFrameType(SerializeFrameType(type))); DCHECK_EQ(0u, stream_id & ~kStreamIdMask); bool success = true; SPDY_BUG_IF(framer.GetFrameMaximumSize() < length_)
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc index 2038b39f..41f0abd 100644 --- a/net/spdy/spdy_framer.cc +++ b/net/spdy/spdy_framer.cc
@@ -33,7 +33,6 @@ #include "net/spdy/spdy_frame_builder.h" #include "net/spdy/spdy_frame_reader.h" #include "net/spdy/spdy_framer_decoder_adapter.h" -#include "net/spdy/spdy_headers_block_parser.h" using base::StringPiece; using std::hex; @@ -351,8 +350,6 @@ return "SPDY_CONTROL_FRAME_HEADER_BLOCK"; case SPDY_GOAWAY_FRAME_PAYLOAD: return "SPDY_GOAWAY_FRAME_PAYLOAD"; - case SPDY_RST_STREAM_FRAME_PAYLOAD: - return "SPDY_RST_STREAM_FRAME_PAYLOAD"; case SPDY_SETTINGS_FRAME_HEADER: return "SPDY_SETTINGS_FRAME_HEADER"; case SPDY_SETTINGS_FRAME_PAYLOAD: @@ -546,13 +543,6 @@ break; } - case SPDY_RST_STREAM_FRAME_PAYLOAD: { - size_t bytes_read = ProcessRstStreamFramePayload(data, len); - len -= bytes_read; - data += bytes_read; - break; - } - case SPDY_GOAWAY_FRAME_PAYLOAD: { size_t bytes_read = ProcessGoAwayFramePayload(data, len); len -= bytes_read; @@ -648,7 +638,7 @@ SpdyFrameType SpdyFramer::ValidateFrameHeader(bool is_control_frame, int frame_type_field, size_t payload_length_field) { - if (!IsValidFrameType(frame_type_field)) { + if (!IsDefinedFrameType(frame_type_field)) { // We ignore unknown frame types for extensibility, as long as // the rest of the control frame header is valid. // We rely on the visitor to check validity of current_frame_stream_id_. @@ -728,9 +718,6 @@ bool is_control_frame = false; int control_frame_type_field = kDataFrameType; - // ProcessControlFrameHeader() will set current_frame_type_ to the - // correct value if this is a valid control frame. - current_frame_type_ = DATA; uint32_t length_field = 0; bool successful_read = reader.ReadUInt24(&length_field); DCHECK(successful_read); @@ -739,7 +726,7 @@ successful_read = reader.ReadUInt8(&control_frame_type_field_uint8); DCHECK(successful_read); // We check control_frame_type_field's validity in - // ProcessControlFrameHeader(). + // ValidateFrameHeader(). control_frame_type_field = control_frame_type_field_uint8; is_control_frame = control_frame_type_field != kDataFrameType; @@ -797,13 +784,13 @@ } } } else { - ProcessControlFrameHeader(control_frame_type_field); + ProcessControlFrameHeader(); } return original_len - len; } -void SpdyFramer::ProcessControlFrameHeader(int control_frame_type_field) { +void SpdyFramer::ProcessControlFrameHeader() { DCHECK_EQ(SPDY_NO_ERROR, error_code_); DCHECK_LE(GetFrameHeaderSize(), current_frame_buffer_.len()); @@ -960,11 +947,6 @@ return; } - if (current_frame_type_ == RST_STREAM) { - CHANGE_STATE(SPDY_RST_STREAM_FRAME_PAYLOAD); - return; - } - if (current_frame_type_ == ALTSVC) { CHANGE_STATE(SPDY_ALTSVC_FRAME_PAYLOAD); return; @@ -1216,8 +1198,7 @@ } // Does not buffer the control payload. Instead, either passes directly to the -// visitor or decompresses and then passes directly to the visitor, via -// IncrementallyDeliverControlFrameHeaderData() +// visitor or decompresses and then passes directly to the visitor. size_t SpdyFramer::ProcessControlFrameHeaderBlock(const char* data, size_t data_len) { DCHECK_EQ(SPDY_CONTROL_FRAME_HEADER_BLOCK, state_); @@ -1380,6 +1361,21 @@ // Use frame-specific handlers. switch (current_frame_type_) { + case RST_STREAM: { + SpdyRstStreamStatus status = RST_STREAM_NO_ERROR; + uint32_t status_raw = status; + bool successful_read = reader.ReadUInt32(&status_raw); + DCHECK(successful_read); + DCHECK(reader.IsDoneReading()); + if (IsValidRstStreamStatus(status_raw)) { + status = ParseRstStreamStatus(status_raw); + } else { + // Treat unrecognized status codes as INTERNAL_ERROR as + // recommended by the HTTP/2 spec. + status = RST_STREAM_INTERNAL_ERROR; + } + visitor_->OnRstStream(current_frame_stream_id_, status); + } break; case PING: { SpdyPingId id = 0; bool is_ack = current_frame_flags_ & PING_FLAG_ACK; @@ -1495,65 +1491,6 @@ return original_len; } -size_t SpdyFramer::ProcessRstStreamFramePayload(const char* data, size_t len) { - if (len == 0) { - return 0; - } - // Clamp to the actual remaining payload. - if (len > remaining_data_length_) { - len = remaining_data_length_; - } - size_t original_len = len; - - // Check if we had already read enough bytes to parse the fixed-length portion - // of the RST_STREAM frame. - const size_t header_size = GetRstStreamSize(); - size_t unread_header_bytes = header_size - current_frame_buffer_.len(); - bool already_parsed_header = (unread_header_bytes == 0); - if (!already_parsed_header) { - // Buffer the new RST_STREAM header bytes we got. - UpdateCurrentFrameBuffer(&data, &len, unread_header_bytes); - - // Do we have enough to parse the constant size RST_STREAM header? - if (current_frame_buffer_.len() == header_size) { - // Parse out the last good stream id. - SpdyFrameReader reader(current_frame_buffer_.data(), - current_frame_buffer_.len()); - reader.Seek(GetFrameHeaderSize()); // Seek past frame header. - - SpdyRstStreamStatus status = RST_STREAM_NO_ERROR; - uint32_t status_raw = status; - bool successful_read = reader.ReadUInt32(&status_raw); - DCHECK(successful_read); - if (IsValidRstStreamStatus(status_raw)) { - status = ParseRstStreamStatus(status_raw); - } else { - // Treat unrecognized status codes as INTERNAL_ERROR as - // recommended by the HTTP/2 spec. - status = RST_STREAM_INTERNAL_ERROR; - } - // Finished parsing the RST_STREAM header, call frame handler. - visitor_->OnRstStream(current_frame_stream_id_, status); - } - } - - // Handle remaining data as opaque. - // TODO(jamessynge): Remove support for variable length/opaque trailer. - bool processed_successfully = true; - if (len > 0) { - processed_successfully = visitor_->OnRstStreamFrameData(data, len); - } - remaining_data_length_ -= original_len; - if (!processed_successfully) { - set_error(SPDY_RST_STREAM_FRAME_CORRUPT); - } else if (remaining_data_length_ == 0) { - // Signal that there is not more opaque data. - visitor_->OnRstStreamFrameData(NULL, 0); - CHANGE_STATE(SPDY_FRAME_COMPLETE); - } - return original_len; -} - size_t SpdyFramer::ProcessAltSvcFramePayload(const char* data, size_t len) { if (len == 0) { return 0; @@ -2485,27 +2422,6 @@ return hpack_decoder_.get(); } -bool SpdyFramer::IncrementallyDeliverControlFrameHeaderData( - SpdyStreamId stream_id, const char* data, size_t len) { - bool read_successfully = true; - while (read_successfully && len > 0) { - size_t bytes_to_deliver = std::min(len, kHeaderDataChunkMaxSize); - read_successfully = header_parser_->HandleControlFrameHeadersData( - stream_id, data, bytes_to_deliver); - if (header_parser_->get_error() == SpdyHeadersBlockParser::NEED_MORE_DATA) { - read_successfully = true; - } - data += bytes_to_deliver; - len -= bytes_to_deliver; - if (!read_successfully) { - // Assume that the problem was the header block was too large for the - // visitor. - set_error(SPDY_CONTROL_PAYLOAD_TOO_LARGE); - } - } - return read_successfully; -} - void SpdyFramer::SetDecoderHeaderTableDebugVisitor( std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor) { if (decoder_adapter_ != nullptr) {
diff --git a/net/spdy/spdy_framer.h b/net/spdy/spdy_framer.h index b686746..d615afcd 100644 --- a/net/spdy/spdy_framer.h +++ b/net/spdy/spdy_framer.h
@@ -21,7 +21,6 @@ #include "net/spdy/spdy_alt_svc_wire_format.h" #include "net/spdy/spdy_flags.h" #include "net/spdy/spdy_header_block.h" -#include "net/spdy/spdy_headers_block_parser.h" #include "net/spdy/spdy_headers_handler_interface.h" #include "net/spdy/spdy_protocol.h" @@ -265,7 +264,6 @@ SPDY_CONTROL_FRAME_BEFORE_HEADER_BLOCK, SPDY_CONTROL_FRAME_HEADER_BLOCK, SPDY_GOAWAY_FRAME_PAYLOAD, - SPDY_RST_STREAM_FRAME_PAYLOAD, SPDY_SETTINGS_FRAME_HEADER, SPDY_SETTINGS_FRAME_PAYLOAD, SPDY_ALTSVC_FRAME_PAYLOAD, @@ -599,7 +597,6 @@ size_t ProcessFramePadding(const char* data, size_t len); size_t ProcessDataFramePayload(const char* data, size_t len); size_t ProcessGoAwayFramePayload(const char* data, size_t len); - size_t ProcessRstStreamFramePayload(const char* data, size_t len); size_t ProcessSettingsFrameHeader(const char* data, size_t len); size_t ProcessSettingsFramePayload(const char* data, size_t len); size_t ProcessAltSvcFramePayload(const char* data, size_t len); @@ -620,7 +617,7 @@ size_t payload_length_field); // Helpers for above internal breakouts from ProcessInput. - void ProcessControlFrameHeader(int control_frame_type_field); + void ProcessControlFrameHeader(); // Always passed exactly 1 setting's worth of data. bool ProcessSetting(const char* data); @@ -636,13 +633,6 @@ SpdyFrameType type, int padding_payload_len); - // Deliver the given control frame's uncompressed headers block to the - // visitor in chunks. Returns true if the visitor has accepted all of the - // chunks. - bool IncrementallyDeliverControlFrameHeaderData(SpdyStreamId stream_id, - const char* data, - size_t len); - // Utility to copy the given data block to the current frame buffer, up // to the given maximum number of bytes, and update the buffer // data (pointer and length). Returns the number of bytes @@ -738,7 +728,6 @@ SpdyFramerVisitorInterface* visitor_; SpdyFramerDebugVisitorInterface* debug_visitor_; - std::unique_ptr<SpdyHeadersBlockParser> header_parser_; SpdyHeadersHandlerInterface* header_handler_; // Optional decoder to use instead of this instance.
diff --git a/net/spdy/spdy_framer_test.cc b/net/spdy/spdy_framer_test.cc index 8b4b396..f3d862fd 100644 --- a/net/spdy/spdy_framer_test.cc +++ b/net/spdy/spdy_framer_test.cc
@@ -509,7 +509,7 @@ void InitHeaderStreaming(SpdyFrameType header_control_type, SpdyStreamId stream_id) { - if (!IsValidFrameType(SerializeFrameType(header_control_type))) { + if (!IsDefinedFrameType(SerializeFrameType(header_control_type))) { DLOG(FATAL) << "Attempted to init header streaming with " << "invalid control frame type: " << header_control_type; }
diff --git a/net/spdy/spdy_headers_block_parser.cc b/net/spdy/spdy_headers_block_parser.cc deleted file mode 100644 index 5e6bc6f5..0000000 --- a/net/spdy/spdy_headers_block_parser.cc +++ /dev/null
@@ -1,195 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "net/spdy/spdy_headers_block_parser.h" - -#include "base/sys_byteorder.h" -#include "net/spdy/spdy_bug_tracker.h" -#include "net/spdy/spdy_flags.h" - -namespace net { -namespace { - -// 0 is invalid according to both the SPDY 3.1 and HTTP/2 specifications. -const SpdyStreamId kInvalidStreamId = 0; - -} // anonymous namespace - -namespace { -const size_t kLengthFieldSize = sizeof(uint32_t); -} // anonymous namespace - -const size_t SpdyHeadersBlockParser::kMaximumFieldLength = 16 * 1024; - -SpdyHeadersBlockParser::SpdyHeadersBlockParser( - SpdyHeadersHandlerInterface* handler) - : state_(READING_HEADER_BLOCK_LEN), - max_headers_in_block_(MaxNumberOfHeaders()), - total_bytes_received_(0), - remaining_key_value_pairs_for_frame_(0), - handler_(handler), - stream_id_(kInvalidStreamId), - error_(NO_PARSER_ERROR) { - // The handler that we set must not be NULL. - DCHECK(handler_ != NULL); -} - -SpdyHeadersBlockParser::~SpdyHeadersBlockParser() {} - -bool SpdyHeadersBlockParser::HandleControlFrameHeadersData( - SpdyStreamId stream_id, - const char* headers_data, - size_t headers_data_length) { - if (error_ == NEED_MORE_DATA) { - error_ = NO_PARSER_ERROR; - } - if (error_ != NO_PARSER_ERROR) { - SPDY_BUG << "Unexpected error: " << error_; - return false; - } - - // If this is the first call with the current header block, - // save its stream id. - if (state_ == READING_HEADER_BLOCK_LEN && stream_id_ == kInvalidStreamId) { - stream_id_ = stream_id; - } - if (stream_id != stream_id_) { - SPDY_BUG << "Unexpected stream id: " << stream_id << " (expected " - << stream_id_ << ")"; - error_ = UNEXPECTED_STREAM_ID; - return false; - } - if (stream_id_ == kInvalidStreamId) { - SPDY_BUG << "Expected nonzero stream id, saw: " << stream_id_; - error_ = UNEXPECTED_STREAM_ID; - return false; - } - total_bytes_received_ += headers_data_length; - - SpdyPinnableBufferPiece prefix, key, value; - // Simultaneously tie lifetimes to the stack, and clear member variables. - prefix.Swap(&headers_block_prefix_); - key.Swap(&key_); - - // Apply the parsing state machine to the remaining prefix - // from last invocation, plus newly-available headers data. - Reader reader(prefix.buffer(), prefix.length(), - headers_data, headers_data_length); - while (error_ == NO_PARSER_ERROR) { - ParserState next_state(FINISHED_HEADER); - - switch (state_) { - case READING_HEADER_BLOCK_LEN: - next_state = READING_KEY_LEN; - ParseBlockLength(&reader); - break; - case READING_KEY_LEN: - next_state = READING_KEY; - ParseFieldLength(&reader); - break; - case READING_KEY: - next_state = READING_VALUE_LEN; - if (!reader.ReadN(next_field_length_, &key)) { - error_ = NEED_MORE_DATA; - } - break; - case READING_VALUE_LEN: - next_state = READING_VALUE; - ParseFieldLength(&reader); - break; - case READING_VALUE: - next_state = FINISHED_HEADER; - if (!reader.ReadN(next_field_length_, &value)) { - error_ = NEED_MORE_DATA; - } else { - handler_->OnHeader(key, value); - } - break; - case FINISHED_HEADER: - // Prepare for next header or block. - if (--remaining_key_value_pairs_for_frame_ > 0) { - next_state = READING_KEY_LEN; - } else { - next_state = READING_HEADER_BLOCK_LEN; - if (FLAGS_chromium_http2_flag_log_compressed_size) { - // We reach here in two cases: 1) Spdy3 or 2) HTTP/2 without hpack - // encoding. For the first case, we just log the uncompressed size - // since we are going to deprecate Spdy3 soon. For the second case, - // the compressed size is the same as the uncompressed size. - handler_->OnHeaderBlockEnd(total_bytes_received_, - total_bytes_received_); - } else { - handler_->OnHeaderBlockEnd(total_bytes_received_); - } - stream_id_ = kInvalidStreamId; - // Expect to have consumed all buffer. - if (reader.Available() != 0) { - error_ = TOO_MUCH_DATA; - } - } - break; - } - - if (error_ == NO_PARSER_ERROR) { - state_ = next_state; - - if (next_state == READING_HEADER_BLOCK_LEN) { - // We completed reading a full header block. Return to caller. - total_bytes_received_ = 0; - break; - } - } else if (error_ == NEED_MORE_DATA) { - // We can't continue parsing until more data is available. Make copies of - // the key and buffer remainder, in preperation for the next invocation. - if (state_ > READING_KEY) { - key_.Swap(&key); - key_.Pin(); - } - reader.ReadN(reader.Available(), &headers_block_prefix_); - headers_block_prefix_.Pin(); - } - } - return error_ == NO_PARSER_ERROR; -} - -void SpdyHeadersBlockParser::ParseBlockLength(Reader* reader) { - ParseLength(reader, &remaining_key_value_pairs_for_frame_); - if (error_ == NO_PARSER_ERROR && - remaining_key_value_pairs_for_frame_ > max_headers_in_block_) { - error_ = HEADER_BLOCK_TOO_LARGE; - } - if (error_ == NO_PARSER_ERROR) { - handler_->OnHeaderBlockStart(); - } -} - -void SpdyHeadersBlockParser::ParseFieldLength(Reader* reader) { - ParseLength(reader, &next_field_length_); - if (error_ == NO_PARSER_ERROR && next_field_length_ > kMaximumFieldLength) { - error_ = HEADER_FIELD_TOO_LARGE; - } -} - -void SpdyHeadersBlockParser::ParseLength(Reader* reader, - uint32_t* parsed_length) { - char buffer[] = {0, 0, 0, 0}; - if (!reader->ReadN(kLengthFieldSize, buffer)) { - error_ = NEED_MORE_DATA; - return; - } - // Convert from network to host order and return the parsed out integer. - *parsed_length = - base::NetToHost32(*reinterpret_cast<const uint32_t*>(buffer)); -} - -size_t SpdyHeadersBlockParser::MaxNumberOfHeaders() { - // Account for the length of the header block field. - size_t max_bytes_for_headers = kMaximumFieldLength - kLengthFieldSize; - - // A minimal size header is twice the length field size (and has a - // zero-lengthed key and a zero-lengthed value). - return max_bytes_for_headers / (2 * kLengthFieldSize); -} - -} // namespace net
diff --git a/net/spdy/spdy_headers_block_parser.h b/net/spdy/spdy_headers_block_parser.h deleted file mode 100644 index 1ad7ddf..0000000 --- a/net/spdy/spdy_headers_block_parser.h +++ /dev/null
@@ -1,117 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef NET_SPDY_SPDY_HEADERS_BLOCK_PARSER_H_ -#define NET_SPDY_SPDY_HEADERS_BLOCK_PARSER_H_ - -#include <stddef.h> -#include <stdint.h> - -#include <memory> - -#include "base/logging.h" -#include "base/strings/string_piece.h" -#include "net/base/net_export.h" -#include "net/spdy/spdy_headers_handler_interface.h" -#include "net/spdy/spdy_prefixed_buffer_reader.h" -#include "net/spdy/spdy_protocol.h" - -namespace net { - -// This class handles SPDY headers block bytes and parses out key-value pairs -// as they arrive. This class is not thread-safe, and assumes that all headers -// block bytes are processed in a single thread. -class NET_EXPORT_PRIVATE SpdyHeadersBlockParser { - public: - // Bound on acceptable header name or value length. - static const size_t kMaximumFieldLength; // = 16 * 1024 - - // Constructor. The handler's OnHeader will be called for every key - // value pair that we parsed from the headers block. - explicit SpdyHeadersBlockParser(SpdyHeadersHandlerInterface* handler); - - virtual ~SpdyHeadersBlockParser(); - - // Handles headers block data as it arrives. Returns false if an error has - // been set, which can include the recoverable error NEED_MORE_DATA. Returns - // true if the invocation completes the parse of the entire headers block, - // in which case the parser is ready for a new headers block. - bool HandleControlFrameHeadersData(SpdyStreamId stream_id, - const char* headers_data, - size_t len); - enum ParserError { - NO_PARSER_ERROR, - // Set when parsing failed due to insufficient data. - // This error is recoverable, by passing in new data. - NEED_MORE_DATA, - // Set when a complete block has been read, but unprocessed data remains. - TOO_MUCH_DATA, - // Set when a block exceeds |MaxNumberOfHeadersForVersion| headers. - HEADER_BLOCK_TOO_LARGE, - // Set when a header key or value exceeds |kMaximumFieldLength|. - HEADER_FIELD_TOO_LARGE, - // Set when the parser is given an unexpected stream ID. - UNEXPECTED_STREAM_ID, - }; - ParserError get_error() const { return error_; } - - // Returns the maximal number of headers in a SPDY headers block. - static size_t MaxNumberOfHeaders(); - - private: - typedef SpdyPrefixedBufferReader Reader; - - // Parses and sanity-checks header block length. - void ParseBlockLength(Reader* reader); - - // Parses and sanity-checks header field length. - void ParseFieldLength(Reader* reader); - - // Parses and decodes network-order lengths into |parsed_length|. - void ParseLength(Reader* reader, uint32_t* parsed_length); - - // The state of the parser. - enum ParserState { - READING_HEADER_BLOCK_LEN, - READING_KEY_LEN, - READING_KEY, - READING_VALUE_LEN, - READING_VALUE, - FINISHED_HEADER - }; - ParserState state_; - - // The maximal number of headers in a SPDY headers block. - const size_t max_headers_in_block_; - - // A running total of the bytes parsed since the last call to Reset(). - size_t total_bytes_received_; - - // Number of key-value pairs until we complete handling the current - // headers block. - uint32_t remaining_key_value_pairs_for_frame_; - - // The length of the next header field to be read (either key or value). - uint32_t next_field_length_; - - // Handles key-value pairs as we parse them. - SpdyHeadersHandlerInterface* handler_; - - // Holds unprocessed buffer remainders between calls to - // |HandleControlFrameHeadersData|. - SpdyPinnableBufferPiece headers_block_prefix_; - - // Holds the key of a partially processed header between calls to - // |HandleControlFrameHeadersData|. - SpdyPinnableBufferPiece key_; - - // The current header block stream identifier. - SpdyStreamId stream_id_; - - ParserError error_; -}; - -} // namespace net - -#endif // NET_SPDY_SPDY_HEADERS_BLOCK_PARSER_H_
diff --git a/net/spdy/spdy_headers_block_parser_test.cc b/net/spdy/spdy_headers_block_parser_test.cc deleted file mode 100644 index 5c9e56c..0000000 --- a/net/spdy/spdy_headers_block_parser_test.cc +++ /dev/null
@@ -1,275 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "net/spdy/spdy_headers_block_parser.h" - -#include <memory> -#include <string> -#include <vector> - -#include "base/strings/string_number_conversions.h" -#include "base/sys_byteorder.h" -#include "net/spdy/spdy_flags.h" -#include "net/spdy/spdy_test_utils.h" -#include "net/test/gtest_util.h" -#include "testing/gmock/include/gmock/gmock.h" -#include "testing/gtest/include/gtest/gtest.h" - -using testing::_; - -namespace net { - -using base::IntToString; -using base::StringPiece; -using base::UintToString; -using std::string; - -// A mock the handler class to check that we parse out the correct headers -// and call the callback methods when we should. -class MockSpdyHeadersHandler : public SpdyHeadersHandlerInterface { - public: - MOCK_METHOD0(OnHeaderBlockStart, void()); - MOCK_METHOD1(OnHeaderBlockEnd, void(size_t bytes)); - MOCK_METHOD2(OnHeaderBlockEnd, void(size_t bytes, size_t compressed_bytes)); - MOCK_METHOD2(OnHeader, void(StringPiece key, StringPiece value)); -}; - -class SpdyHeadersBlockParserTest : public ::testing::Test { - public: - SpdyHeadersBlockParserTest() : parser_(&handler_) {} - ~SpdyHeadersBlockParserTest() override {} - - protected: - // Create a header block with a specified number of headers. - string CreateHeaders(uint32_t num_headers, bool insert_nulls) { - string headers; - - // First, write the number of headers in the header block. - headers += EncodeLength(num_headers); - - // Second, write the key-value pairs. - for (uint32_t i = 0; i < num_headers; i++) { - // Build the key. - string key; - if (insert_nulls) { - key = string(kBaseKey) + string("\0", 1) + UintToString(i); - } else { - key = string(kBaseKey) + UintToString(i); - } - // Encode the key as SPDY header. - headers += EncodeLength(key.length()); - headers += key; - - // Build the value. - string value; - if (insert_nulls) { - value = string(kBaseValue) + string("\0", 1) + UintToString(i); - } else { - value = string(kBaseValue) + UintToString(i); - } - // Encode the value as SPDY header. - headers += EncodeLength(value.length()); - headers += value; - } - return headers; - } - - string EncodeLength(uint32_t len) { - char buffer[4]; - uint32_t net_order_len = base::HostToNet32(len); - memcpy(buffer, &net_order_len, sizeof(uint32_t)); - return string(buffer, sizeof(uint32_t)); - } - - MockSpdyHeadersHandler handler_; - SpdyHeadersBlockParser parser_; - - static const char *const kBaseKey; - static const char *const kBaseValue; - - // Number of headers and header blocks used in the tests. - static const int kNumHeadersInBlock = 10; - static const int kNumHeaderBlocks = 10; -}; - -const char *const SpdyHeadersBlockParserTest::kBaseKey = "test_key"; -const char *const SpdyHeadersBlockParserTest::kBaseValue = "test_value"; - -TEST_F(SpdyHeadersBlockParserTest, BasicTest) { - // Sanity test, verify that we parse out correctly a block with - // a single key-value pair and that we notify when we start and finish - // handling a headers block. - - EXPECT_CALL(handler_, OnHeaderBlockStart()).Times(1); - string expect_key = kBaseKey + IntToString(0); - string expect_value = kBaseValue + IntToString(0); - EXPECT_CALL(handler_, OnHeader(StringPiece(expect_key), - StringPiece(expect_value))).Times(1); - - string headers(CreateHeaders(1, false)); - if (FLAGS_chromium_http2_flag_log_compressed_size) { - EXPECT_CALL(handler_, OnHeaderBlockEnd(headers.length(), _)).Times(1); - } else { - EXPECT_CALL(handler_, OnHeaderBlockEnd(headers.length())).Times(1); - } - EXPECT_TRUE(parser_.HandleControlFrameHeadersData(1, headers.c_str(), - headers.length())); - EXPECT_EQ(SpdyHeadersBlockParser::NO_PARSER_ERROR, parser_.get_error()); -} - -TEST_F(SpdyHeadersBlockParserTest, NullsSupportedTest) { - // Sanity test, verify that we parse out correctly a block with - // a single key-value pair when the key and value contain null charecters. - EXPECT_CALL(handler_, OnHeaderBlockStart()).Times(1); - - string expect_key = kBaseKey + string("\0", 1) + IntToString(0); - string expect_value = kBaseValue + string("\0", 1) + IntToString(0); - EXPECT_CALL(handler_, OnHeader(StringPiece(expect_key), - StringPiece(expect_value))).Times(1); - - string headers(CreateHeaders(1, true)); - if (FLAGS_chromium_http2_flag_log_compressed_size) { - EXPECT_CALL(handler_, OnHeaderBlockEnd(headers.length(), _)).Times(1); - } else { - EXPECT_CALL(handler_, OnHeaderBlockEnd(headers.length())).Times(1); - } - - EXPECT_TRUE(parser_.HandleControlFrameHeadersData(1, headers.c_str(), - headers.length())); - EXPECT_EQ(SpdyHeadersBlockParser::NO_PARSER_ERROR, parser_.get_error()); -} - -TEST_F(SpdyHeadersBlockParserTest, MultipleBlocksAndHeadersWithPartialData) { - testing::InSequence s; - - // CreateHeaders is deterministic; we can call it once for the whole test. - string headers(CreateHeaders(kNumHeadersInBlock, false)); - - // The mock doesn't retain storage of arguments, so keep them in scope. - std::vector<string> retained_arguments; - for (int i = 0; i < kNumHeadersInBlock; i++) { - retained_arguments.push_back(kBaseKey + IntToString(i)); - retained_arguments.push_back(kBaseValue + IntToString(i)); - } - // For each block we expect to parse out the headers in order. - for (int i = 0; i < kNumHeaderBlocks; i++) { - EXPECT_CALL(handler_, OnHeaderBlockStart()).Times(1); - for (int j = 0; j < kNumHeadersInBlock; j++) { - EXPECT_CALL(handler_, OnHeader( - StringPiece(retained_arguments[2 * j]), - StringPiece(retained_arguments[2 * j + 1]))).Times(1); - } - if (FLAGS_chromium_http2_flag_log_compressed_size) { - EXPECT_CALL(handler_, OnHeaderBlockEnd(headers.length(), _)).Times(1); - } else { - EXPECT_CALL(handler_, OnHeaderBlockEnd(headers.length())).Times(1); - } - } - // Parse the header blocks, feeding the parser one byte at a time. - for (int i = 1; i <= kNumHeaderBlocks; i++) { - for (string::iterator it = headers.begin(); it != headers.end(); ++it) { - if ((it + 1) == headers.end()) { - // Last byte completes the block. - EXPECT_TRUE(parser_.HandleControlFrameHeadersData(i, &(*it), 1)); - EXPECT_EQ(SpdyHeadersBlockParser::NO_PARSER_ERROR, parser_.get_error()); - } else { - EXPECT_FALSE(parser_.HandleControlFrameHeadersData(i, &(*it), 1)); - EXPECT_EQ(SpdyHeadersBlockParser::NEED_MORE_DATA, parser_.get_error()); - } - } - } -} - -TEST_F(SpdyHeadersBlockParserTest, HandlesEmptyCallsTest) { - EXPECT_CALL(handler_, OnHeaderBlockStart()).Times(1); - - string expect_key = kBaseKey + IntToString(0); - string expect_value = kBaseValue + IntToString(0); - EXPECT_CALL(handler_, OnHeader(StringPiece(expect_key), - StringPiece(expect_value))).Times(1); - - string headers(CreateHeaders(1, false)); - if (FLAGS_chromium_http2_flag_log_compressed_size) { - EXPECT_CALL(handler_, OnHeaderBlockEnd(headers.length(), _)).Times(1); - } else { - EXPECT_CALL(handler_, OnHeaderBlockEnd(headers.length())).Times(1); - } - - // Send a header in pieces with intermediate empty calls. - for (string::iterator it = headers.begin(); it != headers.end(); ++it) { - if ((it + 1) == headers.end()) { - // Last byte completes the block. - EXPECT_TRUE(parser_.HandleControlFrameHeadersData(1, &(*it), 1)); - EXPECT_EQ(SpdyHeadersBlockParser::NO_PARSER_ERROR, parser_.get_error()); - } else { - EXPECT_FALSE(parser_.HandleControlFrameHeadersData(1, &(*it), 1)); - EXPECT_EQ(SpdyHeadersBlockParser::NEED_MORE_DATA, parser_.get_error()); - EXPECT_FALSE(parser_.HandleControlFrameHeadersData(1, NULL, 0)); - } - } -} - -TEST_F(SpdyHeadersBlockParserTest, TooManyHeadersTest) { - // Header block with too many headers. - string headers = EncodeLength(parser_.MaxNumberOfHeaders() + 1); - EXPECT_FALSE(parser_.HandleControlFrameHeadersData(1, headers.c_str(), - headers.length())); - EXPECT_EQ(SpdyHeadersBlockParser::HEADER_BLOCK_TOO_LARGE, - parser_.get_error()); -} - -TEST_F(SpdyHeadersBlockParserTest, TooLongKeyTest) { - // Header block with one header, which has a too-long key. - string headers = - EncodeLength(1) + - EncodeLength(SpdyHeadersBlockParser::kMaximumFieldLength + 1); - EXPECT_FALSE(parser_.HandleControlFrameHeadersData(1, headers.c_str(), - headers.length())); - EXPECT_EQ(SpdyHeadersBlockParser::HEADER_FIELD_TOO_LARGE, - parser_.get_error()); -} - -TEST_F(SpdyHeadersBlockParserTest, ExtraDataTest) { - EXPECT_CALL(handler_, OnHeaderBlockStart()).Times(1); - - string expect_key = kBaseKey + IntToString(0); - string expect_value = kBaseValue + IntToString(0); - EXPECT_CALL(handler_, OnHeader(StringPiece(expect_key), - StringPiece(expect_value))).Times(1); - - string headers = CreateHeaders(1, false) + "foobar"; - if (FLAGS_chromium_http2_flag_log_compressed_size) { - EXPECT_CALL(handler_, OnHeaderBlockEnd(headers.length(), _)).Times(1); - } else { - EXPECT_CALL(handler_, OnHeaderBlockEnd(headers.length())).Times(1); - } - - EXPECT_FALSE(parser_.HandleControlFrameHeadersData(1, headers.c_str(), - headers.length())); - EXPECT_EQ(SpdyHeadersBlockParser::TOO_MUCH_DATA, parser_.get_error()); -} - -TEST_F(SpdyHeadersBlockParserTest, WrongStreamIdTest) { - string headers(CreateHeaders(kNumHeadersInBlock, false)); - EXPECT_FALSE(parser_.HandleControlFrameHeadersData(1, headers.data(), 1)); - EXPECT_EQ(SpdyHeadersBlockParser::NEED_MORE_DATA, parser_.get_error()); - bool result; - EXPECT_SPDY_BUG( - result = parser_.HandleControlFrameHeadersData(2, headers.data() + 1, 1), - "Unexpected stream id: 2 \\(expected 1\\)"); - EXPECT_FALSE(result); - EXPECT_EQ(SpdyHeadersBlockParser::UNEXPECTED_STREAM_ID, parser_.get_error()); -} - -TEST_F(SpdyHeadersBlockParserTest, InvalidStreamIdTest) { - string headers(CreateHeaders(kNumHeadersInBlock, false)); - bool result; - EXPECT_SPDY_BUG( - result = parser_.HandleControlFrameHeadersData(0, headers.data(), 1), - "Expected nonzero stream id, saw: 0"); - EXPECT_FALSE(result); - EXPECT_EQ(SpdyHeadersBlockParser::UNEXPECTED_STREAM_ID, parser_.get_error()); -} - -} // namespace net
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc index 9acaf3d949..972b4f9 100644 --- a/net/spdy/spdy_network_transaction_unittest.cc +++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -42,6 +42,7 @@ #include "net/spdy/buffered_spdy_framer.h" #include "net/spdy/spdy_http_stream.h" #include "net/spdy/spdy_http_utils.h" +#include "net/spdy/spdy_protocol.h" #include "net/spdy/spdy_session.h" #include "net/spdy/spdy_session_pool.h" #include "net/spdy/spdy_test_util_common.h"
diff --git a/net/spdy/spdy_protocol.cc b/net/spdy/spdy_protocol.cc index 1c9254e30..a24d2793 100644 --- a/net/spdy/spdy_protocol.cc +++ b/net/spdy/spdy_protocol.cc
@@ -9,6 +9,9 @@ namespace net { +const char* const kHttp2ConnectionHeaderPrefix = + "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"; + SpdyPriority ClampSpdy3Priority(SpdyPriority priority) { if (priority < kV3HighestPriority) { SPDY_BUG << "Invalid priority: " << static_cast<int>(priority); @@ -45,13 +48,14 @@ return static_cast<SpdyPriority>(7.f - (weight - 1) / kSteps); } -bool IsValidFrameType(int frame_type_field) { +bool IsDefinedFrameType(int frame_type_field) { return frame_type_field >= MIN_FRAME_TYPE && frame_type_field <= MAX_FRAME_TYPE; } SpdyFrameType ParseFrameType(int frame_type_field) { - SPDY_BUG_IF(!IsValidFrameType(frame_type_field)) << "Invalid frame type."; + SPDY_BUG_IF(!IsDefinedFrameType(frame_type_field)) + << "Frame type not defined: " << static_cast<int>(frame_type_field); return static_cast<SpdyFrameType>(frame_type_field); }
diff --git a/net/spdy/spdy_protocol.h b/net/spdy/spdy_protocol.h index 55c87bf..14053154 100644 --- a/net/spdy/spdy_protocol.h +++ b/net/spdy/spdy_protocol.h
@@ -58,19 +58,14 @@ // Maximum padding size in octets for one DATA or HEADERS or PUSH_PROMISE frame. const int32_t kPaddingSizePerFrame = 256; -// The HTTP/2 connection header prefix, which must be the first bytes -// sent by the client upon starting an HTTP/2 connection, and which -// must be followed by a SETTINGS frame. -// -// Equivalent to the string "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" -// (without the null terminator). -const char kHttp2ConnectionHeaderPrefix[] = { - 0x50, 0x52, 0x49, 0x20, 0x2a, 0x20, 0x48, 0x54, // PRI * HT - 0x54, 0x50, 0x2f, 0x32, 0x2e, 0x30, 0x0d, 0x0a, // TP/2.0.. - 0x0d, 0x0a, 0x53, 0x4d, 0x0d, 0x0a, 0x0d, 0x0a // ..SM.... -}; -const int kHttp2ConnectionHeaderPrefixSize = - arraysize(kHttp2ConnectionHeaderPrefix); +// The HTTP/2 connection preface, which must be the first bytes sent by the +// client upon starting an HTTP/2 connection, and which must be followed by a +// SETTINGS frame. Note that even though |kHttp2ConnectionHeaderPrefix| is +// defined as a string literal with a null terminator, the actual connection +// preface is only the first |kHttp2ConnectionHeaderPrefixSize| bytes, which +// excludes the null terminator. +NET_EXPORT_PRIVATE extern const char* const kHttp2ConnectionHeaderPrefix; +const int kHttp2ConnectionHeaderPrefixSize = 24; // Types of HTTP2 frames. enum SpdyFrameType { @@ -225,9 +220,9 @@ typedef uint64_t SpdyPingId; -// Returns true if a given on-the-wire enumeration of a frame type is valid -// for a given protocol version, false otherwise. -NET_EXPORT_PRIVATE bool IsValidFrameType(int frame_type_field); +// Returns true if a given on-the-wire enumeration of a frame type is defined +// in a standardized HTTP/2 specification, false otherwise. +NET_EXPORT_PRIVATE bool IsDefinedFrameType(int frame_type_field); // Parses a frame type from an on-the-wire enumeration. // Behavior is undefined for invalid frame type fields; consumers should first
diff --git a/net/spdy/write_blocked_list.h b/net/spdy/write_blocked_list.h deleted file mode 100644 index c7d278ea..0000000 --- a/net/spdy/write_blocked_list.h +++ /dev/null
@@ -1,195 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef NET_SPDY_WRITE_BLOCKED_LIST_H_ -#define NET_SPDY_WRITE_BLOCKED_LIST_H_ - -#include <stddef.h> - -#include <algorithm> -#include <deque> -#include <unordered_map> - -#include "base/logging.h" -#include "net/spdy/spdy_bug_tracker.h" -#include "net/spdy/spdy_protocol.h" - -namespace net { - -namespace test { -class WriteBlockedListPeer; -} // namespace test - -template <typename IdType> -class WriteBlockedList { - public: - // 0(1) size lookup. 0(1) insert at front or back. - typedef std::deque<IdType> BlockedList; - typedef typename BlockedList::iterator iterator; - - WriteBlockedList() {} - - static SpdyPriority ClampPriority(SpdyPriority priority) { - if (priority < kV3HighestPriority) { - SPDY_BUG << "Invalid priority: " << static_cast<int>(priority); - return kV3HighestPriority; - } - if (priority > kV3LowestPriority) { - SPDY_BUG << "Invalid priority: " << static_cast<int>(priority); - return kV3LowestPriority; - } - return priority; - } - - // Returns the priority of the highest priority list with sessions on it. - SpdyPriority GetHighestPriorityWriteBlockedList() const { - for (SpdyPriority i = 0; i <= kV3LowestPriority; ++i) { - if (write_blocked_lists_[i].size() > 0) { - return i; - } - } - SPDY_BUG << "No blocked streams"; - return kV3HighestPriority; - } - - IdType PopFront(SpdyPriority priority) { - priority = ClampPriority(priority); - DCHECK(!write_blocked_lists_[priority].empty()); - IdType stream_id = write_blocked_lists_[priority].front(); - write_blocked_lists_[priority].pop_front(); - stream_to_priority_.erase(stream_id); - return stream_id; - } - - bool HasWriteBlockedStreamsGreaterThanPriority(SpdyPriority priority) const { - priority = ClampPriority(priority); - for (SpdyPriority i = kV3HighestPriority; i < priority; ++i) { - if (!write_blocked_lists_[i].empty()) { - return true; - } - } - return false; - } - - bool HasWriteBlockedStreams() const { - for (SpdyPriority i = kV3HighestPriority; i <= kV3LowestPriority; ++i) { - if (!write_blocked_lists_[i].empty()) { - return true; - } - } - return false; - } - - // Add this stream to the back of the write blocked list for this priority - // level. If the stream is already on that write blocked list this is a - // no-op. If the stream is on a write blocked list for a different priority - // it will be removed from that list. - void PushBack(IdType stream_id, SpdyPriority priority) { - AddStream(stream_id, priority, true); - } - - // Add this stream to the front of the write blocked list for this priority - // level. If the stream is already on that write blocked list this is a - // no-op. If the stream is on a write blocked list for a different priority - // it will be removed from that list. - void PushFront(IdType stream_id, SpdyPriority priority) { - AddStream(stream_id, priority, false); - } - - bool RemoveStreamFromWriteBlockedList(IdType stream_id, - SpdyPriority priority) { - typename StreamToPriorityMap::iterator iter = - stream_to_priority_.find(stream_id); - if (iter == stream_to_priority_.end()) { - // The stream is not present in the write blocked list. - return false; - } else if (iter->second == priority) { - stream_to_priority_.erase(iter); - } else { - // The stream is not present at the specified priority level. - return false; - } - // We shouldn't really add a stream_id to a list multiple times, - // but under some conditions it does happen. Doing a check in PushBack - // would be too costly, so instead we check here to eliminate duplicates. - bool found = false; - iterator it = std::find(write_blocked_lists_[priority].begin(), - write_blocked_lists_[priority].end(), stream_id); - while (it != write_blocked_lists_[priority].end()) { - found = true; - iterator next_it = write_blocked_lists_[priority].erase(it); - it = std::find(next_it, write_blocked_lists_[priority].end(), stream_id); - } - return found; - } - - void UpdateStreamPriorityInWriteBlockedList(IdType stream_id, - SpdyPriority old_priority, - SpdyPriority new_priority) { - if (old_priority == new_priority) { - return; - } - bool found = RemoveStreamFromWriteBlockedList(stream_id, old_priority); - if (found) { - PushBack(stream_id, new_priority); - } - } - - size_t NumBlockedStreams() const { - size_t num_blocked_streams = 0; - for (SpdyPriority i = kV3HighestPriority; i <= kV3LowestPriority; ++i) { - num_blocked_streams += write_blocked_lists_[i].size(); - } - return num_blocked_streams; - } - - size_t NumBlockedStreams(SpdyPriority priority) const { - priority = ClampPriority(priority); - return write_blocked_lists_[priority].size(); - } - - private: - friend class net::test::WriteBlockedListPeer; - - using StreamToPriorityMap = std::unordered_map<IdType, SpdyPriority>; - - void AddStream(IdType stream_id, SpdyPriority priority, bool push_back) { - priority = ClampPriority(priority); - DVLOG(2) << "Adding stream " << stream_id << " at priority " - << static_cast<int>(priority); - bool should_insert_stream = true; - typename StreamToPriorityMap::iterator iter = - stream_to_priority_.find(stream_id); - // Ensure the stream is not in the write blocked list multiple times. - if (iter != stream_to_priority_.end()) { - DVLOG(1) << "Stream " << stream_id << " already in write blocked list."; - if (iter->second == priority) { - // The stream is already in the write blocked list for the priority. - // It will not be inserted again but will retain its place in the list. - should_insert_stream = false; - } else { - // The stream is in a write blocked list for a different priority. - // Remove it from that list and allow it to be added to the list for - // this priority. - bool removed = - RemoveStreamFromWriteBlockedList(stream_id, iter->second); - DCHECK(removed); - } - } - if (should_insert_stream) { - stream_to_priority_[stream_id] = priority; - if (push_back) { - write_blocked_lists_[priority].push_back(stream_id); - } else { - write_blocked_lists_[priority].push_front(stream_id); - } - } - } - BlockedList write_blocked_lists_[kV3LowestPriority + 1]; - StreamToPriorityMap stream_to_priority_; -}; - -} // namespace net - -#endif // NET_SPDY_WRITE_BLOCKED_LIST_H_
diff --git a/net/spdy/write_blocked_list_test.cc b/net/spdy/write_blocked_list_test.cc deleted file mode 100644 index 933dc71..0000000 --- a/net/spdy/write_blocked_list_test.cc +++ /dev/null
@@ -1,146 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "net/spdy/write_blocked_list.h" - -#include <deque> - -#include "testing/gtest/include/gtest/gtest.h" - -namespace net { -namespace test { - -class WriteBlockedListPeer { - public: - static std::deque<int>* GetWriteBlockedList(int i, - WriteBlockedList<int>* list) { - return &list->write_blocked_lists_[i]; - } -}; - -namespace { - -typedef WriteBlockedList<int> IntWriteBlockedList; - -class WriteBlockedListTest : public ::testing::Test { - public: - IntWriteBlockedList list; -}; - -TEST_F(WriteBlockedListTest, GetHighestPriority) { - EXPECT_FALSE(list.HasWriteBlockedStreams()); - list.PushBack(1, 1); - EXPECT_TRUE(list.HasWriteBlockedStreams()); - EXPECT_EQ(1, list.GetHighestPriorityWriteBlockedList()); - list.PushBack(1, 0); - EXPECT_TRUE(list.HasWriteBlockedStreams()); - EXPECT_EQ(0, list.GetHighestPriorityWriteBlockedList()); -} - -TEST_F(WriteBlockedListTest, HasWriteBlockedStreamsOfGreaterThanPriority) { - list.PushBack(1, 4); - EXPECT_TRUE(list.HasWriteBlockedStreamsGreaterThanPriority(5)); - EXPECT_FALSE(list.HasWriteBlockedStreamsGreaterThanPriority(4)); - list.PushBack(2, 2); - EXPECT_TRUE(list.HasWriteBlockedStreamsGreaterThanPriority(3)); - EXPECT_FALSE(list.HasWriteBlockedStreamsGreaterThanPriority(2)); -} - -TEST_F(WriteBlockedListTest, RemoveStreamFromWriteBlockedList) { - list.PushBack(1, 4); - EXPECT_TRUE(list.HasWriteBlockedStreams()); - - list.RemoveStreamFromWriteBlockedList(1, 5); - EXPECT_TRUE(list.HasWriteBlockedStreams()); - - list.PushBack(2, 4); - list.PushBack(1, 4); - list.RemoveStreamFromWriteBlockedList(1, 4); - list.RemoveStreamFromWriteBlockedList(2, 4); - EXPECT_FALSE(list.HasWriteBlockedStreams()); - - list.PushBack(1, 7); - EXPECT_TRUE(list.HasWriteBlockedStreams()); -} - -TEST_F(WriteBlockedListTest, PopFront) { - list.PushBack(1, 4); - EXPECT_EQ(1u, list.NumBlockedStreams()); - list.PushBack(2, 4); - list.PushBack(1, 4); - list.PushBack(3, 4); - EXPECT_EQ(3u, list.NumBlockedStreams()); - - EXPECT_EQ(1, list.PopFront(4)); - EXPECT_EQ(2, list.PopFront(4)); - EXPECT_EQ(1u, list.NumBlockedStreams()); - EXPECT_EQ(3, list.PopFront(4)); -} - -TEST_F(WriteBlockedListTest, PushFront) { - list.PushFront(1, 4); - EXPECT_EQ(1u, list.NumBlockedStreams()); - list.PushFront(2, 4); - list.PushFront(1, 4); - list.PushFront(3, 4); - EXPECT_EQ(3u, list.NumBlockedStreams()); - - EXPECT_EQ(3, list.PopFront(4)); - EXPECT_EQ(2, list.PopFront(4)); - EXPECT_EQ(1u, list.NumBlockedStreams()); - EXPECT_EQ(1, list.PopFront(4)); -} - -TEST_F(WriteBlockedListTest, PushFrontAndBack) { - list.PushFront(1, 4); - list.PushBack(5, 4); - list.PushFront(2, 4); - list.PushBack(3, 4); - list.PushFront(4, 4); - - EXPECT_EQ(4, list.PopFront(4)); - EXPECT_EQ(2, list.PopFront(4)); - EXPECT_EQ(1, list.PopFront(4)); - EXPECT_EQ(5, list.PopFront(4)); - EXPECT_EQ(3, list.PopFront(4)); -} - -TEST_F(WriteBlockedListTest, UpdateStreamPriorityInWriteBlockedList) { - list.PushBack(1, 1); - list.PushBack(2, 2); - list.PushBack(3, 3); - list.PushBack(1, 3); // Re-prioritizes stream 1 at priority 3. - list.PushBack(1, 3); // No effect. - EXPECT_EQ(3u, list.NumBlockedStreams()); - EXPECT_EQ(0u, WriteBlockedListPeer::GetWriteBlockedList(1, &list)->size()); - EXPECT_EQ(1u, WriteBlockedListPeer::GetWriteBlockedList(2, &list)->size()); - EXPECT_EQ(2u, WriteBlockedListPeer::GetWriteBlockedList(3, &list)->size()); - - list.UpdateStreamPriorityInWriteBlockedList(1, 3, 2); - EXPECT_EQ(0u, WriteBlockedListPeer::GetWriteBlockedList(1, &list)->size()); - EXPECT_EQ(2u, WriteBlockedListPeer::GetWriteBlockedList(2, &list)->size()); - list.UpdateStreamPriorityInWriteBlockedList(3, 3, 1); - EXPECT_EQ(1u, WriteBlockedListPeer::GetWriteBlockedList(1, &list)->size()); - EXPECT_EQ(0u, WriteBlockedListPeer::GetWriteBlockedList(3, &list)->size()); - - // Redundant update. - list.UpdateStreamPriorityInWriteBlockedList(1, 2, 2); - EXPECT_EQ(2u, WriteBlockedListPeer::GetWriteBlockedList(2, &list)->size()); - - // No entries for given stream_id / old_priority pair. - list.UpdateStreamPriorityInWriteBlockedList(4, 4, 1); - EXPECT_EQ(1u, WriteBlockedListPeer::GetWriteBlockedList(1, &list)->size()); - EXPECT_EQ(2u, WriteBlockedListPeer::GetWriteBlockedList(2, &list)->size()); - EXPECT_EQ(0u, WriteBlockedListPeer::GetWriteBlockedList(4, &list)->size()); - - EXPECT_EQ(3, list.PopFront(1)); - EXPECT_EQ(2, list.PopFront(2)); - EXPECT_EQ(1, list.PopFront(2)); - EXPECT_EQ(0u, list.NumBlockedStreams()); -} - -} // namespace - -} // namespace test -} // namespace net
diff --git a/net/tools/quic/quic_client_session_test.cc b/net/tools/quic/quic_client_session_test.cc index 25eaa19..d463e87 100644 --- a/net/tools/quic/quic_client_session_test.cc +++ b/net/tools/quic/quic_client_session_test.cc
@@ -6,12 +6,12 @@ #include <vector> -#include "base/strings/stringprintf.h" #include "net/quic/core/crypto/aes_128_gcm_12_encrypter.h" #include "net/quic/core/quic_flags.h" #include "net/quic/core/spdy_utils.h" #include "net/quic/platform/api/quic_ptr_util.h" #include "net/quic/platform/api/quic_socket_address.h" +#include "net/quic/platform/api/quic_str_cat.h" #include "net/quic/test_tools/crypto_test_utils.h" #include "net/quic/test_tools/mock_quic_spdy_client_stream.h" #include "net/quic/test_tools/quic_config_peer.h" @@ -23,7 +23,6 @@ #include "testing/gtest/include/gtest/gtest.h" using google::protobuf::implicit_cast; -using base::StringPrintf; using std::string; using testing::AnyNumber; using testing::Invoke; @@ -407,7 +406,7 @@ TEST_P(QuicClientSessionTest, ReceivingPromiseEnhanceYourCalm) { for (size_t i = 0u; i < session_->get_max_promises(); i++) { - push_promise_[":path"] = StringPrintf("/bar%zu", i); + push_promise_[":path"] = QuicStringPrintf("/bar%zu", i); QuicStreamId id = promised_stream_id_ + i * 2; @@ -421,7 +420,7 @@ // One more promise, this should be refused. int i = session_->get_max_promises(); - push_promise_[":path"] = StringPrintf("/bar%d", i); + push_promise_[":path"] = QuicStringPrintf("/bar%d", i); QuicStreamId id = promised_stream_id_ + i * 2; EXPECT_CALL(*connection_, SendRstStream(id, QUIC_REFUSED_STREAM, 0));
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc index bc0fb5b..5d90b396 100644 --- a/pdf/out_of_process_instance.cc +++ b/pdf/out_of_process_instance.cc
@@ -747,6 +747,12 @@ return; int char_count = engine_->GetCharCount(page_index); + + // Treat a char count of -1 (error) as 0 (an empty page), since + // other pages might have valid content. + if (char_count < 0) + char_count = 0; + PP_PrivateAccessibilityPageInfo page_info; page_info.page_index = page_index; page_info.bounds = engine_->GetPageBoundsRect(page_index);
diff --git a/remoting/resources/remoting_strings.grd b/remoting/resources/remoting_strings.grd index ebbf7f6..e8c9bf89 100644 --- a/remoting/resources/remoting_strings.grd +++ b/remoting/resources/remoting_strings.grd
@@ -646,6 +646,7 @@ For information about privacy, please see the Google Privacy Policy (http://goo.gl/SyrVzj) and the Chrome Privacy Policy (http://goo.gl/0uXE5d). </message> <message name="IDS_PLAY_STORE_CHANGES" desc="List of what's changed in this release of Chrome Remote Desktop for Android. [CHAR-LIMIT=500] [NAME=play_store_changes]"> +• Added Multi-Window support for Android Nougat. • Improved desktop image quality, responsiveness, and battery consumption. • Improved responsiveness of click-drag operations. • Improved several UI animation effects.
diff --git a/services/BUILD.gn b/services/BUILD.gn index abb7af6..ddb175f1 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn
@@ -2,21 +2,35 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//services/catalog/public/tools/catalog.gni") +import("//services/service_manager/public/tools/test/service_test.gni") import("//testing/test.gni") # One Big Target for services to register their unit test sources. This exists # to avoid having to maintain a separate test binary for every service. # # To add tests for a new service, please define a "tests" source_set in the -# service subdirectory and add it as a dependency here. -test("service_unittests") { +# service subdirectory and add it as a dependency here. If your unit tests +# use the ServiceTest framework, you must also include corresponding catalog +# entries in the "service_unittests_catalog" target below. +service_test("service_unittests") { deps = [ "//services/image_decoder:tests", - "//services/test:run_all_unittests", ] if (is_android) { # Some tests need to initialize V8. deps += [ "//v8:v8_external_startup_data_assets" ] + } else { + # NOTE: We do not currently support standalone service binaries on Android, + # so any tests which use the ServiceTest framework to connect to standalone + # services must be added here. + deps += [ "//services/video_capture:tests" ] } + + catalog = ":service_unittests_catalog" +} + +catalog("service_unittests_catalog") { + catalog_deps = [ "//services/video_capture:tests_catalog" ] }
diff --git a/services/service_manager/public/cpp/lib/interface_registry.cc b/services/service_manager/public/cpp/lib/interface_registry.cc index 2808f899..6367f1b 100644 --- a/services/service_manager/public/cpp/lib/interface_registry.cc +++ b/services/service_manager/public/cpp/lib/interface_registry.cc
@@ -4,6 +4,7 @@ #include "services/service_manager/public/cpp/interface_registry.h" +#include <iterator> #include <sstream> #include "base/memory/ptr_util.h"
diff --git a/services/service_manager/standalone/context.cc b/services/service_manager/standalone/context.cc index e2ef480..5b38d528 100644 --- a/services/service_manager/standalone/context.cc +++ b/services/service_manager/standalone/context.cc
@@ -16,6 +16,7 @@ #include "base/json/json_file_value_serializer.h" #include "base/macros.h" #include "base/memory/ptr_util.h" +#include "base/message_loop/message_loop.h" #include "base/path_service.h" #include "base/process/process_info.h" #include "base/strings/string_number_conversions.h"
diff --git a/services/test/BUILD.gn b/services/test/BUILD.gn deleted file mode 100644 index bd22d3a..0000000 --- a/services/test/BUILD.gn +++ /dev/null
@@ -1,17 +0,0 @@ -# Copyright 2017 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -source_set("run_all_unittests") { - testonly = true - - sources = [ - "run_all_unittests.cc", - ] - - deps = [ - "//base", - "//base/test:test_support", - "//mojo/edk/system", - ] -}
diff --git a/services/test/run_all_unittests.cc b/services/test/run_all_unittests.cc deleted file mode 100644 index 9822c38..0000000 --- a/services/test/run_all_unittests.cc +++ /dev/null
@@ -1,27 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/message_loop/message_loop.h" -#include "base/test/launcher/unit_test_launcher.h" -#include "base/test/test_suite.h" -#include "base/threading/thread.h" -#include "mojo/edk/embedder/embedder.h" -#include "mojo/edk/embedder/scoped_ipc_support.h" - -int main(int argc, char** argv) { - base::TestSuite test_suite(argc, argv); - - mojo::edk::Init(); - - base::Thread ipc_thread("IPC thread"); - ipc_thread.StartWithOptions( - base::Thread::Options(base::MessageLoop::TYPE_IO, 0)); - mojo::edk::ScopedIPCSupport ipc_support( - ipc_thread.task_runner(), - mojo::edk::ScopedIPCSupport::ShutdownPolicy::CLEAN); - - return base::LaunchUnitTests( - argc, argv, - base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); -}
diff --git a/services/video_capture/BUILD.gn b/services/video_capture/BUILD.gn index c6a60f8..1fc606e 100644 --- a/services/video_capture/BUILD.gn +++ b/services/video_capture/BUILD.gn
@@ -47,7 +47,9 @@ ] } -service_test("video_capture_unittests") { +source_set("tests") { + testonly = true + sources = [ "test/fake_device_descriptor_test.cc", "test/fake_device_descriptor_test.h", @@ -67,8 +69,6 @@ "test/service_unittest.cc", ] - catalog = ":video_capture_unittests_catalog" - deps = [ ":lib", ":video_capture", @@ -80,6 +80,10 @@ "//testing/gtest", "//ui/gfx:test_support", ] + + data_deps = [ + ":video_capture", + ] } service_manifest("unittest_manifest") { @@ -87,7 +91,7 @@ source = "test/service_unittest_manifest.json" } -catalog("video_capture_unittests_catalog") { +catalog("tests_catalog") { embedded_services = [ ":unittest_manifest" ] standalone_services = [ ":manifest" ] }
diff --git a/services/video_capture/device_factory_media_to_mojo_adapter.cc b/services/video_capture/device_factory_media_to_mojo_adapter.cc index d15c424..6e6b92d3 100644 --- a/services/video_capture/device_factory_media_to_mojo_adapter.cc +++ b/services/video_capture/device_factory_media_to_mojo_adapter.cc
@@ -8,6 +8,7 @@ #include "base/logging.h" #include "base/memory/ptr_util.h" +#include "base/stl_util.h" #include "base/strings/stringprintf.h" #include "media/capture/video/fake_video_capture_device.h" #include "mojo/public/cpp/bindings/strong_binding.h"
diff --git a/services/video_capture/test/fake_device_descriptor_unittest.cc b/services/video_capture/test/fake_device_descriptor_unittest.cc index e0120fe..401efe8 100644 --- a/services/video_capture/test/fake_device_descriptor_unittest.cc +++ b/services/video_capture/test/fake_device_descriptor_unittest.cc
@@ -16,10 +16,15 @@ MOCK_METHOD1(Run, void(mojom::DeviceAccessResultCode result_code)); }; +// This alias ensures test output is easily attributed to this service's tests. +// TODO(rockot/chfremer): Consider just renaming the type. +using FakeVideoCaptureDeviceDescriptorTest = FakeDeviceDescriptorTest; + // Tests that when requesting a second proxy for a device without closing the // first one, the service revokes access to the first one by closing the // connection. -TEST_F(FakeDeviceDescriptorTest, DISABLED_AccessIsRevokedOnSecondAccess) { +TEST_F(FakeVideoCaptureDeviceDescriptorTest, + DISABLED_AccessIsRevokedOnSecondAccess) { mojom::DevicePtr device_proxy_1; bool device_access_1_revoked = false; MockCreateDeviceProxyCallback create_device_proxy_callback_1; @@ -55,7 +60,8 @@ } // Tests that a second proxy requested for a device can be used successfully. -TEST_F(FakeDeviceDescriptorTest, DISABLED_CanUseSecondRequestedProxy) { +TEST_F(FakeVideoCaptureDeviceDescriptorTest, + DISABLED_CanUseSecondRequestedProxy) { mojom::DevicePtr device_proxy_1; factory_->CreateDevice( fake_device_descriptor_.device_id, mojo::MakeRequest(&device_proxy_1),
diff --git a/services/video_capture/test/fake_device_unittest.cc b/services/video_capture/test/fake_device_unittest.cc index b8751c8..11b107ed3 100644 --- a/services/video_capture/test/fake_device_unittest.cc +++ b/services/video_capture/test/fake_device_unittest.cc
@@ -10,7 +10,6 @@ #include "services/video_capture/public/interfaces/device_factory.mojom.h" #include "services/video_capture/test/fake_device_test.h" #include "services/video_capture/test/mock_receiver.h" -#include "services/video_capture/test/service_test.h" using testing::_; using testing::Invoke; @@ -30,7 +29,11 @@ namespace video_capture { -TEST_F(FakeDeviceTest, DISABLED_FrameCallbacksArrive) { +// This alias ensures test output is easily attributed to this service's tests. +// TODO(rockot/chfremer): Consider just renaming the type. +using FakeVideoCaptureDeviceTest = FakeDeviceTest; + +TEST_F(FakeVideoCaptureDeviceTest, DISABLED_FrameCallbacksArrive) { base::RunLoop wait_loop; // These two constants must be static as a workaround // for a MSVC++ bug about lambda captures, see the discussion at @@ -54,7 +57,8 @@ // Tests that frames received from a fake capture device match the requested // format and have increasing timestamps. -TEST_F(FakeDeviceTest, DISABLED_ReceiveFramesFromFakeCaptureDevice) { +TEST_F(FakeVideoCaptureDeviceTest, + DISABLED_ReceiveFramesFromFakeCaptureDevice) { base::RunLoop wait_loop; mojom::ReceiverPtr receiver_proxy; // These two constants must be static as a workaround
diff --git a/services/video_capture/test/mock_device_test.h b/services/video_capture/test/mock_device_test.h index 41e1693..4713861 100644 --- a/services/video_capture/test/mock_device_test.h +++ b/services/video_capture/test/mock_device_test.h
@@ -14,6 +14,10 @@ #include "services/video_capture/test/mock_receiver.h" #include "testing/gtest/include/gtest/gtest.h" +namespace base { +class MessageLoop; +} + namespace video_capture { class MockDevice : public media::VideoCaptureDevice {
diff --git a/services/video_capture/test/mock_device_unittest.cc b/services/video_capture/test/mock_device_unittest.cc index 40f36b4..b0f7d42 100644 --- a/services/video_capture/test/mock_device_unittest.cc +++ b/services/video_capture/test/mock_device_unittest.cc
@@ -10,9 +10,14 @@ namespace video_capture { +// This alias ensures test output is easily attributed to this service's tests. +// TODO(rockot/chfremer): Consider just renaming the type. +using MockVideoCaptureDeviceTest = MockDeviceTest; + // Tests that the service stops the capture device when the client closes the // connection to the device proxy. -TEST_F(MockDeviceTest, DISABLED_DeviceIsStoppedWhenDiscardingDeviceProxy) { +TEST_F(MockVideoCaptureDeviceTest, + DISABLED_DeviceIsStoppedWhenDiscardingDeviceProxy) { base::RunLoop wait_loop; // The mock device must hold on to the device client that is passed to it. @@ -34,7 +39,8 @@ // Tests that the service stops the capture device when the client closes the // connection to the client proxy it provided to the service. -TEST_F(MockDeviceTest, DISABLED_DeviceIsStoppedWhenDiscardingDeviceClient) { +TEST_F(MockVideoCaptureDeviceTest, + DISABLED_DeviceIsStoppedWhenDiscardingDeviceClient) { base::RunLoop wait_loop; // The mock device must hold on to the device client that is passed to it.
diff --git a/services/video_capture/test/service_unittest.cc b/services/video_capture/test/service_unittest.cc index cffddd9..9a59275 100644 --- a/services/video_capture/test/service_unittest.cc +++ b/services/video_capture/test/service_unittest.cc
@@ -15,9 +15,14 @@ namespace video_capture { +// This alias ensures test output is easily attributed to this service's tests. +// TODO(rockot/chfremer): Consider just renaming the type. +using VideoCaptureServiceTest = ServiceTest; + // Tests that an answer arrives from the service when calling // EnumerateDeviceDescriptors(). -TEST_F(ServiceTest, DISABLED_EnumerateDeviceDescriptorsCallbackArrives) { +TEST_F(VideoCaptureServiceTest, + DISABLED_EnumerateDeviceDescriptorsCallbackArrives) { base::RunLoop wait_loop; EXPECT_CALL(descriptor_receiver_, Run(_)) .Times(Exactly(1)) @@ -27,7 +32,7 @@ wait_loop.Run(); } -TEST_F(ServiceTest, DISABLED_FakeDeviceFactoryEnumeratesOneDevice) { +TEST_F(VideoCaptureServiceTest, DISABLED_FakeDeviceFactoryEnumeratesOneDevice) { base::RunLoop wait_loop; size_t num_devices_enumerated = 0; EXPECT_CALL(descriptor_receiver_, Run(_)) @@ -45,7 +50,8 @@ // Tests that VideoCaptureDeviceFactory::CreateDeviceProxy() returns an error // code when trying to create a device for an invalid descriptor. -TEST_F(ServiceTest, DISABLED_ErrorCodeOnCreateDeviceForInvalidDescriptor) { +TEST_F(VideoCaptureServiceTest, + DISABLED_ErrorCodeOnCreateDeviceForInvalidDescriptor) { const std::string invalid_device_id = "invalid"; base::RunLoop wait_loop; mojom::DevicePtr fake_device_proxy;
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 3b2e944..eeeca72 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -316,7 +316,10 @@ "enable_quick_answers": "true", "enable_translation": "true", "recent_scroll_duration_ms": "300" - } + }, + "enable_features": [ + "ContextualSearchSingleActions" + ] } ] } @@ -1199,6 +1202,26 @@ ] } ], + "NetProxyPreconnects": [ + { + "platforms": [ + "android", + "chromeos", + "ios", + "linux", + "mac", + "win" + ], + "experiments": [ + { + "name": "NetProxyPreconnects", + "params": { + "restrict_to_one_preconnect_for_proxies": "true" + } + } + ] + } + ], "NetworkQualityEstimator": [ { "platforms": [
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index 0c9dcf9..4fecd6a 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -875,9 +875,6 @@ crbug.com/490511 external/wpt/html/rendering/replaced-elements/embedded-content-rendering-rules/canvas-fallback.html [ Failure ] crbug.com/490511 external/wpt/html/semantics/document-metadata/styling/LinkStyle.html [ Failure Pass ] crbug.com/627706 external/wpt/html/semantics/embedded-content/the-img-element/invalid-src.html [ Skip ] -# MANIFEST.json contains Blink-style reference files. -crbug.com/268729 external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-expected.html [ Skip ] -crbug.com/268729 external/wpt/html/dom/elements/global-attributes/dir_auto-N-EN-expected.html [ Skip ] # MANIFEST.json contains any *-manual.*. https://github.com/w3c/web-platform-tests/issues/4137 Bug(github) external/wpt/uievents/keyboard/key-manual.css [ Skip ] Bug(github) external/wpt/uievents/keyboard/key-manual.js [ Skip ] @@ -939,6 +936,13 @@ crbug.com/655963 inspector/console/console-dir.html [ NeedsManualRebaseline ] +crbug.com/665820 http/tests/serviceworker/clients-matchall-client-types.html [ Pass Failure ] +crbug.com/665820 http/tests/serviceworker/clients-get-client-types.html [ Pass Failure ] +crbug.com/665820 virtual/mojo-loading/http/tests/serviceworker/clients-matchall-client-types.html [ Pass Failure ] +crbug.com/665820 virtual/mojo-loading/http/tests/serviceworker/clients-get-client-types.html [ Pass Failure ] +crbug.com/665820 virtual/service-worker-navigation-preload/http/tests/serviceworker/clients-get-client-types.html [ Pass Failure ] +crbug.com/665820 virtual/service-worker-navigation-preload/http/tests/serviceworker/clients-matchall-client-types.html [ Pass Failure ] + crbug.com/405389 external/csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-017.html [ Failure ] crbug.com/424365 external/csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-010.html [ Failure ] crbug.com/424365 external/csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-024.html [ Failure ] @@ -2221,7 +2225,6 @@ crbug.com/663874 virtual/mojo-loading/http/tests/fetch/window/thorough/redirect-password-other-https.html [ Pass Failure ] crbug.com/663874 virtual/mojo-loading/http/tests/fetch/window/thorough/scheme-blob.html [ Pass Failure ] crbug.com/663874 virtual/mojo-loading/http/tests/fetch/window/thorough/scheme-data-other-https.html [ Pass Failure ] -crbug.com/671477 virtual/mojo-loading/http/tests/inspector/debugger/fetch-breakpoints.html [ Pass Failure ] crbug.com/663876 virtual/mojo-loading/http/tests/loading/doc-write-sync-third-party-script-block-effectively-2g.html [ Pass Failure ] crbug.com/663877 virtual/mojo-loading/http/tests/media/video-load-suspend.html [ Pass Failure ] crbug.com/663879 virtual/mojo-loading/http/tests/misc/script-no-store.html [ Pass Failure ]
diff --git a/third_party/WebKit/LayoutTests/animations/composition/scale-composition.html b/third_party/WebKit/LayoutTests/animations/composition/scale-composition.html index 1080469..a473b09f 100644 --- a/third_party/WebKit/LayoutTests/animations/composition/scale-composition.html +++ b/third_party/WebKit/LayoutTests/animations/composition/scale-composition.html
@@ -31,5 +31,63 @@ {at: 1, is: '7 8 9'}, {at: 1.5, is: '8.5 7 4.5'}, ]); + +assertComposition({ + property: 'scale', + underlying: 'none', + addFrom: 'none', + replaceTo: '1.5', +}, [ + {at: -1, is: '0.5'}, + {at: 0, is: '1'}, + {at: 0.25, is: '1.125'}, + {at: 0.75, is: '1.375'}, + {at: 1, is: '1.5'}, + {at: 2, is: '2'}, +]); + +assertComposition({ + property: 'scale', + underlying: 'none', + addFrom: '4 5 6', + replaceTo: 'none', +}, [ + {at: -1, is: '7 9 11'}, + {at: 0, is: '4 5 6'}, + {at: 0.25, is: '3.25 4 4.75'}, + {at: 0.75, is: '1.75 2 2.25'}, + {at: 1, is: 'none'}, + {at: 2, is: '-2 -3 -4'}, +]); + +assertComposition({ + property: 'scale', + underlying: '1 2 3', + addFrom: 'none', + replaceTo: '7 8 9', +}, [ + {at: -0.5, is: '-2 -1 0'}, + {at: 0, is: '1 2 3'}, + {at: 0.25, is: '2.5 3.5 4.5'}, + {at: 0.5, is: '4 5 6'}, + {at: 0.75, is: '5.5 6.5 7.5'}, + {at: 1, is: '7 8 9'}, + {at: 1.5, is: '10 11 12'}, +]); + +assertComposition({ + property: 'scale', + underlying: '1 2 3', + addFrom: '4 5 6', + replaceTo: 'none', +}, [ + {at: -0.5, is: '5.5 14.5 26.5'}, + {at: 0, is: '4 10 18'}, + {at: 0.25, is: '3.25 7.75 13.75'}, + {at: 0.5, is: '2.5 5.5 9.5'}, + {at: 0.75, is: '1.75 3.25 5.25'}, + {at: 1, is: 'none'}, + {at: 1.5, is: '-0.5 -3.5 -7.5'}, +]); </script> </body>
diff --git a/third_party/WebKit/LayoutTests/animations/custom-properties/empty-initial-value-crash.html b/third_party/WebKit/LayoutTests/animations/custom-properties/empty-initial-value-crash.html new file mode 100644 index 0000000..efd5e5d --- /dev/null +++ b/third_party/WebKit/LayoutTests/animations/custom-properties/empty-initial-value-crash.html
@@ -0,0 +1,31 @@ +<script src="../../resources/testharness.js"></script> +<script src="../../resources/testharnessreport.js"></script> +<style> +#target { + --x: initial; +} +</style> +<div id="target"></div> +<script> +setup(() => { + CSS.registerProperty({name: '--x'}); +}); + +test(() => { + var animation = target.animate({'--x': 'test'}, 1); + assert_equals(getComputedStyle(target).getPropertyValue('--x'), ''); + animation.cancel(); +}, 'Do not crash when animating with an underlying value of initial'); + +test(() => { + var animation = target.animate({'--x': 'initial'}, {fill: 'forwards'}); + assert_equals(getComputedStyle(target).getPropertyValue('--x'), ''); + animation.cancel(); +}, 'Do not crash when animating an empty initial value'); + +test(() => { + var animation = target.animate({'--x': 'inherit'}, {fill: 'forwards'}); + assert_equals(getComputedStyle(target).getPropertyValue('--x'), ''); + animation.cancel(); +}, 'Do not crash when animating an inherited empty initial value'); +</script>
diff --git a/third_party/WebKit/LayoutTests/animations/interpolation/scale-interpolation.html b/third_party/WebKit/LayoutTests/animations/interpolation/scale-interpolation.html index 91b3f7b..e1807b284 100644 --- a/third_party/WebKit/LayoutTests/animations/interpolation/scale-interpolation.html +++ b/third_party/WebKit/LayoutTests/animations/interpolation/scale-interpolation.html
@@ -23,6 +23,19 @@ <script> assertInterpolation({ property: 'scale', + from: 'none', + to: '1.5', +}, [ + {at: -1, is: '0.5'}, + {at: 0, is: 'none'}, + {at: 0.25, is: '1.125'}, + {at: 0.75, is: '1.375'}, + {at: 1, is: '1.5'}, + {at: 2, is: '2'}, +]); + +assertInterpolation({ + property: 'scale', from: neutralKeyframe, to: '1.5', }, [ @@ -40,7 +53,7 @@ to: '1.5', }, [ {at: -1, is: '0.5'}, - {at: 0, is: '1'}, + {at: 0, is: 'none'}, {at: 0.25, is: '1.125'}, {at: 0.75, is: '1.375'}, {at: 1, is: '1.5'}, @@ -144,7 +157,7 @@ to: '2 0.5 1', }, [ {at: -1, is: '0 1.5'}, - {at: 0, is: '1'}, + {at: 0, is: 'none'}, {at: 0.25, is: '1.25 0.875'}, {at: 0.75, is: '1.75 0.625'}, {at: 1, is: '2 0.5'}, @@ -160,7 +173,7 @@ {at: 0, is: '2 0.5 1'}, {at: 0.25, is: '1.75 0.6251'}, {at: 0.75, is: '1.25 0.875'}, - {at: 1, is: '1 1 1'}, + {at: 1, is: 'none'}, {at: 2, is: '0 1.5'}, ]); @@ -170,7 +183,7 @@ to: 'inherit', }, [ {at: -1, is: '1.5 1 0'}, - {at: 0, is: '1'}, + {at: 0, is: 'none'}, {at: 0.25, is: '0.875 1 1.25'}, {at: 0.75, is: '0.625 1 1.75'}, {at: 1, is: '0.5 1 2'}, @@ -186,7 +199,7 @@ {at: 0, is: '0.5 1 2'}, {at: 0.25, is: '0.625 1 1.75'}, {at: 0.75, is: '0.875 1 1.25'}, - {at: 1, is: '1 1 1'}, + {at: 1, is: 'none'}, {at: 2, is: '1.5 1 0'}, ]); </script>
diff --git a/third_party/WebKit/LayoutTests/bluetooth/characteristic/writeValue/write-succeeds.html b/third_party/WebKit/LayoutTests/bluetooth/characteristic/writeValue/write-succeeds.html index 5c27141..cf72442 100644 --- a/third_party/WebKit/LayoutTests/bluetooth/characteristic/writeValue/write-succeeds.html +++ b/third_party/WebKit/LayoutTests/bluetooth/characteristic/writeValue/write-succeeds.html
@@ -5,6 +5,8 @@ <script> 'use strict'; promise_test(() => { + let length = 1; + let characteristic; return setBluetoothFakeAdapter('HeartRateAdapter') .then(() => requestDeviceWithKeyDown({ filters: [{services: ['heart_rate']}], @@ -12,9 +14,9 @@ .then(device => device.gatt.connect()) .then(gattServer => gattServer.getPrimaryService('generic_access')) .then(service => service.getCharacteristic('gap.device_name')) - .then(characteristic => Promise.all([ - characteristic.writeValue(new Uint8Array(1 /* length */)), - characteristic.writeValue(new ArrayBuffer(1 /* length */)), - characteristic.writeValue(new DataView(new ArrayBuffer(1 /* length */)))])); + .then(c => characteristic = c) + .then(() => characteristic.writeValue(new Uint8Array(length))) + .then(() => characteristic.writeValue(new ArrayBuffer(length))) + .then(() => characteristic.writeValue(new DataView(new ArrayBuffer(length)))); }, 'A regular write request to a writable characteristic should succeed.'); </script>
diff --git a/third_party/WebKit/LayoutTests/editing/pasteboard/data-transfer-items-image-png-details.html b/third_party/WebKit/LayoutTests/editing/pasteboard/data-transfer-items-image-png-details.html new file mode 100644 index 0000000..46b668ae --- /dev/null +++ b/third_party/WebKit/LayoutTests/editing/pasteboard/data-transfer-items-image-png-details.html
@@ -0,0 +1,51 @@ +<!DOCTYPE html> +<title>Clipboard: getAsFile() returns File for image</title> +<script src="../../resources/testharness.js"></script> +<script src="../../resources/testharnessreport.js"></script> +<style> + .hidden { display: none; } +</style> +<div id=instructions class=hidden> + This file tests the image pasting functionality of + DataTransferItems. To try the test manually, right-click on the + image > Copy Image, click anywhere in the background of the main + page and paste. +</div> +<iframe id="src" src="resources/mozilla.gif"></iframe><br> +<script> +async_test(t => { + window.addEventListener('load', () => { + document.body.addEventListener('paste', t.step_func(e => { + const items = e.clipboardData.items; + assert_true(Array.from(items).some(i => i.kind === 'file'), + 'A file should be present in the data'); + for (let i = 0; i < items.length; ++i) { + if (items[i].kind == 'file') { + const file = items[i].getAsFile(); + assert_class_string(file, 'File', 'IDL type should be File'); + assert_equals(file.type, 'image/png', 'MIME type should be PNG'); + assert_equals(file.name, 'image.png', 'File name should be generic'); + + // Allow for clock skew between script engine and DOM, NTP + // updates, slow test bots, etc. See https://crbug.com/324110 + const slop_ms = 60 * 60 * 1000; + assert_approx_equals(file.lastModified, Date.now(), slop_ms, + 'Should be newish'); + t.done(); + return; + } + } + })); + + try { + const srcElement = document.getElementById('src'); + srcElement.contentWindow.document.execCommand('copy'); + document.execCommand('paste'); + } catch (ex) { + // Fails in browser due to cross-origin restriction when run + // locally via file: so show manual instructions. + document.body.querySelector('#instructions').classList.remove('hidden'); + } + }); +}, 'DataTransferObject.getAsFile() returns File for image pastes'); +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/MANIFEST.json b/third_party/WebKit/LayoutTests/external/wpt/MANIFEST.json index 37e5ab9..f841bc2 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/MANIFEST.json +++ b/third_party/WebKit/LayoutTests/external/wpt/MANIFEST.json
@@ -741,18 +741,6 @@ {} ] ], - "html/dom/elements/global-attributes/dir_auto-N-EN-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-N-EN-expected.html", - [ - [ - "/html/dom/elements/global-attributes/dir_auto-N-EN-L-ref.html", - "==" - ] - ], - {} - ] - ], "html/dom/elements/global-attributes/dir_auto-N-EN.html": [ [ "/html/dom/elements/global-attributes/dir_auto-N-EN.html", @@ -1281,18 +1269,6 @@ {} ] ], - "html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-expected.html", - [ - [ - "/html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs-ref.html", - "==" - ] - ], - {} - ] - ], "html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs.html": [ [ "/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs.html", @@ -3769,6 +3745,11 @@ {} ] ], + "./MANIFEST.json": [ + [ + {} + ] + ], "./README.md": [ [ {} @@ -5294,6 +5275,16 @@ {} ] ], + "fullscreen/api/document-exit-fullscreen-twice-manual-expected.txt": [ + [ + {} + ] + ], + "fullscreen/api/document-fullscreen-element-manual-expected.txt": [ + [ + {} + ] + ], "fullscreen/api/element-ready-check-fullscreen-iframe-child-manual-expected.txt": [ [ {} @@ -5304,11 +5295,36 @@ {} ] ], + "fullscreen/api/element-request-fullscreen-and-move-manual-expected.txt": [ + [ + {} + ] + ], + "fullscreen/api/element-request-fullscreen-and-move-to-iframe-manual-expected.txt": [ + [ + {} + ] + ], + "fullscreen/api/element-request-fullscreen-and-remove-iframe-manual-expected.txt": [ + [ + {} + ] + ], + "fullscreen/api/element-request-fullscreen-and-remove-manual-expected.txt": [ + [ + {} + ] + ], "fullscreen/api/element-request-fullscreen-timing-manual-expected.txt": [ [ {} ] ], + "fullscreen/api/element-request-fullscreen-twice-manual-expected.txt": [ + [ + {} + ] + ], "fullscreen/api/element-request-fullscreen-two-elements-manual-expected.txt": [ [ {} @@ -7049,11 +7065,6 @@ {} ] ], - "html/dom/elements/global-attributes/dir_auto-N-EN-ref-expected.html": [ - [ - {} - ] - ], "html/dom/elements/global-attributes/dir_auto-N-L-ref.html": [ [ {} @@ -7234,86 +7245,41 @@ {} ] ], - "html/dom/elements/global-attributes/dir_auto-pre-N-EN-expected.html": [ - [ - {} - ] - ], "html/dom/elements/global-attributes/dir_auto-pre-N-EN-ref.html": [ [ {} ] ], - "html/dom/elements/global-attributes/dir_auto-pre-N-between-Rs-expected.html": [ - [ - {} - ] - ], "html/dom/elements/global-attributes/dir_auto-pre-N-between-Rs-ref.html": [ [ {} ] ], - "html/dom/elements/global-attributes/dir_auto-pre-mixed-expected.html": [ - [ - {} - ] - ], "html/dom/elements/global-attributes/dir_auto-pre-mixed-ref.html": [ [ {} ] ], - "html/dom/elements/global-attributes/dir_auto-textarea-N-EN-expected.html": [ - [ - {} - ] - ], "html/dom/elements/global-attributes/dir_auto-textarea-N-EN-ref.html": [ [ {} ] ], - "html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs-expected.html": [ - [ - {} - ] - ], "html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs-ref.html": [ [ {} ] ], - "html/dom/elements/global-attributes/dir_auto-textarea-mixed-expected.html": [ - [ - {} - ] - ], "html/dom/elements/global-attributes/dir_auto-textarea-mixed-ref.html": [ [ {} ] ], - "html/dom/elements/global-attributes/dir_auto-textarea-script-N-EN-expected.html": [ - [ - {} - ] - ], "html/dom/elements/global-attributes/dir_auto-textarea-script-N-EN-ref.html": [ [ {} ] ], - "html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-ref-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-textarea-script-mixed-expected.html": [ - [ - {} - ] - ], "html/dom/elements/global-attributes/dir_auto-textarea-script-mixed-ref.html": [ [ {} @@ -7324,11 +7290,6 @@ {} ] ], - "html/dom/elements/global-attributes/lang-xyzzy-expected.html": [ - [ - {} - ] - ], "html/dom/elements/global-attributes/lang-xyzzy-ref.html": [ [ {} @@ -7364,141 +7325,6 @@ {} ] ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b-expected.html": [ - [ - {} - ] - ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c-expected.html": [ - [ - {} - ] - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-001-ref.html": [ [ {} @@ -11614,41 +11440,6 @@ {} ] ], - "html/editing/the-hidden-attribute/hidden-1a-expected.html": [ - [ - {} - ] - ], - "html/editing/the-hidden-attribute/hidden-1b-expected.html": [ - [ - {} - ] - ], - "html/editing/the-hidden-attribute/hidden-1c-expected.html": [ - [ - {} - ] - ], - "html/editing/the-hidden-attribute/hidden-1d-expected.html": [ - [ - {} - ] - ], - "html/editing/the-hidden-attribute/hidden-1e-expected.html": [ - [ - {} - ] - ], - "html/editing/the-hidden-attribute/hidden-1f-expected.html": [ - [ - {} - ] - ], - "html/editing/the-hidden-attribute/hidden-1g-expected.html": [ - [ - {} - ] - ], "html/editing/the-hidden-attribute/hidden-2-ref.svg": [ [ {} @@ -11744,46 +11535,16 @@ {} ] ], - "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-expected.html": [ - [ - {} - ] - ], "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html": [ [ {} ] ], - "html/rendering/bindings/the-select-element-0/option-label-expected.html": [ - [ - {} - ] - ], "html/rendering/bindings/the-select-element-0/option-label-ref.html": [ [ {} ] ], - "html/rendering/bindings/the-textarea-element-0/cols-default-expected.html": [ - [ - {} - ] - ], - "html/rendering/bindings/the-textarea-element-0/cols-zero-expected.html": [ - [ - {} - ] - ], - "html/rendering/bindings/the-textarea-element-0/rows-default-expected.html": [ - [ - {} - ] - ], - "html/rendering/bindings/the-textarea-element-0/rows-zero-expected.html": [ - [ - {} - ] - ], "html/rendering/bindings/the-textarea-element-0/textarea-ref.html": [ [ {} @@ -11794,11 +11555,6 @@ {} ] ], - "html/rendering/non-replaced-elements/flow-content-0/div-align-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/flow-content-0/div-align-ref.html": [ [ {} @@ -11814,206 +11570,46 @@ {} ] ], - "html/rendering/non-replaced-elements/lists/li-type-supported-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/lists/li-type-supported-ref.html": [ [ {} ] ], - "html/rendering/non-replaced-elements/lists/li-type-supported-xhtml-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-alpha-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-roman-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/lists/li-type-unsupported-ref.html": [ [ {} ] ], - "html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-alpha-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-roman-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ol-type-supported-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/lists/ol-type-supported-ref.html": [ [ {} ] ], - "html/rendering/non-replaced-elements/lists/ol-type-supported-xhtml-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-circle-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-disc-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-roman-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-none-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html": [ [ {} ] ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-round-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-square-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-alpha-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-roman-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ul-type-supported-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/lists/ul-type-supported-ref.html": [ [ {} ] ], - "html/rendering/non-replaced-elements/lists/ul-type-supported-xhtml-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-decimal-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-roman-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/lists/ul-type-unsupported-ref.html": [ [ {} ] ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-alpha-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-roman-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-a-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-q-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-ref.html": [ [ {} ] ], - "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-s-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-x-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/tables/table-border-1-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/tables/table-border-1-ref.html": [ [ {} ] ], - "html/rendering/non-replaced-elements/tables/table-border-2-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/tables/table-border-2-notref.html": [ [ {} @@ -12024,26 +11620,11 @@ {} ] ], - "html/rendering/non-replaced-elements/tables/table-cell-width-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/tables/table-cell-width-ref.html": [ [ {} ] ], - "html/rendering/non-replaced-elements/tables/table-cell-width-s-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/tables/table-layout-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/tables/table-layout-notref.html": [ [ {} @@ -12054,66 +11635,31 @@ {} ] ], - "html/rendering/non-replaced-elements/tables/table-width-150percent-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/tables/table-width-150percent-ref.html": [ [ {} ] ], - "html/rendering/non-replaced-elements/tables/table-width-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/tables/table-width-ref.html": [ [ {} ] ], - "html/rendering/non-replaced-elements/tables/table-width-s-expected.html": [ - [ - {} - ] - ], - "html/rendering/non-replaced-elements/the-fieldset-element-0/min-width-not-important-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/the-fieldset-element-0/ref.html": [ [ {} ] ], - "html/rendering/non-replaced-elements/the-hr-element-0/align-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/the-hr-element-0/align-ref.html": [ [ {} ] ], - "html/rendering/non-replaced-elements/the-hr-element-0/color-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/the-hr-element-0/color-ref.html": [ [ {} ] ], - "html/rendering/non-replaced-elements/the-hr-element-0/width-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/the-hr-element-0/width-ref.html": [ [ {} @@ -12124,11 +11670,6 @@ {} ] ], - "html/rendering/non-replaced-elements/the-page/body_text_00ffff-expected.html": [ - [ - {} - ] - ], "html/rendering/non-replaced-elements/the-page/body_text_00ffff-ref.html": [ [ {} @@ -12139,11 +11680,6 @@ {} ] ], - "html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-dim-expected.html": [ - [ - {} - ] - ], "html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-dim-ref.html": [ [ {} @@ -12174,41 +11710,21 @@ {} ] ], - "html/rendering/replaced-elements/embedded-content-rendering-rules/canvas-fallback-expected.html": [ - [ - {} - ] - ], "html/rendering/replaced-elements/embedded-content-rendering-rules/canvas-fallback-ref.html": [ [ {} ] ], - "html/rendering/replaced-elements/embedded-content-rendering-rules/canvas_scale-expected.html": [ - [ - {} - ] - ], "html/rendering/replaced-elements/embedded-content-rendering-rules/canvas_scale_ref.html": [ [ {} ] ], - "html/rendering/replaced-elements/embedded-content-rendering-rules/canvas_without_context_a-expected.html": [ - [ - {} - ] - ], "html/rendering/replaced-elements/embedded-content-rendering-rules/canvas_without_context_ref.html": [ [ {} ] ], - "html/rendering/replaced-elements/images/space-expected.html": [ - [ - {} - ] - ], "html/rendering/replaced-elements/images/space-ref.html": [ [ {} @@ -12309,31 +11825,16 @@ {} ] ], - "html/semantics/document-metadata/the-link-element/stylesheet-empty-href-expected.html": [ - [ - {} - ] - ], "html/semantics/document-metadata/the-link-element/stylesheet-empty-href-ref.html": [ [ {} ] ], - "html/semantics/document-metadata/the-link-element/stylesheet-media-expected.html": [ - [ - {} - ] - ], "html/semantics/document-metadata/the-link-element/stylesheet-media-ref.html": [ [ {} ] ], - "html/semantics/document-metadata/the-link-element/stylesheet-with-base-expected.html": [ - [ - {} - ] - ], "html/semantics/document-metadata/the-link-element/stylesheet-with-base-ref.html": [ [ {} @@ -12364,11 +11865,6 @@ {} ] ], - "html/semantics/document-metadata/the-style-element/html_style_in_comment-expected.html": [ - [ - {} - ] - ], "html/semantics/document-metadata/the-style-element/html_style_in_comment-ref.html": [ [ {} @@ -12589,11 +12085,6 @@ {} ] ], - "html/semantics/embedded-content/the-embed-element/embed-represent-nothing-01-expected.html": [ - [ - {} - ] - ], "html/semantics/embedded-content/the-embed-element/embed-represent-nothing-ref.html": [ [ {} @@ -12629,11 +12120,6 @@ {} ] ], - "html/semantics/embedded-content/the-iframe-element/iframe-with-base-expected.html": [ - [ - {} - ] - ], "html/semantics/embedded-content/the-iframe-element/iframe-with-base-ref.html": [ [ {} @@ -12934,11 +12420,6 @@ {} ] ], - "html/semantics/forms/the-input-element/image01-expected.html": [ - [ - {} - ] - ], "html/semantics/forms/the-input-element/image01-ref.html": [ [ {} @@ -13109,36 +12590,6 @@ {} ] ], - "html/semantics/grouping-content/the-ol-element/reversed-1a-expected.html": [ - [ - {} - ] - ], - "html/semantics/grouping-content/the-ol-element/reversed-1b-expected.html": [ - [ - {} - ] - ], - "html/semantics/grouping-content/the-ol-element/reversed-1c-expected.html": [ - [ - {} - ] - ], - "html/semantics/grouping-content/the-ol-element/reversed-1d-expected.html": [ - [ - {} - ] - ], - "html/semantics/grouping-content/the-ol-element/reversed-1e-expected.html": [ - [ - {} - ] - ], - "html/semantics/grouping-content/the-ol-element/reversed-2-expected.html": [ - [ - {} - ] - ], "html/semantics/grouping-content/the-ol-element/reversed-2-ref.html": [ [ {} @@ -13219,11 +12670,6 @@ {} ] ], - "html/semantics/links/linktypes/alternate-css-expected.html": [ - [ - {} - ] - ], "html/semantics/links/linktypes/alternate-css-ref.html": [ [ {} @@ -13589,196 +13035,91 @@ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-missing-pdf-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-missing-pdf-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-nested-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-nested-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-number-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-number-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-separate-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-separate-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-1-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-1-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-2-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-2-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-1-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-1-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-2-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-2-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-1-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-1-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-2-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-2-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-1-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-1-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-2-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-2-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-surrounding-run-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-surrounding-run-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-wrapped-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-wrapped-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-paragraph-level-container-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-paragraph-level-container-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-bdo-element/bdo-child-expected.html": [ - [ - {} - ] - ], - "html/semantics/text-level-semantics/the-bdo-element/bdo-ltr-expected.html": [ - [ - {} - ] - ], - "html/semantics/text-level-semantics/the-bdo-element/bdo-override-expected.html": [ - [ - {} - ] - ], - "html/semantics/text-level-semantics/the-bdo-element/bidi-001-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-bdo-element/bidi-001-ref.html": [ [ {} ] ], - "html/semantics/text-level-semantics/the-br-element/br-bidi-in-inline-ancestors-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-br-element/br-bidi-in-inline-ancestors-ref.html": [ [ {} @@ -13799,11 +13140,6 @@ {} ] ], - "html/semantics/text-level-semantics/the-wbr-element/wbr-element-expected.html": [ - [ - {} - ] - ], "html/semantics/text-level-semantics/the-wbr-element/wbr-element-ref.html": [ [ {} @@ -14729,11 +14065,6 @@ {} ] ], - "quirks-mode/historical/list-item-bullet-size-expected.html": [ - [ - {} - ] - ], "quirks-mode/historical/list-item-bullet-size-ref.html": [ [ {} @@ -15899,61 +15230,31 @@ {} ] ], - "shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest-expected.html": [ - [ - {} - ] - ], "shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest-ref.html": [ [ {} ] ], - "shadow-dom/untriaged/shadow-trees/reprojection/reprojection-001-expected.html": [ - [ - {} - ] - ], "shadow-dom/untriaged/shadow-trees/reprojection/reprojection-001-ref.html": [ [ {} ] ], - "shadow-dom/untriaged/shadow-trees/shadow-root-001-expected.html": [ - [ - {} - ] - ], "shadow-dom/untriaged/shadow-trees/shadow-root-001-ref.html": [ [ {} ] ], - "shadow-dom/untriaged/shadow-trees/shadow-root-002-expected.html": [ - [ - {} - ] - ], "shadow-dom/untriaged/shadow-trees/shadow-root-002-ref.html": [ [ {} ] ], - "shadow-dom/untriaged/shadow-trees/text-decoration-001-expected.html": [ - [ - {} - ] - ], "shadow-dom/untriaged/shadow-trees/text-decoration-001-ref.html": [ [ {} ] ], - "shadow-dom/untriaged/styles/not-apply-in-shadow-root-001-expected.html": [ - [ - {} - ] - ], "shadow-dom/untriaged/styles/not-apply-in-shadow-root-001-ref.html": [ [ {} @@ -16439,81 +15740,41 @@ {} ] ], - "svg/linking/reftests/href-a-element-attr-change-expected.html": [ - [ - {} - ] - ], "svg/linking/reftests/href-a-element-ref.html": [ [ {} ] ], - "svg/linking/reftests/href-feImage-element-expected.html": [ - [ - {} - ] - ], "svg/linking/reftests/href-feImage-element-ref.html": [ [ {} ] ], - "svg/linking/reftests/href-filter-element-expected.html": [ - [ - {} - ] - ], "svg/linking/reftests/href-filter-element-ref.html": [ [ {} ] ], - "svg/linking/reftests/href-gradient-element-expected.html": [ - [ - {} - ] - ], "svg/linking/reftests/href-gradient-element-ref.html": [ [ {} ] ], - "svg/linking/reftests/href-image-element-expected.html": [ - [ - {} - ] - ], "svg/linking/reftests/href-image-element-ref.html": [ [ {} ] ], - "svg/linking/reftests/href-pattern-element-expected.html": [ - [ - {} - ] - ], "svg/linking/reftests/href-pattern-element-ref.html": [ [ {} ] ], - "svg/linking/reftests/href-textPath-element-expected.html": [ - [ - {} - ] - ], "svg/linking/reftests/href-textPath-element-ref.html": [ [ {} ] ], - "svg/linking/reftests/href-use-element-expected.html": [ - [ - {} - ] - ], "svg/linking/reftests/href-use-element-ref.html": [ [ {} @@ -34660,416 +33921,6 @@ {} ] ] - }, - "visual": { - "html/dom/elements/global-attributes/dir_auto-EN-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-EN-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-N-EN-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-N-EN-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-N-EN-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-N-EN-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-N-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-N-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-N-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-N-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-contained-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-contained-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-contained-bdi-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-bdi-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-contained-bdi-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-bdi-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-contained-dir-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-dir-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-contained-dir-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-dir-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-contained-script-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-script-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-contained-script-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-script-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-contained-style-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-style-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-contained-style-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-style-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-contained-textarea-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-textarea-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-contained-textarea-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-textarea-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-EN-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-EN-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-EN-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-EN-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-N-EN-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-N-EN-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-N-EN-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-N-EN-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-N-EN-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-N-EN-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-N-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-N-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-N-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-N-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-script-EN-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-EN-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-script-EN-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-EN-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-script-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-EN-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-L-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-N-L-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-N-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-input-script-R-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-R-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/dir_auto-isolate-expected.html": [ - [ - "/html/dom/elements/global-attributes/dir_auto-isolate-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/lang-xmllang-01-expected.html": [ - [ - "/html/dom/elements/global-attributes/lang-xmllang-01-expected.html", - {} - ] - ], - "html/dom/elements/global-attributes/style-01-expected.html": [ - [ - "/html/dom/elements/global-attributes/style-01-expected.html", - {} - ] - ], - "html/rendering/non-replaced-elements/flow-content-0/figure-expected.html": [ - [ - "/html/rendering/non-replaced-elements/flow-content-0/figure-expected.html", - {} - ] - ], - "html/semantics/embedded-content/the-img-element/document-base-url-expected.html": [ - [ - "/html/semantics/embedded-content/the-img-element/document-base-url-expected.html", - {} - ] - ], - "html/semantics/forms/the-textarea-element/textarea-newline-bidi-expected.html": [ - [ - "/html/semantics/forms/the-textarea-element/textarea-newline-bidi-expected.html", - {} - ] - ], - "html/semantics/forms/the-textarea-element/wrap-reflect-1a-expected.html": [ - [ - "/html/semantics/forms/the-textarea-element/wrap-reflect-1a-expected.html", - {} - ] - ], - "html/semantics/forms/the-textarea-element/wrap-reflect-1b-expected.html": [ - [ - "/html/semantics/forms/the-textarea-element/wrap-reflect-1b-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-001-expected.html": [ - [ - "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-001-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-002-expected.html": [ - [ - "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-002-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item-expected.html": [ - [ - "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-menu-expected.html": [ - [ - "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-menu-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-mixed-expected.html": [ - [ - "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-mixed-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-not-dir-expected.html": [ - [ - "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-not-dir-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ol-expected.html": [ - [ - "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ol-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-parent-expected.html": [ - [ - "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-parent-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-skip-no-boxes-expected.html": [ - [ - "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-skip-no-boxes-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ul-expected.html": [ - [ - "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ul-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-no-list-owner-expected.html": [ - [ - "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-no-list-owner-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-not-being-rendered-expected.html": [ - [ - "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-not-being-rendered-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001-expected.html": [ - [ - "/html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001-expected.html": [ - [ - "/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002-expected.html": [ - [ - "/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001-expected.html": [ - [ - "/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002-expected.html": [ - [ - "/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003-expected.html": [ - [ - "/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-pre-element/grouping-pre-reftest-001-expected.html": [ - [ - "/html/semantics/grouping-content/the-pre-element/grouping-pre-reftest-001-expected.html", - {} - ] - ], - "html/semantics/grouping-content/the-pre-element/pre-newline-bidi-expected.html": [ - [ - "/html/semantics/grouping-content/the-pre-element/pre-newline-bidi-expected.html", - {} - ] - ], - "html/semantics/text-level-semantics/the-br-element/br-bidi-expected.html": [ - [ - "/html/semantics/text-level-semantics/the-br-element/br-bidi-expected.html", - {} - ] - ] } }, "paths": { @@ -35081,6 +33932,10 @@ "89af73c41d456ee93bd40921e96414c1908fc48c", "support" ], + "./MANIFEST.json": [ + "3e36194cb38e3f18efda9d53f7a0a880cf69b95d", + "support" + ], "./README.md": [ "e9590560efb0d37ab870037edaafc1c47dc7a785", "support" @@ -39497,10 +38352,18 @@ "fcac6966d40246ce9b62dd80233b9967c7d9c146", "manual" ], + "fullscreen/api/document-exit-fullscreen-twice-manual-expected.txt": [ + "7f86414430e0d686e79d9cbf70bfc7bfe5f7ade1", + "support" + ], "fullscreen/api/document-exit-fullscreen-twice-manual.html": [ "9b6cda0c63e56720f1ab29ffca524384967d7a2f", "manual" ], + "fullscreen/api/document-fullscreen-element-manual-expected.txt": [ + "d908037de6dd9a92d9371f0d93ca48f24fd6469b", + "support" + ], "fullscreen/api/document-fullscreen-element-manual.html": [ "7026a680ddd3f0b3dfbfd75dccbcfb78b88b8ceb", "manual" @@ -39557,18 +38420,34 @@ "b09e6ee5ac5086094bd07cc4ebe431bd91b598bc", "manual" ], + "fullscreen/api/element-request-fullscreen-and-move-manual-expected.txt": [ + "b745cc256da8fb8275e8b37a8500cee4c318bc31", + "support" + ], "fullscreen/api/element-request-fullscreen-and-move-manual.html": [ "29fb0d686ac510d169fbc10ca98eaed599f292df", "manual" ], + "fullscreen/api/element-request-fullscreen-and-move-to-iframe-manual-expected.txt": [ + "2cfb7cb27c14df1a29c3c79e81bfd0ff4d4bc529", + "support" + ], "fullscreen/api/element-request-fullscreen-and-move-to-iframe-manual.html": [ "412ea81c4697594c9cc63709ef29ea2abc3c10d7", "manual" ], + "fullscreen/api/element-request-fullscreen-and-remove-iframe-manual-expected.txt": [ + "91dd32273c1e81281cf9e034a9247a285721f310", + "support" + ], "fullscreen/api/element-request-fullscreen-and-remove-iframe-manual.html": [ "465cb3419b1f3e7b6b385722833e20f285fa864d", "manual" ], + "fullscreen/api/element-request-fullscreen-and-remove-manual-expected.txt": [ + "6e3f989bb1966e353cb18ab120abe74c9fe98c78", + "support" + ], "fullscreen/api/element-request-fullscreen-and-remove-manual.html": [ "5153805ee2b098649ddced4ae8f22b37db6600bf", "manual" @@ -39609,6 +38488,10 @@ "53ad260cb1cd2951d7cacfbc73c2c49837c1ebd4", "manual" ], + "fullscreen/api/element-request-fullscreen-twice-manual-expected.txt": [ + "6cd133b03a8a11dc583024d050b174f0d74b4d68", + "support" + ], "fullscreen/api/element-request-fullscreen-twice-manual.html": [ "b83f5d0212137f1b939e0f84e5ecd86dd06916b9", "manual" @@ -42553,10 +41436,6 @@ "5f89b64e2acf26d03bf7a64f46b72afaa729c1d6", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-EN-R-expected.html": [ - "52e08a2e47e04c2e1afaf05f13562636ece4459e", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-EN-R-ref.html": [ "52e08a2e47e04c2e1afaf05f13562636ece4459e", "support" @@ -42565,10 +41444,6 @@ "4840c2a1eb6ec4af6f7c7a131c816f54acc13129", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-L-expected.html": [ - "c8b9b098cb25842c0805da0117fcd8450d1590d9", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-L-ref.html": [ "c8b9b098cb25842c0805da0117fcd8450d1590d9", "support" @@ -42577,10 +41452,6 @@ "2692413861b4049fd9dd8557e2cd54f5e55958f5", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-N-EN-L-expected.html": [ - "0650491db81d1017758053560dc8dafb2987018f", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-N-EN-L-ref.html": [ "0650491db81d1017758053560dc8dafb2987018f", "support" @@ -42589,10 +41460,6 @@ "0839a7dce6973fb1061d8fae8a2c2ef67b3e4965", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-N-EN-R-expected.html": [ - "98c5fe967f0df208b7841cd962c771a60e4cf8f0", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-N-EN-R-ref.html": [ "98c5fe967f0df208b7841cd962c771a60e4cf8f0", "support" @@ -42601,14 +41468,6 @@ "affcb624b8a53c7345b568c591d7a7077445cdb9", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-N-EN-expected.html": [ - "69d28b3ae329da7cdd8cbd2fa98c898647564ff7", - "reftest" - ], - "html/dom/elements/global-attributes/dir_auto-N-EN-ref-expected.html": [ - "0650491db81d1017758053560dc8dafb2987018f", - "support" - ], "html/dom/elements/global-attributes/dir_auto-N-EN-ref.html": [ "69d28b3ae329da7cdd8cbd2fa98c898647564ff7", "reftest_node" @@ -42617,10 +41476,6 @@ "9aefe9f19e083688aae1d2ed7332e5bd3979f883", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-N-L-expected.html": [ - "c033a8d8887af10980527029f418bb8dd97b9c6a", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-N-L-ref.html": [ "c033a8d8887af10980527029f418bb8dd97b9c6a", "support" @@ -42629,10 +41484,6 @@ "b14509b12c63bef6c1dc84522bd2865c83687bf6", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-N-R-expected.html": [ - "f20fe4c4851b4db1558c5dd4560124721d07be36", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-N-R-ref.html": [ "f20fe4c4851b4db1558c5dd4560124721d07be36", "support" @@ -42641,10 +41492,6 @@ "2d9d9d3c5831173067b7a14b7415a18c03748829", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-R-expected.html": [ - "a99e845c7aab75de3e827d7494541fcddfffae96", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-R-ref.html": [ "a99e845c7aab75de3e827d7494541fcddfffae96", "support" @@ -42653,10 +41500,6 @@ "21892792d6e5fef7df4dce45d51962b616c1c00f", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-contained-L-expected.html": [ - "8828c5d8bafdac3e8463926abd14c1ddc94e3516", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-contained-L-ref.html": [ "8828c5d8bafdac3e8463926abd14c1ddc94e3516", "support" @@ -42665,10 +41508,6 @@ "7e57249b6e595ecad90aef30fbfa22b26ae41152", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-contained-R-expected.html": [ - "e00ec6bfafa83dad4e0d1f8cf9078540fabafbf0", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-contained-R-ref.html": [ "e00ec6bfafa83dad4e0d1f8cf9078540fabafbf0", "support" @@ -42677,10 +41516,6 @@ "44dff6144c7b2611a3e69580e526fcb2ddabebd9", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-contained-bdi-L-expected.html": [ - "e6ad07bff056d38a28a839f23044aee257985d81", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-contained-bdi-L-ref.html": [ "e6ad07bff056d38a28a839f23044aee257985d81", "support" @@ -42689,10 +41524,6 @@ "97f44afb8e10bd82751a6f1d9bcd9b4cceb7682b", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-contained-bdi-R-expected.html": [ - "eb6a732e4bc2cda1fcc2c4ed2bab5eaaf4159d1a", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-contained-bdi-R-ref.html": [ "eb6a732e4bc2cda1fcc2c4ed2bab5eaaf4159d1a", "support" @@ -42701,10 +41532,6 @@ "049c5f235a8956a0271f806b024b1a4a09ff7e66", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-contained-dir-L-expected.html": [ - "6bbc5e4708983510833d3c2540e7d9e3fb006f73", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-contained-dir-L-ref.html": [ "6bbc5e4708983510833d3c2540e7d9e3fb006f73", "support" @@ -42713,10 +41540,6 @@ "fbf5408411b9a1c6ad71329e86c1e0916849c077", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-contained-dir-R-expected.html": [ - "ca2d6cf19a33ccbde547c94b35b5bb8b79095abd", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-contained-dir-R-ref.html": [ "ca2d6cf19a33ccbde547c94b35b5bb8b79095abd", "support" @@ -42725,10 +41548,6 @@ "42e56b404da4701bc253c1d96564fae5697c34cc", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L-expected.html": [ - "99cc43394be244215b8fddbf852d6da94bf4d954", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L-ref.html": [ "99cc43394be244215b8fddbf852d6da94bf4d954", "support" @@ -42737,10 +41556,6 @@ "870830929c2be960a57616ba70663c281f5d935b", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R-expected.html": [ - "f8be184bef057f599d1b01f690994f0a166fd326", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R-ref.html": [ "f8be184bef057f599d1b01f690994f0a166fd326", "support" @@ -42749,10 +41564,6 @@ "a026f77ae55cccbffd7cea34249acbe2b64fcb56", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-contained-script-L-expected.html": [ - "44be00a051d546ffce0cc188b5b42bb4f9708185", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-contained-script-L-ref.html": [ "44be00a051d546ffce0cc188b5b42bb4f9708185", "support" @@ -42761,10 +41572,6 @@ "4ffe8225ca52239154e531401ef4f91b044545f9", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-contained-script-R-expected.html": [ - "b5827264f1d0abe47bf4ec8946c5608f8df7dfc3", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-contained-script-R-ref.html": [ "b5827264f1d0abe47bf4ec8946c5608f8df7dfc3", "support" @@ -42773,10 +41580,6 @@ "92cb1878cdd76a1c254d8d7de5ddc3afdeb5163f", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-contained-style-L-expected.html": [ - "d5436f2b5cea3a53565db908bf146ce23835bd1d", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-contained-style-L-ref.html": [ "d5436f2b5cea3a53565db908bf146ce23835bd1d", "support" @@ -42785,10 +41588,6 @@ "2ea846ffb34a5b28b6f0124ff13dc16696008f90", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-contained-style-R-expected.html": [ - "940233c194df56a61c07c599939da336ff013b89", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-contained-style-R-ref.html": [ "940233c194df56a61c07c599939da336ff013b89", "support" @@ -42797,10 +41596,6 @@ "c4939bf0cac58b9f878d17675f877ce4b5035285", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-contained-textarea-L-expected.html": [ - "56abaee4c1a72086b0543af9f0f4c5d80d545797", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-contained-textarea-L-ref.html": [ "56abaee4c1a72086b0543af9f0f4c5d80d545797", "support" @@ -42809,10 +41604,6 @@ "b603d2f0ca7a57238f55992201f730a84d07e256", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-contained-textarea-R-expected.html": [ - "1ade01ec0121c1da62d52648d59d045a403b7430", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-contained-textarea-R-ref.html": [ "1ade01ec0121c1da62d52648d59d045a403b7430", "support" @@ -42821,10 +41612,6 @@ "f030fd7098376603d34dd5b508a5ed9b7d5dbe86", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-EN-L-expected.html": [ - "faa67b3a8c27df008a1c80ebadf5a7d8053df2a7", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-EN-L-ref.html": [ "faa67b3a8c27df008a1c80ebadf5a7d8053df2a7", "support" @@ -42833,10 +41620,6 @@ "5759d093606e53b68b0f50e1f3a6ba5d25cc0ae4", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-EN-R-expected.html": [ - "93dc76b79d9ef1c77ed32ef83977e294078e4ef9", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-EN-R-ref.html": [ "93dc76b79d9ef1c77ed32ef83977e294078e4ef9", "support" @@ -42845,10 +41628,6 @@ "3ed7cd50bbac6796b405a2d4f8f880de1ee47ad1", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-L-expected.html": [ - "309fe79670f3ae336c70ebd41110c774a35d966d", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-L-ref.html": [ "309fe79670f3ae336c70ebd41110c774a35d966d", "support" @@ -42857,10 +41636,6 @@ "78e1b2e16850484324a3df8d0f9c422d7efeb719", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-N-EN-L-expected.html": [ - "8058aa2b936f646a299d54cb4c4412e364e5fd25", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-N-EN-L-ref.html": [ "8058aa2b936f646a299d54cb4c4412e364e5fd25", "support" @@ -42869,10 +41644,6 @@ "3d959387e93b3dd99d0e223eb6f5a253b9260ceb", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-N-EN-R-expected.html": [ - "9376309e9dafe11734d0b963bf1a7a36f8388bf3", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-N-EN-R-ref.html": [ "9376309e9dafe11734d0b963bf1a7a36f8388bf3", "support" @@ -42881,10 +41652,6 @@ "077a2c1d57110aea292bf6da302f3b16962ae639", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-N-EN-expected.html": [ - "c7d4c449fe7eea0b1c2d24cced35edd1c1e3de5d", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-N-EN-ref.html": [ "c7d4c449fe7eea0b1c2d24cced35edd1c1e3de5d", "support" @@ -42893,10 +41660,6 @@ "5396cbde2fb108caa42f42c9a9ce781020fbeab8", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-N-L-expected.html": [ - "82634313b8751d1993dec92867531747b468c280", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-N-L-ref.html": [ "82634313b8751d1993dec92867531747b468c280", "support" @@ -42905,10 +41668,6 @@ "1a65cb2e6c8080f9d1d795b5ef27d1023ba56a19", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-N-R-expected.html": [ - "11e1abb3fb073fe531ebad22d9876c350db7e2ab", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-N-R-ref.html": [ "11e1abb3fb073fe531ebad22d9876c350db7e2ab", "support" @@ -42917,10 +41676,6 @@ "a19b26445f5dbd1833a123f9391ed39a1a03ec48", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-R-expected.html": [ - "19d8e650154ef0cca0a093f10e1ff5a4bd5e4885", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-R-ref.html": [ "19d8e650154ef0cca0a093f10e1ff5a4bd5e4885", "support" @@ -42929,10 +41684,6 @@ "39cba6b769deb1880f93207f2c534425a29de27f", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-script-EN-L-expected.html": [ - "a1fe8e1ab5bd2da0999fc01c747a55bf8013d97a", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-script-EN-L-ref.html": [ "a1fe8e1ab5bd2da0999fc01c747a55bf8013d97a", "support" @@ -42941,10 +41692,6 @@ "25f4af11d06beb8f2a237dba266ac678f8caf7b3", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-script-EN-R-expected.html": [ - "41f8b9288150a38d3fe4d07af96d48696b368b0d", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-script-EN-R-ref.html": [ "41f8b9288150a38d3fe4d07af96d48696b368b0d", "support" @@ -42953,10 +41700,6 @@ "8795f424b9c826f5ad1c44fae6732ec9c73385fc", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-script-L-expected.html": [ - "598f02d13e38d8d4603cefc74ab093a321d90cb0", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-script-L-ref.html": [ "598f02d13e38d8d4603cefc74ab093a321d90cb0", "support" @@ -42965,10 +41708,6 @@ "b053db6c7148e4cfad0677b35a342c5d8b8d7865", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L-expected.html": [ - "fa4e9805892cffb7d1e50832d2dd5ab7d8d37149", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L-ref.html": [ "fa4e9805892cffb7d1e50832d2dd5ab7d8d37149", "support" @@ -42977,10 +41716,6 @@ "5eb48e7a3934128248ac87cdd0d758ba683e292b", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R-expected.html": [ - "bee0053456900c04a1c7430ea12719bb6907a4ad", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R-ref.html": [ "bee0053456900c04a1c7430ea12719bb6907a4ad", "support" @@ -42989,10 +41724,6 @@ "ad2ca54bfde000e76816e39ac153d50d87979458", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-EN-expected.html": [ - "b7969d11eb822a1724b28c4a63c38f8d06c81fb7", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-script-N-EN-ref.html": [ "b7969d11eb822a1724b28c4a63c38f8d06c81fb7", "support" @@ -43001,10 +41732,6 @@ "3fd6a5a360bb08c1c0e45f31c8e1bd93bea9475e", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-L-expected.html": [ - "4a659d0fdaeadd1f0d0b605e8606c284df0ebad0", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-script-N-L-ref.html": [ "4a659d0fdaeadd1f0d0b605e8606c284df0ebad0", "support" @@ -43013,10 +41740,6 @@ "778bab97d57367b80c211421b74039d720a6a75d", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-R-expected.html": [ - "2132a9450891dfa8d18e2b374a62bd783dbe0a6c", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-script-N-R-ref.html": [ "2132a9450891dfa8d18e2b374a62bd783dbe0a6c", "support" @@ -43025,10 +41748,6 @@ "f7d6e5df3b5579359ba0d430519e0814529b9faa", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-input-script-R-expected.html": [ - "5e3fedf81e601e38a34b328936d897f0607eac31", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-input-script-R-ref.html": [ "5e3fedf81e601e38a34b328936d897f0607eac31", "support" @@ -43037,10 +41756,6 @@ "75f06f5e68cbe0db1171d8a7d23633e1f0c400f8", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-isolate-expected.html": [ - "c3fa723f6b0e082e8af07bb41fed8b01cb4d8bea", - "visual" - ], "html/dom/elements/global-attributes/dir_auto-isolate-ref.html": [ "c3fa723f6b0e082e8af07bb41fed8b01cb4d8bea", "support" @@ -43049,10 +41764,6 @@ "6776f751a2fc48f319566fd6cb1ec442ad477907", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-pre-N-EN-expected.html": [ - "57a161033d95572c422037b02ed1e5c78f6f0a9c", - "support" - ], "html/dom/elements/global-attributes/dir_auto-pre-N-EN-ref.html": [ "57a161033d95572c422037b02ed1e5c78f6f0a9c", "support" @@ -43061,10 +41772,6 @@ "19749371786744008be859f020f2a6a11291d523", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-pre-N-between-Rs-expected.html": [ - "6abaf1774734654ce416757cf3289de0cd94bb04", - "support" - ], "html/dom/elements/global-attributes/dir_auto-pre-N-between-Rs-ref.html": [ "6abaf1774734654ce416757cf3289de0cd94bb04", "support" @@ -43073,10 +41780,6 @@ "da624de9505ef1c62b736837e33192ea98ff55cf", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-pre-mixed-expected.html": [ - "a6a7dcb5329209776cda9df8a25fa068d0fa791a", - "support" - ], "html/dom/elements/global-attributes/dir_auto-pre-mixed-ref.html": [ "a6a7dcb5329209776cda9df8a25fa068d0fa791a", "support" @@ -43085,10 +41788,6 @@ "fde85b2bcc2bf96cf0f73f82133eddbe6294ef38", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-textarea-N-EN-expected.html": [ - "13c7b842a4971a198b4065be120818143e0134e4", - "support" - ], "html/dom/elements/global-attributes/dir_auto-textarea-N-EN-ref.html": [ "13c7b842a4971a198b4065be120818143e0134e4", "support" @@ -43097,10 +41796,6 @@ "b29226846d2926a29923149e3e6d62972919b6eb", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs-expected.html": [ - "023bce560f90a6d7d8f94b5b3e6e7dbf4090b900", - "support" - ], "html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs-ref.html": [ "023bce560f90a6d7d8f94b5b3e6e7dbf4090b900", "support" @@ -43109,10 +41804,6 @@ "79b5a0cf78cd47b5bfc07accf39a1d5f29618268", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-textarea-mixed-expected.html": [ - "8da8d69d022c601815ff3b35dacc03367cd6a021", - "support" - ], "html/dom/elements/global-attributes/dir_auto-textarea-mixed-ref.html": [ "8da8d69d022c601815ff3b35dacc03367cd6a021", "support" @@ -43121,10 +41812,6 @@ "8555d1644c5fddcebc43f8e6372ac0fc75e0a775", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-textarea-script-N-EN-expected.html": [ - "13c7b842a4971a198b4065be120818143e0134e4", - "support" - ], "html/dom/elements/global-attributes/dir_auto-textarea-script-N-EN-ref.html": [ "13c7b842a4971a198b4065be120818143e0134e4", "support" @@ -43133,14 +41820,6 @@ "2e86f05932639a34977b4229942a7b64d0be8895", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-expected.html": [ - "0c2fe320f82ac3d65aea508d9b1c1e8179b286f0", - "reftest" - ], - "html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-ref-expected.html": [ - "023bce560f90a6d7d8f94b5b3e6e7dbf4090b900", - "support" - ], "html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-ref.html": [ "0c2fe320f82ac3d65aea508d9b1c1e8179b286f0", "reftest_node" @@ -43149,10 +41828,6 @@ "8258e74229fc4b2db2fd5241f87d1bdcb2532784", "reftest" ], - "html/dom/elements/global-attributes/dir_auto-textarea-script-mixed-expected.html": [ - "8da8d69d022c601815ff3b35dacc03367cd6a021", - "support" - ], "html/dom/elements/global-attributes/dir_auto-textarea-script-mixed-ref.html": [ "8da8d69d022c601815ff3b35dacc03367cd6a021", "support" @@ -43177,10 +41852,6 @@ "b13b47d91bb3159de5564f7e9c5d22fd21dd3bec", "testharness" ], - "html/dom/elements/global-attributes/lang-xmllang-01-expected.html": [ - "4b72fb911b768df8990f7bf0be264bf6feb4989c", - "visual" - ], "html/dom/elements/global-attributes/lang-xmllang-01-ref.html": [ "4b72fb911b768df8990f7bf0be264bf6feb4989c", "support" @@ -43189,10 +41860,6 @@ "a1f1a0b3d02c1d7b950079f8f02fa991245ad112", "reftest" ], - "html/dom/elements/global-attributes/lang-xyzzy-expected.html": [ - "4689b24ddbb024358113c054db112a45cc020d39", - "support" - ], "html/dom/elements/global-attributes/lang-xyzzy-ref.html": [ "4689b24ddbb024358113c054db112a45cc020d39", "support" @@ -43201,10 +41868,6 @@ "7421ed448c19460e65726a0c7ebeffabd7070512", "reftest" ], - "html/dom/elements/global-attributes/style-01-expected.html": [ - "921c89f22ae55431b5ca7db4198f57b8ac934deb", - "visual" - ], "html/dom/elements/global-attributes/style-01-ref.html": [ "921c89f22ae55431b5ca7db4198f57b8ac934deb", "support" @@ -43297,218 +41960,110 @@ "bec8edb2763e83b4141e92f95b02521cd16fbc02", "testharness" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a-expected.html": [ - "481e37afb0a1e4afbb065cf4b8d54503c95fc43f", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a.html": [ "cb6a9e3eaf18c711ace6ba90188b14271d068a63", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b-expected.html": [ - "481e37afb0a1e4afbb065cf4b8d54503c95fc43f", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b.html": [ "5d649ab35535acbc2fa417b6a5ed220f86b35828", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c-expected.html": [ - "481e37afb0a1e4afbb065cf4b8d54503c95fc43f", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c.html": [ "21f5e7a44bbd7dd9fa0af86c4cf0a0827b26ce73", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a-expected.html": [ - "87c877c29e66d4b2350df9b5eb4feafa726aa873", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a.html": [ "516a5065e2b0cee59a99de777fe1cd1ea2a180aa", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b-expected.html": [ - "79186a3866dacfa342cffdb3bd11e51f49d1944b", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b.html": [ "3a1f201fd94aaeef76f7343b2bfc95166ebefe6e", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c-expected.html": [ - "8d5d9cd60e1ac7dc8384649ed8122b465231e877", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c.html": [ "eea35917830274ec8611a69aa26d30a4f80db7aa", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a-expected.html": [ - "8b8b1869748cacabe4caaf1880eb0decb1eab368", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a.html": [ "c403b8eb38dcdc56068aeb3ae97db815dadeeb39", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b-expected.html": [ - "8b8b1869748cacabe4caaf1880eb0decb1eab368", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b.html": [ "12b1624400f15ec545b9869e370b56a80b390eef", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c-expected.html": [ - "8b8b1869748cacabe4caaf1880eb0decb1eab368", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c.html": [ "f77cb04e9c7555d9a8aca84fe1d488f258474fe7", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a-expected.html": [ - "fdda7afefa6ea76ed3daf56c6f24f7f86d8cea9a", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a.html": [ "c9e9f980e9614ae64c4bf57fc7be1b41a8379102", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b-expected.html": [ - "fdda7afefa6ea76ed3daf56c6f24f7f86d8cea9a", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b.html": [ "64c9d5f6f93efb510dfee279aa028f7d2c8e3f4f", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c-expected.html": [ - "fdda7afefa6ea76ed3daf56c6f24f7f86d8cea9a", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c.html": [ "49274deeb3fec514233f497e4556ac3965d92bff", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a-expected.html": [ - "3f7e31835f9e694dc06096402ed76bcf8249ed12", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a.html": [ "5038049a6d509d3fb02898a919086e41e45c5805", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b-expected.html": [ - "3f7e31835f9e694dc06096402ed76bcf8249ed12", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b.html": [ "c10966f470e869fb94fe625e05b7ef2a72ed5bc8", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c-expected.html": [ - "3f7e31835f9e694dc06096402ed76bcf8249ed12", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c.html": [ "f5d29be83b09fd7c9e270817b1a5d5dbf8bfceff", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a-expected.html": [ - "6b881024990f683ac580080838eb83126957a779", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a.html": [ "69e9d654f10d67599f25616f8a7d201372a80657", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b-expected.html": [ - "6b881024990f683ac580080838eb83126957a779", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b.html": [ "5db430c1f69d1812aae8cde3f032b0a33f533dd0", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c-expected.html": [ - "30ee5fafd1b0e2a1d4176ca9bbe456fc0abce2eb", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c.html": [ "7fe0fb704a392507442b06783f78d95f80691508", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a-expected.html": [ - "b4b27b4aa64d087a929b77c5efe0a5dac3860144", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a.html": [ "d54e5690fb7f89089730d5f1c570c887e878c6f6", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b-expected.html": [ - "b4b27b4aa64d087a929b77c5efe0a5dac3860144", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b.html": [ "694deacfdcaf5e48db1784c25a742e10323300b8", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c-expected.html": [ - "b4b27b4aa64d087a929b77c5efe0a5dac3860144", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c.html": [ "75a2e8a6a3444aed1c6a4fab10694efcd8479407", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a-expected.html": [ - "a61a586f944e35c6de5c717ba9d73edf7861d4b8", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a.html": [ "e53ea6bd642740e855347adf02b81378e5e0998c", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b-expected.html": [ - "a61a586f944e35c6de5c717ba9d73edf7861d4b8", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b.html": [ "8ab3636cae95e935f3b869d4732badb1a504689c", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c-expected.html": [ - "a61a586f944e35c6de5c717ba9d73edf7861d4b8", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c.html": [ "f47b679d3d078b327768a51f1f8b663d8ffd3016", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a-expected.html": [ - "d8c82f3466f954c818a055eca533c87305533479", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a.html": [ "1d387e8dbe003b008b2b301f34084bacd25b58cb", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b-expected.html": [ - "355953f8ebb44f79bfe3cad728bcaaa3ec04e4bb", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b.html": [ "3160e51288daf20bf76dc269d7117b7d142bc27d", "reftest" ], - "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c-expected.html": [ - "355953f8ebb44f79bfe3cad728bcaaa3ec04e4bb", - "support" - ], "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html": [ "789155da4c5e8ca040cc1b0df8076154b659fb3c", "reftest" @@ -46909,58 +45464,30 @@ "7d7ae1dcb8c6a2e0f3a1b2ffffed957f3b1d2a85", "support" ], - "html/editing/the-hidden-attribute/hidden-1a-expected.html": [ - "7d7ae1dcb8c6a2e0f3a1b2ffffed957f3b1d2a85", - "support" - ], "html/editing/the-hidden-attribute/hidden-1a.html": [ "de76f6d416b11a1407229f6d0d15dc95aacef2e7", "reftest" ], - "html/editing/the-hidden-attribute/hidden-1b-expected.html": [ - "7d7ae1dcb8c6a2e0f3a1b2ffffed957f3b1d2a85", - "support" - ], "html/editing/the-hidden-attribute/hidden-1b.html": [ "15d5d40c80be03a3b5d31c8424a23ecf11c2502f", "reftest" ], - "html/editing/the-hidden-attribute/hidden-1c-expected.html": [ - "7d7ae1dcb8c6a2e0f3a1b2ffffed957f3b1d2a85", - "support" - ], "html/editing/the-hidden-attribute/hidden-1c.html": [ "b49c6d86221c12a6e3a8a6c9f760c53253091303", "reftest" ], - "html/editing/the-hidden-attribute/hidden-1d-expected.html": [ - "7d7ae1dcb8c6a2e0f3a1b2ffffed957f3b1d2a85", - "support" - ], "html/editing/the-hidden-attribute/hidden-1d.html": [ "d56e6521ea3e4d542b3b1547e701417aefed5886", "reftest" ], - "html/editing/the-hidden-attribute/hidden-1e-expected.html": [ - "7d7ae1dcb8c6a2e0f3a1b2ffffed957f3b1d2a85", - "support" - ], "html/editing/the-hidden-attribute/hidden-1e.html": [ "33346fc3c1b0fde55caa6a186513c5650962531d", "reftest" ], - "html/editing/the-hidden-attribute/hidden-1f-expected.html": [ - "7d7ae1dcb8c6a2e0f3a1b2ffffed957f3b1d2a85", - "support" - ], "html/editing/the-hidden-attribute/hidden-1f.html": [ "6c6b02bc3030e02f1bdc6a9764381d3729212a11", "reftest" ], - "html/editing/the-hidden-attribute/hidden-1g-expected.html": [ - "7d7ae1dcb8c6a2e0f3a1b2ffffed957f3b1d2a85", - "support" - ], "html/editing/the-hidden-attribute/hidden-1g.html": [ "1823cceca9a6aa802af50cc4e7da8592def40990", "reftest" @@ -47141,10 +45668,6 @@ "02f00d35b00fd8c08f7063ab8920171ab5070a71", "testharness" ], - "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-expected.html": [ - "a5fa95e71b00d1ad88fdff3fc9e93b6588742eee", - "support" - ], "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html": [ "a5fa95e71b00d1ad88fdff3fc9e93b6588742eee", "support" @@ -47153,10 +45676,6 @@ "6186a83ccdba01d4c5430f4afce7ae397427f0c5", "reftest" ], - "html/rendering/bindings/the-select-element-0/option-label-expected.html": [ - "34ac1b429801bdb44125c92f5df03fb79b15aad4", - "support" - ], "html/rendering/bindings/the-select-element-0/option-label-ref.html": [ "34ac1b429801bdb44125c92f5df03fb79b15aad4", "support" @@ -47165,34 +45684,18 @@ "f8fcfb9055a678a2b6714a15957485c137296177", "reftest" ], - "html/rendering/bindings/the-textarea-element-0/cols-default-expected.html": [ - "0c91f2093be9e8f9815e4907fcf98d32c66af2d4", - "support" - ], "html/rendering/bindings/the-textarea-element-0/cols-default.html": [ "8b963bce003842a81c6d52a860cc5bd49c598933", "reftest" ], - "html/rendering/bindings/the-textarea-element-0/cols-zero-expected.html": [ - "0c91f2093be9e8f9815e4907fcf98d32c66af2d4", - "support" - ], "html/rendering/bindings/the-textarea-element-0/cols-zero.html": [ "8e1e339ae7358c35c9f7caae4b55bbb3af7e892f", "reftest" ], - "html/rendering/bindings/the-textarea-element-0/rows-default-expected.html": [ - "0c91f2093be9e8f9815e4907fcf98d32c66af2d4", - "support" - ], "html/rendering/bindings/the-textarea-element-0/rows-default.html": [ "de96b189c5f22e5ca94a9871d3b050913bf20f08", "reftest" ], - "html/rendering/bindings/the-textarea-element-0/rows-zero-expected.html": [ - "0c91f2093be9e8f9815e4907fcf98d32c66af2d4", - "support" - ], "html/rendering/bindings/the-textarea-element-0/rows-zero.html": [ "07decc10c95c65c33578bb1b3e15d406e914c1aa", "reftest" @@ -47205,10 +45708,6 @@ "f4ec57281d8f32a4931599edc65941ea0db78d5f", "support" ], - "html/rendering/non-replaced-elements/flow-content-0/div-align-expected.html": [ - "e29cbaaf20761847d68e8c75d1516e25dee0d02a", - "support" - ], "html/rendering/non-replaced-elements/flow-content-0/div-align-ref.html": [ "e29cbaaf20761847d68e8c75d1516e25dee0d02a", "support" @@ -47217,10 +45716,6 @@ "9c049440cb28e4be6eb8e4d9b85fb6529457e3c4", "reftest" ], - "html/rendering/non-replaced-elements/flow-content-0/figure-expected.html": [ - "bc22a60dfab459b65f1ccacdce853a6af1c326fd", - "visual" - ], "html/rendering/non-replaced-elements/flow-content-0/figure-ref.html": [ "bc22a60dfab459b65f1ccacdce853a6af1c326fd", "support" @@ -47233,18 +45728,10 @@ "1993a0736f73b9ac2916f89de4fa34fdab90cca9", "support" ], - "html/rendering/non-replaced-elements/lists/li-type-supported-expected.html": [ - "a208df22e25e9c3d98f196753fa51d5a0fac500e", - "support" - ], "html/rendering/non-replaced-elements/lists/li-type-supported-ref.html": [ "a208df22e25e9c3d98f196753fa51d5a0fac500e", "support" ], - "html/rendering/non-replaced-elements/lists/li-type-supported-xhtml-expected.html": [ - "a208df22e25e9c3d98f196753fa51d5a0fac500e", - "support" - ], "html/rendering/non-replaced-elements/lists/li-type-supported-xhtml.xhtml": [ "6c43dcd88ceb945211c4a21b53822c3b1ef28dc6", "reftest" @@ -47253,18 +45740,10 @@ "b4b93b48bb6da64d135613e5d73885a18aa7d9ab", "reftest" ], - "html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-alpha-expected.html": [ - "014508b5fd3f5d411d87e3efddcef87031a8553c", - "support" - ], "html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-alpha.html": [ "e556577acbb6f7f2f985691300ea2c354ea295da", "reftest" ], - "html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-roman-expected.html": [ - "014508b5fd3f5d411d87e3efddcef87031a8553c", - "support" - ], "html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-roman.html": [ "bd99faaa307fdca511a8cb68b341ecf2376f8726", "reftest" @@ -47273,34 +45752,18 @@ "014508b5fd3f5d411d87e3efddcef87031a8553c", "support" ], - "html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-alpha-expected.html": [ - "014508b5fd3f5d411d87e3efddcef87031a8553c", - "support" - ], "html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-alpha.html": [ "86ba4a1fc9dd030326c869456f1f915dbc55c706", "reftest" ], - "html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-roman-expected.html": [ - "014508b5fd3f5d411d87e3efddcef87031a8553c", - "support" - ], "html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-roman.html": [ "ef5dd6ccad1c311425519218015279bf8c4efb09", "reftest" ], - "html/rendering/non-replaced-elements/lists/ol-type-supported-expected.html": [ - "ca19f6e10f4ea50a68f07c1b18f350451ff1e32b", - "support" - ], "html/rendering/non-replaced-elements/lists/ol-type-supported-ref.html": [ "ca19f6e10f4ea50a68f07c1b18f350451ff1e32b", "support" ], - "html/rendering/non-replaced-elements/lists/ol-type-supported-xhtml-expected.html": [ - "ca19f6e10f4ea50a68f07c1b18f350451ff1e32b", - "support" - ], "html/rendering/non-replaced-elements/lists/ol-type-supported-xhtml.xhtml": [ "ffbb91112e2923c97b373308a5a96787027502e3", "reftest" @@ -47309,50 +45772,26 @@ "a7dd43386da371e243998c5309769a98ae3aaf51", "reftest" ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-circle-expected.html": [ - "ad2cccd38a78c7461266356cba69673c08c636c7", - "support" - ], "html/rendering/non-replaced-elements/lists/ol-type-unsupported-circle.html": [ "12520d6f88dea06487485f94d116da70a528a4f1", "reftest" ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-disc-expected.html": [ - "ad2cccd38a78c7461266356cba69673c08c636c7", - "support" - ], "html/rendering/non-replaced-elements/lists/ol-type-unsupported-disc.html": [ "cfa6790fa4a6bf718bd471953fa9c5200126f687", "reftest" ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid-expected.html": [ - "ad2cccd38a78c7461266356cba69673c08c636c7", - "support" - ], "html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid.html": [ "2b1357456c5ec76c85539138ee127aead40cec83", "reftest" ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha-expected.html": [ - "ad2cccd38a78c7461266356cba69673c08c636c7", - "support" - ], "html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha.html": [ "aae05a4770fc8db603c533c98ea0cc0d67706c80", "reftest" ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-roman-expected.html": [ - "ad2cccd38a78c7461266356cba69673c08c636c7", - "support" - ], "html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-roman.html": [ "5f767bf1d79377a5311163193fb97f6eabda55d7", "reftest" ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-none-expected.html": [ - "ad2cccd38a78c7461266356cba69673c08c636c7", - "support" - ], "html/rendering/non-replaced-elements/lists/ol-type-unsupported-none.html": [ "90b110b70e1cc202d7fae8288f9413119276b9df", "reftest" @@ -47361,50 +45800,26 @@ "ad2cccd38a78c7461266356cba69673c08c636c7", "support" ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-round-expected.html": [ - "ad2cccd38a78c7461266356cba69673c08c636c7", - "support" - ], "html/rendering/non-replaced-elements/lists/ol-type-unsupported-round.html": [ "1a1ec21baf21aea4724264d938bfce4ddf667715", "reftest" ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-square-expected.html": [ - "ad2cccd38a78c7461266356cba69673c08c636c7", - "support" - ], "html/rendering/non-replaced-elements/lists/ol-type-unsupported-square.html": [ "329d32692c84fc1cd457ed533b8dee38827bac9e", "reftest" ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-alpha-expected.html": [ - "ad2cccd38a78c7461266356cba69673c08c636c7", - "support" - ], "html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-alpha.html": [ "6b10d133f59248152576bf248790c56f63788a8d", "reftest" ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-roman-expected.html": [ - "ad2cccd38a78c7461266356cba69673c08c636c7", - "support" - ], "html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-roman.html": [ "70c9c0b8a411394668837fc834ed5f8fa955f6dc", "reftest" ], - "html/rendering/non-replaced-elements/lists/ul-type-supported-expected.html": [ - "e0bf757f7b006d9ecc4c71a6ab0a9ac52b5d2829", - "support" - ], "html/rendering/non-replaced-elements/lists/ul-type-supported-ref.html": [ "e0bf757f7b006d9ecc4c71a6ab0a9ac52b5d2829", "support" ], - "html/rendering/non-replaced-elements/lists/ul-type-supported-xhtml-expected.html": [ - "e0bf757f7b006d9ecc4c71a6ab0a9ac52b5d2829", - "support" - ], "html/rendering/non-replaced-elements/lists/ul-type-supported-xhtml.xhtml": [ "93bff746a021128b25b6deb474212edfe2f8ddfb", "reftest" @@ -47413,34 +45828,18 @@ "829be53c029f0511a68a36804d6a8874771933fd", "reftest" ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-decimal-expected.html": [ - "aed2fe85523bbf7660829354eb8c85dbf9b85e62", - "support" - ], "html/rendering/non-replaced-elements/lists/ul-type-unsupported-decimal.html": [ "62447d263ff0747c2fe0ce6875c424c7a5a0514b", "reftest" ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid-expected.html": [ - "aed2fe85523bbf7660829354eb8c85dbf9b85e62", - "support" - ], "html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid.html": [ "5317d6722c970b373a2b986ce9853f9dd0bb71d9", "reftest" ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha-expected.html": [ - "aed2fe85523bbf7660829354eb8c85dbf9b85e62", - "support" - ], "html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha.html": [ "ceef368ad8666be4313313ce079cca5be9ae31c5", "reftest" ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-roman-expected.html": [ - "aed2fe85523bbf7660829354eb8c85dbf9b85e62", - "support" - ], "html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-roman.html": [ "93fbacc30968a98d97d09b6c253a0d7a3c7dc3ea", "reftest" @@ -47449,34 +45848,18 @@ "aed2fe85523bbf7660829354eb8c85dbf9b85e62", "support" ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-alpha-expected.html": [ - "aed2fe85523bbf7660829354eb8c85dbf9b85e62", - "support" - ], "html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-alpha.html": [ "c6f56f8007440981b8c475d490d1be1b216597ca", "reftest" ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-roman-expected.html": [ - "aed2fe85523bbf7660829354eb8c85dbf9b85e62", - "support" - ], "html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-roman.html": [ "eafbd5d4f39a28fb5c2c4f3af8d176ea247e0efa", "reftest" ], - "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-a-expected.html": [ - "31621388c5c272a94e918d63c54ede9c308a881f", - "support" - ], "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-a.html": [ "da59b8c71eb6abbcc4423b424f19c47d7fbd10b5", "reftest" ], - "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-q-expected.html": [ - "31621388c5c272a94e918d63c54ede9c308a881f", - "support" - ], "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-q.html": [ "b3062636521aae5317fb11aa26924f16d026e9d6", "reftest" @@ -47485,26 +45868,14 @@ "31621388c5c272a94e918d63c54ede9c308a881f", "support" ], - "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-s-expected.html": [ - "31621388c5c272a94e918d63c54ede9c308a881f", - "support" - ], "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-s.html": [ "798edd60960bd2349625b18e499a8ab3b6308284", "reftest" ], - "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-x-expected.html": [ - "31621388c5c272a94e918d63c54ede9c308a881f", - "support" - ], "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-x.xhtml": [ "0c65854ebeb20fe22798d24f427c57d3a478b480", "reftest" ], - "html/rendering/non-replaced-elements/tables/table-border-1-expected.html": [ - "1f3aa494ba434211a8cdcd1be289e702856fa05a", - "support" - ], "html/rendering/non-replaced-elements/tables/table-border-1-ref.html": [ "1f3aa494ba434211a8cdcd1be289e702856fa05a", "support" @@ -47513,10 +45884,6 @@ "17a35d8b06ed08ba39c9fcc3abf7566941ee0c6a", "reftest" ], - "html/rendering/non-replaced-elements/tables/table-border-2-expected.html": [ - "deaba5f29b60ae3b02dd633b49f2d3ab3fb8c278", - "support" - ], "html/rendering/non-replaced-elements/tables/table-border-2-notref.html": [ "8c5f73d1db910b6137a06bfecd700e2c8f5cbec4", "support" @@ -47529,18 +45896,10 @@ "a58057471669a04fa625d2dc9a8d860ada53a25c", "reftest" ], - "html/rendering/non-replaced-elements/tables/table-cell-width-expected.html": [ - "8b33615d70e3a5347e9ea8891a4ba997d3806de6", - "support" - ], "html/rendering/non-replaced-elements/tables/table-cell-width-ref.html": [ "8b33615d70e3a5347e9ea8891a4ba997d3806de6", "support" ], - "html/rendering/non-replaced-elements/tables/table-cell-width-s-expected.html": [ - "8b33615d70e3a5347e9ea8891a4ba997d3806de6", - "support" - ], "html/rendering/non-replaced-elements/tables/table-cell-width-s.html": [ "e5f99ab08e40ae50755e9fd4411e1d9095717c2c", "reftest" @@ -47549,10 +45908,6 @@ "699050ab3bcc8fc11d51c2ae4b9b10aee46876a5", "reftest" ], - "html/rendering/non-replaced-elements/tables/table-layout-expected.html": [ - "d5fdae37ca0ac9def696205d613983c2d7e2e5ae", - "support" - ], "html/rendering/non-replaced-elements/tables/table-layout-notref.html": [ "a05fad3c06f94c3a617f2efdc589bbb3f5525983", "support" @@ -47565,10 +45920,6 @@ "ec05c435cfd09291184360db7e8b0c5af9c7ba31", "reftest" ], - "html/rendering/non-replaced-elements/tables/table-width-150percent-expected.html": [ - "a25b7aad09676bed5d05714aeae6b5a6b4dbb4b5", - "support" - ], "html/rendering/non-replaced-elements/tables/table-width-150percent-ref.html": [ "a25b7aad09676bed5d05714aeae6b5a6b4dbb4b5", "support" @@ -47577,18 +45928,10 @@ "bc78dfc6c24812c9910a5289f64d18a80d5b9c05", "reftest" ], - "html/rendering/non-replaced-elements/tables/table-width-expected.html": [ - "bb17cabc8fd9ac93888aaa58c72ed1bfdbc636ce", - "support" - ], "html/rendering/non-replaced-elements/tables/table-width-ref.html": [ "bb17cabc8fd9ac93888aaa58c72ed1bfdbc636ce", "support" ], - "html/rendering/non-replaced-elements/tables/table-width-s-expected.html": [ - "bb17cabc8fd9ac93888aaa58c72ed1bfdbc636ce", - "support" - ], "html/rendering/non-replaced-elements/tables/table-width-s.html": [ "f3fd76b96913d27da22527cd5027328e97c82196", "reftest" @@ -47597,10 +45940,6 @@ "d14590d989f2c2c65f59f0f952115038fa705087", "reftest" ], - "html/rendering/non-replaced-elements/the-fieldset-element-0/min-width-not-important-expected.html": [ - "ca98c73f07f62c3536f6fe1d2460fc94c575aad1", - "support" - ], "html/rendering/non-replaced-elements/the-fieldset-element-0/min-width-not-important.html": [ "1b765f689ff6c297942d79fd093cb2d572e66f9a", "reftest" @@ -47609,10 +45948,6 @@ "ca98c73f07f62c3536f6fe1d2460fc94c575aad1", "support" ], - "html/rendering/non-replaced-elements/the-hr-element-0/align-expected.html": [ - "eb2082192a4be6b4b4d6eafc7c3d609afb0cde49", - "support" - ], "html/rendering/non-replaced-elements/the-hr-element-0/align-ref.html": [ "eb2082192a4be6b4b4d6eafc7c3d609afb0cde49", "support" @@ -47621,10 +45956,6 @@ "119fa52740995b00e49c170914265958be5403c5", "reftest" ], - "html/rendering/non-replaced-elements/the-hr-element-0/color-expected.html": [ - "1ba77c5a096a3aabffca5031c056d2b7e946bc56", - "support" - ], "html/rendering/non-replaced-elements/the-hr-element-0/color-ref.html": [ "1ba77c5a096a3aabffca5031c056d2b7e946bc56", "support" @@ -47633,10 +45964,6 @@ "37ba851b3393d3fe2e60985f502bf29438947449", "reftest" ], - "html/rendering/non-replaced-elements/the-hr-element-0/width-expected.html": [ - "33d7505b42b0507d8fd73151e32fa71d73e3b862", - "support" - ], "html/rendering/non-replaced-elements/the-hr-element-0/width-ref.html": [ "33d7505b42b0507d8fd73151e32fa71d73e3b862", "support" @@ -47649,10 +45976,6 @@ "588faa58c26ff0c8f2bdbf52bd0549f119028c92", "support" ], - "html/rendering/non-replaced-elements/the-page/body_text_00ffff-expected.html": [ - "def352c51713beb2904827cb297a6ac8664e40a8", - "support" - ], "html/rendering/non-replaced-elements/the-page/body_text_00ffff-ref.html": [ "def352c51713beb2904827cb297a6ac8664e40a8", "support" @@ -47665,10 +45988,6 @@ "7a229199399e678847280e6e88e40e5b37bfdd11", "support" ], - "html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-dim-expected.html": [ - "a383f05b889bb8272aec262b271890334460db12", - "support" - ], "html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-dim-ref.html": [ "a383f05b889bb8272aec262b271890334460db12", "support" @@ -47709,10 +46028,6 @@ "c1a52d71881ec5326761f415cc319a467587be17", "reftest" ], - "html/rendering/replaced-elements/embedded-content-rendering-rules/canvas-fallback-expected.html": [ - "b4f3b4b0159928ea0d7dab5d4dbf9f75676a4a07", - "support" - ], "html/rendering/replaced-elements/embedded-content-rendering-rules/canvas-fallback-ref.html": [ "b4f3b4b0159928ea0d7dab5d4dbf9f75676a4a07", "support" @@ -47721,10 +46036,6 @@ "29e2eedb67a0a8e80c5bc09cbda5acb3d74bed74", "reftest" ], - "html/rendering/replaced-elements/embedded-content-rendering-rules/canvas_scale-expected.html": [ - "c7485363b55464d72b14633f0fdfc46243609758", - "support" - ], "html/rendering/replaced-elements/embedded-content-rendering-rules/canvas_scale.html": [ "625ed524ddc055ed07e1df91637d7aba1d4e59f7", "reftest" @@ -47733,10 +46044,6 @@ "c7485363b55464d72b14633f0fdfc46243609758", "support" ], - "html/rendering/replaced-elements/embedded-content-rendering-rules/canvas_without_context_a-expected.html": [ - "9c96574d448d5df8aeb64bcdda404660e99d815f", - "support" - ], "html/rendering/replaced-elements/embedded-content-rendering-rules/canvas_without_context_a.html": [ "762f90525d565216dc516bdddb115c3426054400", "reftest" @@ -47745,10 +46052,6 @@ "9c96574d448d5df8aeb64bcdda404660e99d815f", "support" ], - "html/rendering/replaced-elements/images/space-expected.html": [ - "d5b9df319bcb762ac7dedf04fec4c08885a25101", - "support" - ], "html/rendering/replaced-elements/images/space-ref.html": [ "d5b9df319bcb762ac7dedf04fec4c08885a25101", "support" @@ -47901,10 +46204,6 @@ "e4a66764ea94d51b42d485d75a3305ea2ab79226", "support" ], - "html/semantics/document-metadata/the-link-element/stylesheet-empty-href-expected.html": [ - "1ac8e070630e58df8489b779bdd75cb2b38c25ef", - "support" - ], "html/semantics/document-metadata/the-link-element/stylesheet-empty-href-ref.html": [ "1ac8e070630e58df8489b779bdd75cb2b38c25ef", "support" @@ -47913,10 +46212,6 @@ "8c54fc2f3709a971b97d963e5e83e7566c298968", "reftest" ], - "html/semantics/document-metadata/the-link-element/stylesheet-media-expected.html": [ - "1ac8e070630e58df8489b779bdd75cb2b38c25ef", - "support" - ], "html/semantics/document-metadata/the-link-element/stylesheet-media-ref.html": [ "1ac8e070630e58df8489b779bdd75cb2b38c25ef", "support" @@ -47925,10 +46220,6 @@ "e92ded997918ce8e77ec42ed53e38be5c7df1656", "reftest" ], - "html/semantics/document-metadata/the-link-element/stylesheet-with-base-expected.html": [ - "de15b17da5a06486fa1cb13e241115ccca1f8a45", - "support" - ], "html/semantics/document-metadata/the-link-element/stylesheet-with-base-ref.html": [ "de15b17da5a06486fa1cb13e241115ccca1f8a45", "support" @@ -47985,10 +46276,6 @@ "a79507053f56789fe02f0cc6ef841c9d0e46d490", "testharness" ], - "html/semantics/document-metadata/the-style-element/html_style_in_comment-expected.html": [ - "e2ea59540fe2572a5a7a3af6d3dc3462aeeb2a2a", - "support" - ], "html/semantics/document-metadata/the-style-element/html_style_in_comment-ref.html": [ "e2ea59540fe2572a5a7a3af6d3dc3462aeeb2a2a", "support" @@ -48577,10 +46864,6 @@ "db06f508b6f178c4e0deb19b6820df02b058bd32", "testharness" ], - "html/semantics/embedded-content/the-embed-element/embed-represent-nothing-01-expected.html": [ - "bdcd35bc3b9f80ec0c25c34a7977b97a06ffab88", - "support" - ], "html/semantics/embedded-content/the-embed-element/embed-represent-nothing-01.html": [ "2b595a45498791fc4737ea3095bb5ee89cbc3d8f", "reftest" @@ -48637,10 +46920,6 @@ "d45f7b847e30fe8e3c2e03ef838b55d11ef4592f", "testharness" ], - "html/semantics/embedded-content/the-iframe-element/iframe-with-base-expected.html": [ - "9e04580af238e0aea1f124e1748b0a008ddb8a0b", - "support" - ], "html/semantics/embedded-content/the-iframe-element/iframe-with-base-ref.html": [ "9e04580af238e0aea1f124e1748b0a008ddb8a0b", "support" @@ -48741,10 +47020,6 @@ "bdbfbe9a5908c6233bd7b9697a0762bd2e0f6ede", "testharness" ], - "html/semantics/embedded-content/the-img-element/document-base-url-expected.html": [ - "add78257076d22891334b93c8072d098ace9b6eb", - "visual" - ], "html/semantics/embedded-content/the-img-element/document-base-url-ref.html": [ "add78257076d22891334b93c8072d098ace9b6eb", "support" @@ -49277,10 +47552,6 @@ "3cc3df0d6b19a14ab979e2fffedce95e8380fca8", "testharness" ], - "html/semantics/forms/the-input-element/image01-expected.html": [ - "9ff11164254c68977111a83071345360b0789812", - "support" - ], "html/semantics/forms/the-input-element/image01-ref.html": [ "9ff11164254c68977111a83071345360b0789812", "support" @@ -49525,10 +47796,6 @@ "b61235681689807b5d46b8aaca9ae6c7a18039f7", "testharness" ], - "html/semantics/forms/the-textarea-element/textarea-newline-bidi-expected.html": [ - "26eb3e615f8b0e15cf02b7ee18d39fd71b04da70", - "visual" - ], "html/semantics/forms/the-textarea-element/textarea-newline-bidi-ref.html": [ "26eb3e615f8b0e15cf02b7ee18d39fd71b04da70", "support" @@ -49545,18 +47812,10 @@ "176e2ca4fdb0fe1b83e0154f5b61340fdacf66a9", "support" ], - "html/semantics/forms/the-textarea-element/wrap-reflect-1a-expected.html": [ - "176e2ca4fdb0fe1b83e0154f5b61340fdacf66a9", - "visual" - ], "html/semantics/forms/the-textarea-element/wrap-reflect-1a.html": [ "9487ed78005c0ccc3d6ba8a2f4bd42f15659e00e", "reftest" ], - "html/semantics/forms/the-textarea-element/wrap-reflect-1b-expected.html": [ - "176e2ca4fdb0fe1b83e0154f5b61340fdacf66a9", - "visual" - ], "html/semantics/forms/the-textarea-element/wrap-reflect-1b.html": [ "4920affb48df0cb5e9a2c75776125ee1bf31904d", "reftest" @@ -49589,10 +47848,6 @@ "1bb031d483d052dfc4481e002371ccc74570ef07", "testharness" ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-001-expected.html": [ - "a4b6ead0a56d0bd187b7a36e17678bf7836d9801", - "visual" - ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-001-ref.html": [ "a4b6ead0a56d0bd187b7a36e17678bf7836d9801", "support" @@ -49601,10 +47856,6 @@ "41a9a1d617feb2a786a04343d37aadcccd8bbd33", "reftest" ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-002-expected.html": [ - "07484bd1be25d3bb943d220d95681cf18d0c3397", - "visual" - ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-002-ref.html": [ "07484bd1be25d3bb943d220d95681cf18d0c3397", "support" @@ -49613,10 +47864,6 @@ "cf41d95e33f67b99d974464397f933b4ae09149c", "reftest" ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item-expected.html": [ - "df9b660f10e9d238ed7509661797375f26da219d", - "visual" - ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item-ref.html": [ "df9b660f10e9d238ed7509661797375f26da219d", "support" @@ -49625,10 +47872,6 @@ "c302bd98a42f9fd866c036e8ec1c4e535d9a9020", "reftest" ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-menu-expected.html": [ - "43eae10a8c31389116b8f742090b581b6a0602ad", - "visual" - ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-menu-ref.html": [ "43eae10a8c31389116b8f742090b581b6a0602ad", "support" @@ -49637,10 +47880,6 @@ "9543c8c640c115d8c7e793a23783bcf7b86545f0", "reftest" ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-mixed-expected.html": [ - "ee952f316823dccdeaa87fea7acf9e83fa9c2ecb", - "visual" - ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-mixed-ref.html": [ "ee952f316823dccdeaa87fea7acf9e83fa9c2ecb", "support" @@ -49649,10 +47888,6 @@ "73ad146f573b50a40caead509382e639b2ff0182", "reftest" ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-not-dir-expected.html": [ - "acd7602d7c5da1b3bb8223a56624885f3e68cbbf", - "visual" - ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-not-dir-ref.html": [ "acd7602d7c5da1b3bb8223a56624885f3e68cbbf", "support" @@ -49661,10 +47896,6 @@ "6c59df96f4ac30f316ece8f52b1e8f04ff738e09", "reftest" ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ol-expected.html": [ - "10ce2e3b4ebccd9e33ceb1f000f38a913e62376a", - "visual" - ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ol-ref.html": [ "10ce2e3b4ebccd9e33ceb1f000f38a913e62376a", "support" @@ -49673,10 +47904,6 @@ "6ae9ba3ca7b7c392f6bb497f3f7b023ac43bd5ba", "reftest" ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-parent-expected.html": [ - "8df865548be05deeb324e44a12cd8287e3dd8f06", - "visual" - ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-parent-ref.html": [ "8df865548be05deeb324e44a12cd8287e3dd8f06", "support" @@ -49685,10 +47912,6 @@ "a2c717ea87a4bc4bfe2c9d3c2def14728083563e", "reftest" ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-skip-no-boxes-expected.html": [ - "1d3eac3f8643649d69983509d1756ca1045cca35", - "visual" - ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-skip-no-boxes-ref.html": [ "1d3eac3f8643649d69983509d1756ca1045cca35", "support" @@ -49697,10 +47920,6 @@ "9406705dd604bb1c581854409044d767001ab2db", "reftest" ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ul-expected.html": [ - "af8704449639c5a531d40411c841ce6f80b76367", - "visual" - ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ul-ref.html": [ "af8704449639c5a531d40411c841ce6f80b76367", "support" @@ -49709,10 +47928,6 @@ "680ef0dbfea0bcb7ca12905c4d6ccf5a65b29707", "reftest" ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-no-list-owner-expected.html": [ - "3d09b34aee7f995c2e77673602443b1d9bc1a940", - "visual" - ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-no-list-owner-ref.html": [ "3d09b34aee7f995c2e77673602443b1d9bc1a940", "support" @@ -49721,10 +47936,6 @@ "829a238ff1da7b16a7ee0d39df51147f7a5882fd", "reftest" ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-not-being-rendered-expected.html": [ - "2547d6ce7e7a8062fae3381b8e3098641dfb0b77", - "visual" - ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-not-being-rendered-ref.html": [ "2547d6ce7e7a8062fae3381b8e3098641dfb0b77", "support" @@ -49741,10 +47952,6 @@ "9832675121d169fa35e20e7b8b4a2fbb1fa32cd7", "support" ], - "html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001-expected.html": [ - "6c860e7e2df46c307147da987fff7035bdf6cb5f", - "visual" - ], "html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001-ref.html": [ "6c860e7e2df46c307147da987fff7035bdf6cb5f", "support" @@ -49753,10 +47960,6 @@ "54bf0bbf4db645694aa75fb0d92efd03679a99e2", "reftest" ], - "html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001-expected.html": [ - "fcf0c36f565f988c351c9132e2858ebb34bd2591", - "visual" - ], "html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001-ref.html": [ "fcf0c36f565f988c351c9132e2858ebb34bd2591", "support" @@ -49765,10 +47968,6 @@ "1005aafa6ddaaf7fe0a5f030d6268591eaaa25be", "reftest" ], - "html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002-expected.html": [ - "976fa92e353d0216b233b7fc9fc0d5d39e9ab343", - "visual" - ], "html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002-ref.html": [ "976fa92e353d0216b233b7fc9fc0d5d39e9ab343", "support" @@ -49777,10 +47976,6 @@ "df89de10d8863dfa1533ab905a52a8b625d46391", "reftest" ], - "html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001-expected.html": [ - "f0f8211e5e80e5eedaea3bb8513dd91c6c07e8c1", - "visual" - ], "html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001-ref.html": [ "f0f8211e5e80e5eedaea3bb8513dd91c6c07e8c1", "support" @@ -49789,10 +47984,6 @@ "02ce969c8019c3f2c2ebf239fac84fac2f094251", "reftest" ], - "html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002-expected.html": [ - "2d27dc4ba0139e7367a9325dde46037203ce8798", - "visual" - ], "html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002-ref.html": [ "2d27dc4ba0139e7367a9325dde46037203ce8798", "support" @@ -49801,10 +47992,6 @@ "ffdddc968bf4ec26fae3a524af1a65eeb1671afe", "reftest" ], - "html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003-expected.html": [ - "c7a89b7bf448bd719e1382a382c0cdd5c3d583c9", - "visual" - ], "html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003-ref.html": [ "c7a89b7bf448bd719e1382a382c0cdd5c3d583c9", "support" @@ -49833,50 +48020,26 @@ "fba28dfd4365113e22cde81fa1c8ff7ea3c12f42", "support" ], - "html/semantics/grouping-content/the-ol-element/reversed-1a-expected.html": [ - "fba28dfd4365113e22cde81fa1c8ff7ea3c12f42", - "support" - ], "html/semantics/grouping-content/the-ol-element/reversed-1a.html": [ "9f36d1263ec2dcce6adb5a584efd176c66d33741", "reftest" ], - "html/semantics/grouping-content/the-ol-element/reversed-1b-expected.html": [ - "fba28dfd4365113e22cde81fa1c8ff7ea3c12f42", - "support" - ], "html/semantics/grouping-content/the-ol-element/reversed-1b.html": [ "fc31d2e57e43ee9a7c45c367552f01570fa7967e", "reftest" ], - "html/semantics/grouping-content/the-ol-element/reversed-1c-expected.html": [ - "fba28dfd4365113e22cde81fa1c8ff7ea3c12f42", - "support" - ], "html/semantics/grouping-content/the-ol-element/reversed-1c.html": [ "f501c5a507374616d8b65ac9f3f2f23e15b10d7e", "reftest" ], - "html/semantics/grouping-content/the-ol-element/reversed-1d-expected.html": [ - "fba28dfd4365113e22cde81fa1c8ff7ea3c12f42", - "support" - ], "html/semantics/grouping-content/the-ol-element/reversed-1d.html": [ "10d79be3235c358b04de0682cdd1c5382c789a14", "reftest" ], - "html/semantics/grouping-content/the-ol-element/reversed-1e-expected.html": [ - "fba28dfd4365113e22cde81fa1c8ff7ea3c12f42", - "support" - ], "html/semantics/grouping-content/the-ol-element/reversed-1e.html": [ "89f0c0d4239c29d1b47291c0e3baf007bbb418ce", "reftest" ], - "html/semantics/grouping-content/the-ol-element/reversed-2-expected.html": [ - "e5629e10dacd7c8eea4dc03f57e3dea7339961dc", - "support" - ], "html/semantics/grouping-content/the-ol-element/reversed-2-ref.html": [ "e5629e10dacd7c8eea4dc03f57e3dea7339961dc", "support" @@ -49889,10 +48052,6 @@ "021a20053c9d7921937ac4a488b562f5520004fd", "testharness" ], - "html/semantics/grouping-content/the-pre-element/grouping-pre-reftest-001-expected.html": [ - "6b46337620623ec21b002d2eb1aad905c0c401b6", - "visual" - ], "html/semantics/grouping-content/the-pre-element/grouping-pre-reftest-001-ref.html": [ "6b46337620623ec21b002d2eb1aad905c0c401b6", "support" @@ -49905,10 +48064,6 @@ "9aa6e489f7d407be49797832db208ac2d452e48c", "testharness" ], - "html/semantics/grouping-content/the-pre-element/pre-newline-bidi-expected.html": [ - "321e6abdc6290977e32c4c9ff79b6935d708cb05", - "visual" - ], "html/semantics/grouping-content/the-pre-element/pre-newline-bidi-ref.html": [ "321e6abdc6290977e32c4c9ff79b6935d708cb05", "support" @@ -50013,10 +48168,6 @@ "363d0cc7d503f32f6cf8f43479de3b3fb8e401d8", "support" ], - "html/semantics/links/linktypes/alternate-css-expected.html": [ - "0962515838bc3815dae82af0df45f8f5bd60c283", - "support" - ], "html/semantics/links/linktypes/alternate-css-ref.html": [ "0962515838bc3815dae82af0df45f8f5bd60c283", "support" @@ -50717,10 +48868,6 @@ "d6cf92ac34d83cdd6357d516daeb87108933f8ed", "testharness" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default-expected.html": [ - "5895c849bb0236cbfcdc3114b0f34b8babecb976", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default-ref.html": [ "5895c849bb0236cbfcdc3114b0f34b8babecb976", "support" @@ -50729,10 +48876,6 @@ "3093a0683442d30c4474d79943c15d1d92314322", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-missing-pdf-expected.html": [ - "8af8a3f045917edd1a3fda1109c55015b00099f8", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-missing-pdf-ref.html": [ "8af8a3f045917edd1a3fda1109c55015b00099f8", "support" @@ -50741,10 +48884,6 @@ "2a9cfaac6e4ebccbb027d057c5e512826a137ef0", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-nested-expected.html": [ - "6c8136e6450ab1f8e616930d6c80dc9f41fa10c9", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-nested-ref.html": [ "6c8136e6450ab1f8e616930d6c80dc9f41fa10c9", "support" @@ -50753,10 +48892,6 @@ "8a29b0e4d110ecc6826eda5d0841d4c30a17a658", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-number-expected.html": [ - "f456f7f8168f10e7c9a0543e9a086dacfda3296f", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-number-ref.html": [ "f456f7f8168f10e7c9a0543e9a086dacfda3296f", "support" @@ -50765,10 +48900,6 @@ "6ae71e93299912991b5ae19cb964df10772f1af6", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-separate-expected.html": [ - "ef2d251d3425f9cc49bf77406fb8dfc5f13d1f78", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-separate-ref.html": [ "ef2d251d3425f9cc49bf77406fb8dfc5f13d1f78", "support" @@ -50777,10 +48908,6 @@ "0fc7be24d07487f0601e977afb7a4fd32c5fe5f2", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-1-expected.html": [ - "4fba4b4a9d19428f44dd55c3db9c9f104ec25303", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-1-ref.html": [ "4fba4b4a9d19428f44dd55c3db9c9f104ec25303", "support" @@ -50789,10 +48916,6 @@ "9973163fbbfb913f37f245322050cc0f27719575", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-2-expected.html": [ - "8693fea0c30c78f08b953731b6f5c6df3d8b0756", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-2-ref.html": [ "8693fea0c30c78f08b953731b6f5c6df3d8b0756", "support" @@ -50801,10 +48924,6 @@ "03a0e99254a0036d593e3aa34c4ac6fed6a400f3", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-1-expected.html": [ - "2b7f3d1067bb626ae9c76f64ed47a47377a85991", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-1-ref.html": [ "2b7f3d1067bb626ae9c76f64ed47a47377a85991", "support" @@ -50813,10 +48932,6 @@ "4e5747638aee8b78420d14de677a56b391278d22", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-2-expected.html": [ - "3165dc2708a2fe319121d8c9b4c9f77d0f0def10", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-2-ref.html": [ "3165dc2708a2fe319121d8c9b4c9f77d0f0def10", "support" @@ -50825,10 +48940,6 @@ "9b6d332f8b1a1fee0169aaf2e5ae312cef54c44b", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-1-expected.html": [ - "d38cfd6a6a62a89a154714783883b8ecd2450077", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-1-ref.html": [ "d38cfd6a6a62a89a154714783883b8ecd2450077", "support" @@ -50837,10 +48948,6 @@ "0687c3cdf4ad2a817a6d84f928bdf9464d059360", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-2-expected.html": [ - "3165dc2708a2fe319121d8c9b4c9f77d0f0def10", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-2-ref.html": [ "3165dc2708a2fe319121d8c9b4c9f77d0f0def10", "support" @@ -50849,10 +48956,6 @@ "93501a1476d5609568800792213dd07b76a8a070", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-1-expected.html": [ - "da32b06ca1fe257aff5bd241c8627604a926cdd3", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-1-ref.html": [ "da32b06ca1fe257aff5bd241c8627604a926cdd3", "support" @@ -50861,10 +48964,6 @@ "d56a3f2148198fd26672ac6e7a2375d2c716fbff", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-2-expected.html": [ - "f8bef8cd792031689a2e636231fedb4b90cc457c", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-2-ref.html": [ "f8bef8cd792031689a2e636231fedb4b90cc457c", "support" @@ -50873,10 +48972,6 @@ "41167184dde5d4b33fd25956355e074c60ed2a8a", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-surrounding-run-expected.html": [ - "75e0c3e20c435cd2dfeb83c528bb873653a08a27", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-surrounding-run-ref.html": [ "75e0c3e20c435cd2dfeb83c528bb873653a08a27", "support" @@ -50885,10 +48980,6 @@ "df17aa62a40ab35d4518826e693f3a3178db757d", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-wrapped-expected.html": [ - "1be3e7d726bce9dd2e48f3ac04850c6aa1ff164f", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-wrapped-ref.html": [ "1be3e7d726bce9dd2e48f3ac04850c6aa1ff164f", "support" @@ -50897,10 +48988,6 @@ "7b737c54122882aafa0a0675a7c718686871feb7", "reftest" ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-paragraph-level-container-expected.html": [ - "8f06616796375f3c8ef8f6ca99a7277558caaa69", - "support" - ], "html/semantics/text-level-semantics/the-bdi-element/bdi-paragraph-level-container-ref.html": [ "8f06616796375f3c8ef8f6ca99a7277558caaa69", "support" @@ -50909,34 +48996,18 @@ "c264f67ee5a5c11ed1e4d4b71a567da69f6d609c", "reftest" ], - "html/semantics/text-level-semantics/the-bdo-element/bdo-child-expected.html": [ - "da64ec4f4c5daaffb8efa6834570103136d9598d", - "support" - ], "html/semantics/text-level-semantics/the-bdo-element/bdo-child.html": [ "cf129c53d7e71643af317e353322bc8c78f9b557", "reftest" ], - "html/semantics/text-level-semantics/the-bdo-element/bdo-ltr-expected.html": [ - "da64ec4f4c5daaffb8efa6834570103136d9598d", - "support" - ], "html/semantics/text-level-semantics/the-bdo-element/bdo-ltr.html": [ "28be43ccc519cb0b603b51568a0f6233b2b18ba7", "reftest" ], - "html/semantics/text-level-semantics/the-bdo-element/bdo-override-expected.html": [ - "da64ec4f4c5daaffb8efa6834570103136d9598d", - "support" - ], "html/semantics/text-level-semantics/the-bdo-element/bdo-override.html": [ "c11d8073a5f401984a5d916e0c3b54b4ea888146", "reftest" ], - "html/semantics/text-level-semantics/the-bdo-element/bidi-001-expected.html": [ - "da64ec4f4c5daaffb8efa6834570103136d9598d", - "support" - ], "html/semantics/text-level-semantics/the-bdo-element/bidi-001-ref.html": [ "da64ec4f4c5daaffb8efa6834570103136d9598d", "support" @@ -50945,14 +49016,6 @@ "3fcc7f141c74fc7d790c05f103092fa7e8eb80fe", "reftest" ], - "html/semantics/text-level-semantics/the-br-element/br-bidi-expected.html": [ - "96d57057095200c2c35fd45e2c5f16191e143a8e", - "visual" - ], - "html/semantics/text-level-semantics/the-br-element/br-bidi-in-inline-ancestors-expected.html": [ - "fc71edfa9ac6d1ee7a271f7519643246e068681e", - "support" - ], "html/semantics/text-level-semantics/the-br-element/br-bidi-in-inline-ancestors-ref.html": [ "fc71edfa9ac6d1ee7a271f7519643246e068681e", "support" @@ -50985,10 +49048,6 @@ "437568c95f09bac529d5625a66f41d4c57b0eece", "testharness" ], - "html/semantics/text-level-semantics/the-wbr-element/wbr-element-expected.html": [ - "36f56c25dc44a3c3ad305f4ad8f8bfc2a8e66a26", - "support" - ], "html/semantics/text-level-semantics/the-wbr-element/wbr-element-ref.html": [ "36f56c25dc44a3c3ad305f4ad8f8bfc2a8e66a26", "support" @@ -52913,10 +50972,6 @@ "161c0bfaabbfb59c426e855b9dcfa746ea9e8f95", "testharness" ], - "quirks-mode/historical/list-item-bullet-size-expected.html": [ - "2579fff5cb55faf66c71dfed695f05db8774d98d", - "support" - ], "quirks-mode/historical/list-item-bullet-size-ref.html": [ "2579fff5cb55faf66c71dfed695f05db8774d98d", "support" @@ -54945,10 +53000,6 @@ "13d9a1cd232638aabdb16fe690e4dc1b4e42e63d", "support" ], - "shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest-expected.html": [ - "ef49f33b6b0cf7cbccb014b8d9f8a3b566a65acd", - "support" - ], "shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest-ref.html": [ "ef49f33b6b0cf7cbccb014b8d9f8a3b566a65acd", "support" @@ -54957,10 +53008,6 @@ "02e413b7c949565eec471a70567070b51862de05", "reftest" ], - "shadow-dom/untriaged/shadow-trees/reprojection/reprojection-001-expected.html": [ - "aed15b3ac6099e78c85888efda6a83f036ea7b2e", - "support" - ], "shadow-dom/untriaged/shadow-trees/reprojection/reprojection-001-ref.html": [ "aed15b3ac6099e78c85888efda6a83f036ea7b2e", "support" @@ -54969,10 +53016,6 @@ "f0b31261b239418c6880a296c801dee794efce9b", "reftest" ], - "shadow-dom/untriaged/shadow-trees/shadow-root-001-expected.html": [ - "116623b23b371fa7cab9a896cf1976c20a10c8e7", - "support" - ], "shadow-dom/untriaged/shadow-trees/shadow-root-001-ref.html": [ "116623b23b371fa7cab9a896cf1976c20a10c8e7", "support" @@ -54981,10 +53024,6 @@ "e280b5a4deac961299865af7ecb2a07dd15d04ed", "reftest" ], - "shadow-dom/untriaged/shadow-trees/shadow-root-002-expected.html": [ - "cf4a5b16b9b6bd4f2947c22a31999dc2b6ba337b", - "support" - ], "shadow-dom/untriaged/shadow-trees/shadow-root-002-ref.html": [ "cf4a5b16b9b6bd4f2947c22a31999dc2b6ba337b", "support" @@ -54993,10 +53032,6 @@ "893c799fd943b70f261f39909e0a3976ee56d769", "reftest" ], - "shadow-dom/untriaged/shadow-trees/text-decoration-001-expected.html": [ - "06ae2a7dd068bbc238d5eb439ba6a145d32670ae", - "support" - ], "shadow-dom/untriaged/shadow-trees/text-decoration-001-ref.html": [ "06ae2a7dd068bbc238d5eb439ba6a145d32670ae", "support" @@ -55061,10 +53096,6 @@ "fe20957cf7647794085dc4bc280ac64652200b24", "testharness" ], - "shadow-dom/untriaged/styles/not-apply-in-shadow-root-001-expected.html": [ - "f1a5d01eb6b34ebe95253eddaa9890cc651167d3", - "support" - ], "shadow-dom/untriaged/styles/not-apply-in-shadow-root-001-ref.html": [ "f1a5d01eb6b34ebe95253eddaa9890cc651167d3", "support" @@ -56045,10 +54076,6 @@ "43fcfad319ce0492d76ea062f37ddfc07a62a8aa", "testharness" ], - "svg/linking/reftests/href-a-element-attr-change-expected.html": [ - "73b9070b0ecb76c45aaecd6b9e373d99d215bd84", - "support" - ], "svg/linking/reftests/href-a-element-attr-change.html": [ "6605832f7f8bff45a35fd436effa0c01e12c91e5", "reftest" @@ -56057,10 +54084,6 @@ "73b9070b0ecb76c45aaecd6b9e373d99d215bd84", "support" ], - "svg/linking/reftests/href-feImage-element-expected.html": [ - "2fdd34f2d0747fd24d6619c6e9410faba745bad1", - "support" - ], "svg/linking/reftests/href-feImage-element-ref.html": [ "2fdd34f2d0747fd24d6619c6e9410faba745bad1", "support" @@ -56069,10 +54092,6 @@ "141396bd312319b949e0df1208e5136d76e1b003", "reftest" ], - "svg/linking/reftests/href-filter-element-expected.html": [ - "4a52318b315aedf81a7b7b0c6edd7612fda7206e", - "support" - ], "svg/linking/reftests/href-filter-element-ref.html": [ "4a52318b315aedf81a7b7b0c6edd7612fda7206e", "support" @@ -56081,10 +54100,6 @@ "1f5e67a03ba45e8cb7a02df8de737078436fbff1", "reftest" ], - "svg/linking/reftests/href-gradient-element-expected.html": [ - "d4833e7a117a083348a314dacf4e9ab8c64f07c9", - "support" - ], "svg/linking/reftests/href-gradient-element-ref.html": [ "d4833e7a117a083348a314dacf4e9ab8c64f07c9", "support" @@ -56093,10 +54108,6 @@ "6d45de7f34f8bda2d60b6022ecd01f673cb34c2f", "reftest" ], - "svg/linking/reftests/href-image-element-expected.html": [ - "305396893fe2c4e16056968f40117e3dc0e3aea3", - "support" - ], "svg/linking/reftests/href-image-element-ref.html": [ "305396893fe2c4e16056968f40117e3dc0e3aea3", "support" @@ -56105,10 +54116,6 @@ "a872a27eafe20c885e99cc9a910a55b9bc57beb5", "reftest" ], - "svg/linking/reftests/href-pattern-element-expected.html": [ - "ddcce2b27d57622192b4a62a890a73775702116f", - "support" - ], "svg/linking/reftests/href-pattern-element-ref.html": [ "ddcce2b27d57622192b4a62a890a73775702116f", "support" @@ -56117,10 +54124,6 @@ "0209fc26f91cda97588976cfdd0bc247de19613c", "reftest" ], - "svg/linking/reftests/href-textPath-element-expected.html": [ - "a95d304f663ee0770b3bcac1eb95a0d5c7db7f83", - "support" - ], "svg/linking/reftests/href-textPath-element-ref.html": [ "a95d304f663ee0770b3bcac1eb95a0d5c7db7f83", "support" @@ -56129,10 +54132,6 @@ "23988646ddaed6045c30e6756791613d6f8ba2ec", "reftest" ], - "svg/linking/reftests/href-use-element-expected.html": [ - "8a4977599d6f531a76524191cb9bad75803a455e", - "support" - ], "svg/linking/reftests/href-use-element-ref.html": [ "8a4977599d6f531a76524191cb9bad75803a455e", "support"
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-EN-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-EN-R-expected.html deleted file mode 100644 index 15bd618..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-EN-R-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with EN, then R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text. - In this test, it is the Hebrew letter Alef since digits are not strongly - directional, thus the direction must be resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <p dir="rtl">123אבגABC.</p> - </div> - <div dir="rtl"> - <p dir="rtl">123אבגABC.</p> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <p dir="rtl">123אבגABC.</p> - </div> - <div dir="rtl"> - <p dir="rtl">123אבגABC.</p> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-L-expected.html deleted file mode 100644 index 23da64e..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-L-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text. - In this test, it is the Latin letter A, thus the direction must be - resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <p dir="ltr">ABCאבג.</p> - </div> - <div dir="rtl"> - <p dir="ltr">ABCאבג.</p> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <p dir="ltr">ABCאבג.</p> - </div> - <div dir="rtl"> - <p dir="ltr">ABCאבג.</p> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-EN-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-EN-L-expected.html deleted file mode 100644 index c7977d1..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-EN-L-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with N, then EN, then L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text. - In this test, it is the Latin letter A since neutrals and digits are not - strongly directional, thus the direction must be resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <p dir="ltr">.-=123ABCאבג.</p> - </div> - <div dir="rtl"> - <p dir="ltr">.-=123ABCאבג.</p> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <p dir="ltr">.-=123ABCאבג.</p> - </div> - <div dir="rtl"> - <p dir="ltr">.-=123ABCאבג.</p> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-EN-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-EN-R-expected.html deleted file mode 100644 index aae50bc7..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-EN-R-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with N, then EN, then R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text. - In this test, it is the Hebrew letter Alef since neutrals and digits are not - strongly directional, thus the direction must be resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <p dir="rtl">.-=123אבגABC.</p> - </div> - <div dir="rtl"> - <p dir="rtl">.-=123אבגABC.</p> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <p dir="rtl">.-=123אבגABC.</p> - </div> - <div dir="rtl"> - <p dir="rtl">.-=123אבגABC.</p> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-EN-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-EN-expected.html deleted file mode 100644 index 154d56a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-EN-expected.html +++ /dev/null
@@ -1,51 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with N, then EN, then L</title> - <link rel="match" href="dir_auto-N-EN-L-ref.html" /> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text, ignoring neutrals and numbers. - If there is no strong character, as in this test, the direction defaults to LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="test"> - <div dir="ltr"> - <p dir="ltr">@123!</p> - </div> - <div dir="rtl"> - <p dir="ltr">@123!</p> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <p dir="ltr">@123!</p> - </div> - <div dir="rtl"> - <p dir="ltr">@123!</p> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-EN-ref-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-EN-ref-expected.html deleted file mode 100644 index c7977d1..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-EN-ref-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with N, then EN, then L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text. - In this test, it is the Latin letter A since neutrals and digits are not - strongly directional, thus the direction must be resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <p dir="ltr">.-=123ABCאבג.</p> - </div> - <div dir="rtl"> - <p dir="ltr">.-=123ABCאבג.</p> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <p dir="ltr">.-=123ABCאבג.</p> - </div> - <div dir="rtl"> - <p dir="ltr">.-=123ABCאבג.</p> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-L-expected.html deleted file mode 100644 index 4bbaca1e..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-L-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with N, then L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text. - In this test, it is the Latin letter A since neutrals are not - strongly directional, thus the direction must be resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <p dir="ltr">.-=ABCאבג.</p> - </div> - <div dir="rtl"> - <p dir="ltr">.-=ABCאבג.</p> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <p dir="ltr">.-=ABCאבג.</p> - </div> - <div dir="rtl"> - <p dir="ltr">.-=ABCאבג.</p> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-R-expected.html deleted file mode 100644 index 7a1daed..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-N-R-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with N, then R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text. - In this test, it is the Hebrew letter Alef since neutrals are not - strongly directional, thus the direction must be resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <p dir="rtl">.-=אבגABC.</p> - </div> - <div dir="rtl"> - <p dir="rtl">.-=אבגABC.</p> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <p dir="rtl">.-=אבגABC.</p> - </div> - <div dir="rtl"> - <p dir="rtl">.-=אבגABC.</p> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-R-expected.html deleted file mode 100644 index c9dc530..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-R-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text. - In this test, it is the Hebrew letter Alef, thus the direction must be - resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - </div> - <div class="test"> - <div dir="ltr"> - <p dir="rtl">אבגABC.</p> - </div> - <div dir="rtl"> - <p dir="rtl">אבגABC.</p> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <p dir="rtl">אבגABC.</p> - </div> - <div dir="rtl"> - <p dir="rtl">אבגABC.</p> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-L-expected.html deleted file mode 100644 index 4e42a11a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-L-expected.html +++ /dev/null
@@ -1,61 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with L within contained element</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text, including text within contained elements. - In this test, it is the Latin letter A, thus the direction must be - resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - ד - The Hebrew letter Dalet (strongly RTL). - ה - The Hebrew letter He (strongly RTL). - ו - The Hebrew letter Vav (strongly RTL). - ז - The Hebrew letter Zayin (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <div dir="ltr"><div><div>ABCאבג.</div>דה</div>ו</div> - </div> - <div dir="rtl"> - <div dir="ltr"><div><div>ABCאבג.</div>דה</div>ו</div> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <div dir="ltr"><div><div>ABCאבג.</div>דה</div>ו</div> - </div> - <div dir="rtl"> - <div dir="ltr"><div><div>ABCאבג.</div>דה</div>ו</div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-R-expected.html deleted file mode 100644 index a3938bd..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-R-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with R within contained element</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text, including text within contained elements. - In this test, it is the Hebrew letter Alef, thus the direction must be - resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <div dir="rtl"><div><div>אבגABC.</div>XY</div>Z</div> - </div> - <div dir="rtl"> - <div dir="rtl"><div><div>אבגABC.</div>XY</div>Z</div> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <div dir="rtl"><div><div>אבגABC.</div>XY</div>Z</div> - </div> - <div dir="rtl"> - <div dir="rtl"><div><div>אבגABC.</div>XY</div>Z</div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-bdi-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-bdi-L-expected.html deleted file mode 100644 index 470220c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-bdi-L-expected.html +++ /dev/null
@@ -1,60 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with bdi, then L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text while ignoring bdi elements. - In this test, it is the Latin letter A, thus the direction must be - resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - ד - The Hebrew letter Dalet (strongly RTL). - ה - The Hebrew letter He (strongly RTL). - ו - The Hebrew letter Vav (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <div dir="ltr"><bdi>דהו</bdi>ABCאבג.</div> - </div> - <div dir="rtl"> - <div dir="ltr"><bdi>דהו</bdi>ABCאבג.</div> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <div dir="ltr"><bdi>דהו</bdi>ABCאבג.</div> - </div> - <div dir="rtl"> - <div dir="ltr"><bdi>דהו</bdi>ABCאבג.</div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-bdi-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-bdi-R-expected.html deleted file mode 100644 index 94475aaa9..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-bdi-R-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with bdi, then R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text while ignoring bdi elements. - In this test, it is the Hebrew letter Alef, thus the direction must be - resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <div dir="rtl"><bdi>DEF</bdi>אבגABC.</div> - </div> - <div dir="rtl"> - <div dir="rtl"><bdi>DEF</bdi>אבגABC.</div> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <div dir="rtl"><bdi>DEF</bdi>אבגABC.</div> - </div> - <div dir="rtl"> - <div dir="rtl"><bdi>DEF</bdi>אבגABC.</div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-dir-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-dir-L-expected.html deleted file mode 100644 index 7c9f931..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-dir-L-expected.html +++ /dev/null
@@ -1,60 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with dir, then L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text while ignoring contained elements with an explicit dir of their own. - In this test, it is the Latin letter A, thus the direction must be - resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - ד - The Hebrew letter Dalet (strongly RTL). - ה - The Hebrew letter He (strongly RTL). - ו - The Hebrew letter Vav (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <div dir="ltr"><p dir="rtl">דהו</p>ABCאבג.</div> - </div> - <div dir="rtl"> - <div dir="ltr"><p dir="rtl">דהו</p>ABCאבג.</div> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <div dir="ltr"><p dir="rtl">דהו</p>ABCאבג.</div> - </div> - <div dir="rtl"> - <div dir="ltr"><p dir="rtl">דהו</p>ABCאבג.</div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-dir-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-dir-R-expected.html deleted file mode 100644 index c6748dc8..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-dir-R-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with dir, then R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text while ignoring contained elements with an explicit dir of their own. - In this test, it is the Hebrew letter Alef, thus the direction must be - resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <div dir="rtl"><p dir="ltr">DEF</p>אבגABC.</div> - </div> - <div dir="rtl"> - <div dir="rtl"><p dir="ltr">DEF</p>אבגABC.</div> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <div dir="rtl"><p dir="ltr">DEF</p>אבגABC.</div> - </div> - <div dir="rtl"> - <div dir="rtl"><p dir="ltr">DEF</p>אבגABC.</div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L-expected.html deleted file mode 100644 index 53c60421..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L-expected.html +++ /dev/null
@@ -1,60 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with dir=auto, then L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text while ignoring contained elements with an explicit dir of their own. - In this test, it is the Latin letter A, thus the direction must be - resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - ד - The Hebrew letter Dalet (strongly RTL). - ה - The Hebrew letter He (strongly RTL). - ו - The Hebrew letter Vav (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <div dir="ltr"><p dir="rtl">דהו</p>ABCאבג.</div> - </div> - <div dir="rtl"> - <div dir="ltr"><p dir="rtl">דהו</p>ABCאבג.</div> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <div dir="ltr"><p dir="rtl">דהו</p>ABCאבג.</div> - </div> - <div dir="rtl"> - <div dir="ltr"><p dir="rtl">דהו</p>ABCאבג.</div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R-expected.html deleted file mode 100644 index 41871f04..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with dir=auto, then R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text while ignoring contained elements with an explicit dir of their own. - In this test, it is the Hebrew letter Alef, thus the direction must be - resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <div dir="rtl"><p dir="ltr">DEF</p>.-=123אבגABC.</div> - </div> - <div dir="rtl"> - <div dir="rtl"><p dir="ltr">DEF</p>.-=123אבגABC.</div> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <div dir="rtl"><p dir="ltr">DEF</p>.-=123אבגABC.</div> - </div> - <div dir="rtl"> - <div dir="rtl"><p dir="ltr">DEF</p>.-=123אבגABC.</div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-script-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-script-L-expected.html deleted file mode 100644 index aca07de7..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-script-L-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with script, then L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of descendant text while ignoring descendant script elements. - In this test, it is the Latin letter A, thus the direction must be - resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <div dir="ltr"><script>א = 3;</script>ABCאבג.</div> - </div> - <div dir="rtl"> - <div dir="ltr"><script>א = 3;</script>ABCאבג.</div> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <div dir="ltr"><script>א = 3;</script>ABCאבג.</div> - </div> - <div dir="rtl"> - <div dir="ltr"><script>א = 3;</script>ABCאבג.</div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-script-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-script-R-expected.html deleted file mode 100644 index 921f10a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-script-R-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with script, then R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of descendant text while ignoring descendant script elements. - In this test, it is the Hebrew letter Alef, thus the direction must be - resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <div dir="rtl"><script>x = 3;</script>אבגABC.</div> - </div> - <div dir="rtl"> - <div dir="rtl"><script>x = 3;</script>אבגABC.</div> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <div dir="rtl"><script>x = 3;</script>אבגABC.</div> - </div> - <div dir="rtl"> - <div dir="rtl"><script>x = 3;</script>אבגABC.</div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-style-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-style-L-expected.html deleted file mode 100644 index 2ec4f02..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-style-L-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with style, then L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of descendant text while ignoring descendant style elements. - In this test, it is the Latin letter A, thus the direction must be - resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <div dir="ltr"><style>body {color:black;}</style>ABCאבג.</div> - </div> - <div dir="rtl"> - <div dir="ltr"><style>body {color:black;}</style>ABCאבג.</div> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <div dir="ltr"><style>body {color:black;}</style>ABCאבג.</div> - </div> - <div dir="rtl"> - <div dir="ltr"><style>body {color:black;}</style>ABCאבג.</div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-style-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-style-R-expected.html deleted file mode 100644 index 9ad9d71..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-style-R-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with style, then R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of descendant text while ignoring descendant style elements. - In this test, it is the Hebrew letter Alef, thus the direction must be - resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <div dir="rtl"><style>body {color:black;}</style>אבגABC.</div> - </div> - <div dir="rtl"> - <div dir="rtl"><style>body {color:black;}</style>אבגABC.</div> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <div dir="rtl"><style>body {color:black;}</style>אבגABC.</div> - </div> - <div dir="rtl"> - <div dir="rtl"><style>body {color:black;}</style>אבגABC.</div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-textarea-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-textarea-L-expected.html deleted file mode 100644 index 411099f7..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-textarea-L-expected.html +++ /dev/null
@@ -1,60 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with textarea, then L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of descendant text while ignoring descendant textarea elements. - In this test, it is the Latin letter A, thus the direction must be - resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - ד - The Hebrew letter Dalet (strongly RTL). - ה - The Hebrew letter He (strongly RTL). - ו - The Hebrew letter Vav (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <div dir="ltr"><textarea>דהו</textarea>ABCאבג.</div> - </div> - <div dir="rtl"> - <div dir="ltr"><textarea>דהו</textarea>ABCאבג.</div> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <div dir="ltr"><textarea>דהו</textarea>ABCאבג.</div> - </div> - <div dir="rtl"> - <div dir="ltr"><textarea>דהו</textarea>ABCאבג.</div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-textarea-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-textarea-R-expected.html deleted file mode 100644 index 351431f..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-contained-textarea-R-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, start with textarea, then R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of descendant text while ignoring descendant textarea elements. - In this test, it is the Hebrew letter Alef, thus the direction must be - resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <div dir="rtl"><textarea>DEF</textarea>אבגABC.</div> - </div> - <div dir="rtl"> - <div dir="rtl"><textarea>DEF</textarea>אבגABC.</div> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <div dir="rtl"><textarea>DEF</textarea>אבגABC.</div> - </div> - <div dir="rtl"> - <div dir="rtl"><textarea>DEF</textarea>אבגABC.</div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-EN-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-EN-L-expected.html deleted file mode 100644 index 198d081c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-EN-L-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, start with EN+L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Latin letter A since digits are not strongly - directional, thus the direction must be resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="ltr" value="123ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value="123ABCאבג." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="ltr" value="123ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value="123ABCאבג." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-EN-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-EN-R-expected.html deleted file mode 100644 index 303afc3c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-EN-R-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, start with EN+R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Hebrew letter Alef since digits are not strongly - directional, thus the direction must be resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="rtl" value="123אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value="123אבגABC." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="rtl" value="123אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value="123אבגABC." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-L-expected.html deleted file mode 100644 index cb3621a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-L-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, start with L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Latin letter A, thus the direction must be - resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="ltr" value="ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value="ABCאבג." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="ltr" value="ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value="ABCאבג." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-EN-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-EN-L-expected.html deleted file mode 100644 index 3d0f2cf..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-EN-L-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, start with N+EN+L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Latin letter A since neutrals and digits are not - strongly directional, thus the direction must be resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="ltr" value=".-=123ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value=".-=123ABCאבג." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="ltr" value=".-=123ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value=".-=123ABCאבג." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-EN-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-EN-R-expected.html deleted file mode 100644 index 26bf27d..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-EN-R-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, start with N+EN+R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Hebrew letter Alef since neutrals and digits are not - strongly directional, thus the direction must be resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="rtl" value=".-=123אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value=".-=123אבגABC." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="rtl" value=".-=123אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value=".-=123אבגABC." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-EN-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-EN-expected.html deleted file mode 100644 index 33f75b73..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-EN-expected.html +++ /dev/null
@@ -1,53 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, all N+EN</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value, or to LTR if there is no such - character. - In this test, there is no strongly directional character in the value, - thus the direction must be resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="ltr" value="@123!" /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value="@123!" /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="ltr" value="@123!" /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value="@123!" /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-L-expected.html deleted file mode 100644 index b6a89a1..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-L-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, start with N+L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Latin letter A since neutrals are not - strongly directional, thus the direction must be resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="ltr" value=".-=ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value=".-=ABCאבג." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="ltr" value=".-=ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value=".-=ABCאבג." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-R-expected.html deleted file mode 100644 index bcd5430..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-N-R-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, start with N+R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Hebrew letter Alef since neutrals are not - strongly directional, thus the direction must be resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="rtl" value=".-=אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value=".-=אבגABC." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="rtl" value=".-=אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value=".-=אבגABC." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-R-expected.html deleted file mode 100644 index 217972e..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-R-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, start with R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Hebrew letter Alef, thus the direction must be - resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="rtl" value="אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value="אבגABC." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="rtl" value="אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value="אבגABC." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-EN-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-EN-L-expected.html deleted file mode 100644 index 879e20d..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-EN-L-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, script assigns to start with EN+L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Latin letter A since digits are not strongly - directional, thus the direction must be resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="ltr" value="123ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value="123ABCאבג." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="ltr" value="123ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value="123ABCאבג." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-EN-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-EN-R-expected.html deleted file mode 100644 index 15781e2..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-EN-R-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, script assigns to start with EN+R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Hebrew letter Alef since digits are not strongly - directional, thus the direction must be resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="rtl" value="123אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value="123אבגABC." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="rtl" value="123אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value="123אבגABC." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-L-expected.html deleted file mode 100644 index 0feef25..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-L-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, script assigns to start with L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Latin letter A, thus the direction must be - resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="ltr" value="ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value="ABCאבג." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="ltr" value="ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value="ABCאבג." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L-expected.html deleted file mode 100644 index 6d6902f..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, script assigns to start with N+EN+L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Latin letter A since neutrals and digits are not - strongly directional, thus the direction must be resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="ltr" value=".-=123ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value=".-=123ABCאבג." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="ltr" value=".-=123ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value=".-=123ABCאבג." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R-expected.html deleted file mode 100644 index 53dd8920..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, script assigns to start with N+EN+R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Hebrew letter Alef since neutrals and digits are not - strongly directional, thus the direction must be resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="rtl" value=".-=123אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value=".-=123אבגABC." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="rtl" value=".-=123אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value=".-=123אבגABC." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-expected.html deleted file mode 100644 index 11697e5..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-expected.html +++ /dev/null
@@ -1,53 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, script assigns to all N+EN</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value, or to LTR if there is no such - character. - In this test, there is no strongly directional character in the value, - thus the direction must be resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="ltr" value="@123!" /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value="@123!" /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="ltr" value="@123!" /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value="@123!" /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-L-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-L-expected.html deleted file mode 100644 index fd7cb10f..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-L-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, script assigns to start with N+L</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Latin letter A since neutrals are not - strongly directional, thus the direction must be resolved as LTR." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="ltr" value=".-=ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value=".-=ABCאבג." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="ltr" value=".-=ABCאבג." /> - </div> - <div dir="rtl"> - <input type="text" dir="ltr" value=".-=ABCאבג." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-R-expected.html deleted file mode 100644 index 0fa6da2..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-N-R-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, script assigns to start with N+R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Hebrew letter Alef since neutrals are not - strongly directional, thus the direction must be resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="rtl" value=".-=אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value=".-=אבגABC." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="rtl" value=".-=אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value=".-=אבגABC." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-R-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-R-expected.html deleted file mode 100644 index 12b2d19..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-input-script-R-expected.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: input with dir=auto, script assigns to start with R</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction of an input element is set according to - the first strong character of its value. - In this test, it is the Hebrew letter Alef, thus the direction must be - resolved as RTL." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ב - The Hebrew letter Bet (strongly RTL). - ג - The Hebrew letter Gimel (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <input type="text" dir="rtl" value="אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value="אבגABC." /> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <input type="text" dir="rtl" value="אבגABC." /> - </div> - <div dir="rtl"> - <input type="text" dir="rtl" value="אבגABC." /> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-isolate-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-isolate-expected.html deleted file mode 100644 index 858a7db..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-isolate-expected.html +++ /dev/null
@@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <title>HTML Test: dir=auto, isolated in LTR text</title> - <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> - <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> - <meta name="assert" content=" - When dir='auto', the direction is set according to the first strong character - of the text, but the element behaves externally as a neutral character. - In this test, it allows a preceding R to form a single directional run - with a succeeding number." /> - <style> - input, textarea { - font-size:1em; - } - body { - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr"> - ‭1 a! א‬ - </div> - <div dir="rtl"> - ‭a !א 1‬ - </div> - </div> - <div class="ref"> - <div dir="ltr"> - ‭1 a! א‬ - </div> - <div dir="rtl"> - ‭a !א 1‬ - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-pre-N-EN-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-pre-N-EN-expected.html deleted file mode 100644 index c951c30..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-pre-N-EN-expected.html +++ /dev/null
@@ -1,49 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <style> - body { - font-size:18px; - text-align:left; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="test"> - <div dir="ltr"> - <pre dir="ltr"> -@123! - </pre> - </div> - <div dir="rtl"> - <pre dir="ltr"> -@123! - </pre> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <pre dir="ltr"> -@123! - </pre> - </div> - <div dir="rtl"> - <pre dir="ltr"> -@123! - </pre> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-pre-N-between-Rs-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-pre-N-between-Rs-expected.html deleted file mode 100644 index 2d9caf06..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-pre-N-between-Rs-expected.html +++ /dev/null
@@ -1,61 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <style> - body { - font-size:18px; - text-align:left; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <pre dir="rtl"> -א -!... -א - </pre> - </div> - <div dir="rtl"> - <pre dir="rtl"> -א -!... -א - </pre> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <pre dir="rtl"> -א -!... -א - </pre> - </div> - <div dir="rtl"> - <pre dir="rtl"> -א -!... -א - </pre> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-pre-mixed-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-pre-mixed-expected.html deleted file mode 100644 index 10bd024..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-pre-mixed-expected.html +++ /dev/null
@@ -1,61 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <style> - body { - font-size:18px; - text-align:left; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="test"> - <div dir="ltr"> - <pre dir="ltr"> -@123! -@123! -@123! -@123! - </pre> - </div> - <div dir="rtl"> - <pre dir="ltr"> -@123! -@123! -@123! -@123! - </pre> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <pre dir="ltr"> -@123! -@123! -@123! -@123! - </pre> - </div> - <div dir="rtl"> - <pre dir="ltr"> -@123! -@123! -@123! -@123! - </pre> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-N-EN-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-N-EN-expected.html deleted file mode 100644 index 253b844..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-N-EN-expected.html +++ /dev/null
@@ -1,49 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <style> - body, textarea { - font-size:18px; - text-align:left; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="test"> - <div dir="ltr"> - <textarea rows="2" dir="ltr"> -@123! - </textarea> - </div> - <div dir="rtl"> - <textarea rows="2" dir="ltr"> -@123! - </textarea> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <textarea rows="2" dir="ltr"> -@123! - </textarea> - </div> - <div dir="rtl"> - <textarea rows="2" dir="ltr"> -@123! - </textarea> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs-expected.html deleted file mode 100644 index afeef08..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs-expected.html +++ /dev/null
@@ -1,64 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <style> - body, textarea { - font-size:18px; - text-align:left; - } - textarea { - resize: none; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <textarea rows="4" dir="rtl"> -א -!... -א - </textarea> - </div> - <div dir="rtl"> - <textarea rows="4" dir="rtl"> -א -!... -א - </textarea> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <textarea rows="4" dir="rtl"> -א -!... -א - </textarea> - </div> - <div dir="rtl"> - <textarea rows="4" dir="rtl"> -א -!... -א - </textarea> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-mixed-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-mixed-expected.html deleted file mode 100644 index a5a8448..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-mixed-expected.html +++ /dev/null
@@ -1,64 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <style> - body, textarea { - font-size:18px; - text-align:left; - } - textarea { - resize: none; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="test"> - <div dir="ltr"> - <textarea rows="5" dir="rtl"> -!123@ -!123@ -!123@ -!123@ - </textarea> - </div> - <div dir="rtl"> - <textarea rows="5" dir="ltr"> -@123! -@123! -@123! -@123! - </textarea> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <textarea rows="5" dir="rtl"> -!123@ -!123@ -!123@ -!123@ - </textarea> - </div> - <div dir="rtl"> - <textarea rows="5" dir="ltr"> -@123! -@123! -@123! -@123! - </textarea> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-script-N-EN-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-script-N-EN-expected.html deleted file mode 100644 index 253b844..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-script-N-EN-expected.html +++ /dev/null
@@ -1,49 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <style> - body, textarea { - font-size:18px; - text-align:left; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="test"> - <div dir="ltr"> - <textarea rows="2" dir="ltr"> -@123! - </textarea> - </div> - <div dir="rtl"> - <textarea rows="2" dir="ltr"> -@123! - </textarea> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <textarea rows="2" dir="ltr"> -@123! - </textarea> - </div> - <div dir="rtl"> - <textarea rows="2" dir="ltr"> -@123! - </textarea> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-expected.html deleted file mode 100644 index 814e7b6..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-expected.html +++ /dev/null
@@ -1,65 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <link rel="match" href="dir_auto-textarea-N-between-Rs-ref.html" /> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <style> - body, textarea { - font-size:18px; - text-align:left; - } - textarea { - resize: none; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <textarea rows="4" dir="rtl"> -א -!... -א - </textarea> - </div> - <div dir="rtl"> - <textarea rows="4" dir="rtl"> -א -!... -א - </textarea> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <textarea rows="4" dir="rtl"> -א -!... -א - </textarea> - </div> - <div dir="rtl"> - <textarea rows="4" dir="rtl"> -א -!... -א - </textarea> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-ref-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-ref-expected.html deleted file mode 100644 index afeef08..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-ref-expected.html +++ /dev/null
@@ -1,64 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <style> - body, textarea { - font-size:18px; - text-align:left; - } - textarea { - resize: none; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א - The Hebrew letter Alef (strongly RTL). - </div> - <div class="test"> - <div dir="ltr"> - <textarea rows="4" dir="rtl"> -א -!... -א - </textarea> - </div> - <div dir="rtl"> - <textarea rows="4" dir="rtl"> -א -!... -א - </textarea> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <textarea rows="4" dir="rtl"> -א -!... -א - </textarea> - </div> - <div dir="rtl"> - <textarea rows="4" dir="rtl"> -א -!... -א - </textarea> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-script-mixed-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-script-mixed-expected.html deleted file mode 100644 index a5a8448..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/dir_auto-textarea-script-mixed-expected.html +++ /dev/null
@@ -1,64 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <style> - body, textarea { - font-size:18px; - text-align:left; - } - textarea { - resize: none; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="test"> - <div dir="ltr"> - <textarea rows="5" dir="rtl"> -!123@ -!123@ -!123@ -!123@ - </textarea> - </div> - <div dir="rtl"> - <textarea rows="5" dir="ltr"> -@123! -@123! -@123! -@123! - </textarea> - </div> - </div> - <div class="ref"> - <div dir="ltr"> - <textarea rows="5" dir="rtl"> -!123@ -!123@ -!123@ -!123@ - </textarea> - </div> - <div dir="rtl"> - <textarea rows="5" dir="ltr"> -@123! -@123! -@123! -@123! - </textarea> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/lang-xmllang-01-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/lang-xmllang-01-expected.html deleted file mode 100644 index 1606bca..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/lang-xmllang-01-expected.html +++ /dev/null
@@ -1,20 +0,0 @@ -<!DOCTYPE html> -<title>Languages</title> -<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-lang-and-xml:lang-attributes"> -<link tel="help" href="http://www.w3.org/TR/CSS2/selector.html#lang"> -<meta name="flags" content="css21"> -<style> -#test > * { background: limegreen; } -</style> -<body> -<p>All lines below should have a green background.</p> -<div id="test"> -<div><p>{}{lang}{en}</p></div> -<div><p>{}{xml:lang}{en}</p></div> -<div><div><p>Parent: {}{lang}{en}</p></div></div> -<div><div><p>Parent: {}{xml:lang}{en}</p></div></div> -<div><p>{xml}{lang}{en}</p></div> -<div><p>{xml}{lang}{en} - {lang}{de}</p></div> -<div><p>{xml}{lang}{de} - {lang}{en}</p></div> -</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/lang-xyzzy-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/lang-xyzzy-expected.html deleted file mode 100644 index b203718..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/lang-xyzzy-expected.html +++ /dev/null
@@ -1,9 +0,0 @@ -<!DOCTYPE html> -<title>Invalid languages</title> -<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> -<meta name="flags" content="css21"> -<style>#testp { color: green; }</style> -<body> -<div id="test"> -<p id="testp" lang="xyzzy">ABC</p> -</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/style-01-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/style-01-expected.html deleted file mode 100644 index be8175e61..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/global-attributes/style-01-expected.html +++ /dev/null
@@ -1,24 +0,0 @@ -<!DOCTYPE html> -<title>The style attribute</title> -<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-style-attribute"> -<link rel="help" href="http://www.w3.org/TR/css-style-attr/#syntax"> -<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#cascading-order"> -<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specificity"> -<style> -#test p { background: limegreen; } -</style> -<div id="test"> -<p>This line should have a green background. -<p>This line should have a green background. -<p>This line should have a green background. -<p>This line should have a green background. -<p>This line should have a green background. -<p>This line should have a green background. -<p>This line should have a green background. -<p>This line should have a green background. -<p>This line should have a green background. -<p>This line should have a green background. -<p>This line should have a green background. -<p>This line should have a green background. -</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a-expected.html deleted file mode 100644 index b5882eb..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from following number, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א 3‬</div><div dir="ltr">‭a 3‬</div><div dir="rtl">‭3 א‬</div><div dir="rtl">‭3 a‬</div></div> -<div class="ref"><div dir="ltr">‭א 3‬</div><div dir="ltr">‭a 3‬</div><div dir="rtl">‭3 א‬</div><div dir="rtl">‭3 a‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b-expected.html deleted file mode 100644 index b5882eb..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from following number, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א 3‬</div><div dir="ltr">‭a 3‬</div><div dir="rtl">‭3 א‬</div><div dir="rtl">‭3 a‬</div></div> -<div class="ref"><div dir="ltr">‭א 3‬</div><div dir="ltr">‭a 3‬</div><div dir="rtl">‭3 א‬</div><div dir="rtl">‭3 a‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c-expected.html deleted file mode 100644 index b5882eb..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from following number, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א 3‬</div><div dir="ltr">‭a 3‬</div><div dir="rtl">‭3 א‬</div><div dir="rtl">‭3 a‬</div></div> -<div class="ref"><div dir="ltr">‭א 3‬</div><div dir="ltr">‭a 3‬</div><div dir="rtl">‭3 א‬</div><div dir="rtl">‭3 a‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a-expected.html deleted file mode 100644 index f28559b5..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from following number with intervening neutrals, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭< א < > 3 >‬</div><div dir="ltr">‭< a < > 3 >‬</div><div dir="rtl">‭< 3 < > א >‬</div><div dir="rtl">‭< 3 < > a >‬</div></div> -<div class="ref"><div dir="ltr">‭< א < > 3 >‬</div><div dir="ltr">‭< a < > 3 >‬</div><div dir="rtl">‭< 3 < > א >‬</div><div dir="rtl">‭< 3 < > a >‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b-expected.html deleted file mode 100644 index d4eda21..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from following number with intervening neutrals, auto</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭< א < > 3 >‬</div><div dir="ltr">‭> a > > 3 >‬</div><div dir="rtl">‭< 3 < < א <‬</div><div dir="rtl">‭< 3 < > a >‬</div></div> -<div class="ref"><div dir="ltr">‭< א < > 3 >‬</div><div dir="ltr">‭> a > > 3 >‬</div><div dir="rtl">‭< 3 < < א <‬</div><div dir="rtl">‭< 3 < > a >‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c-expected.html deleted file mode 100644 index 6c21d014..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from following number with intervening neutrals, same direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭> א > > 3 >‬</div><div dir="ltr">‭> a > > 3 >‬</div><div dir="rtl">‭< 3 < < א <‬</div><div dir="rtl">‭< 3 < < a <‬</div></div> -<div class="ref"><div dir="ltr">‭> א > > 3 >‬</div><div dir="ltr">‭> a > > 3 >‬</div><div dir="rtl">‭< 3 < < א <‬</div><div dir="rtl">‭< 3 < < a <‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a-expected.html deleted file mode 100644 index 4c29838e..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from immediately following number, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א3‬</div><div dir="ltr">‭a3‬</div><div dir="rtl">‭3א‬</div><div dir="rtl">‭3a‬</div></div> -<div class="ref"><div dir="ltr">‭א3‬</div><div dir="ltr">‭a3‬</div><div dir="rtl">‭3א‬</div><div dir="rtl">‭3a‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b-expected.html deleted file mode 100644 index 4c29838e..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from immediately following number, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א3‬</div><div dir="ltr">‭a3‬</div><div dir="rtl">‭3א‬</div><div dir="rtl">‭3a‬</div></div> -<div class="ref"><div dir="ltr">‭א3‬</div><div dir="ltr">‭a3‬</div><div dir="rtl">‭3א‬</div><div dir="rtl">‭3a‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c-expected.html deleted file mode 100644 index 4c29838e..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from immediately following number, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א3‬</div><div dir="ltr">‭a3‬</div><div dir="rtl">‭3א‬</div><div dir="rtl">‭3a‬</div></div> -<div class="ref"><div dir="ltr">‭א3‬</div><div dir="ltr">‭a3‬</div><div dir="rtl">‭3א‬</div><div dir="rtl">‭3a‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a-expected.html deleted file mode 100644 index cb83dde..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: numbers isolated from preceding text, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א 3‬</div><div dir="ltr">‭a 3‬</div><div dir="rtl">‭3 א‬</div><div dir="rtl">‭3 a‬</div></div> -<div class="ref"><div dir="ltr">‭א 3‬</div><div dir="ltr">‭a 3‬</div><div dir="rtl">‭3 א‬</div><div dir="rtl">‭3 a‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b-expected.html deleted file mode 100644 index cb83dde..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: numbers isolated from preceding text, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א 3‬</div><div dir="ltr">‭a 3‬</div><div dir="rtl">‭3 א‬</div><div dir="rtl">‭3 a‬</div></div> -<div class="ref"><div dir="ltr">‭א 3‬</div><div dir="ltr">‭a 3‬</div><div dir="rtl">‭3 א‬</div><div dir="rtl">‭3 a‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c-expected.html deleted file mode 100644 index cb83dde..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: numbers isolated from preceding text, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א 3‬</div><div dir="ltr">‭a 3‬</div><div dir="rtl">‭3 א‬</div><div dir="rtl">‭3 a‬</div></div> -<div class="ref"><div dir="ltr">‭א 3‬</div><div dir="ltr">‭a 3‬</div><div dir="rtl">‭3 א‬</div><div dir="rtl">‭3 a‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a-expected.html deleted file mode 100644 index 4a6c301a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from following text, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א ב...‬</div><div dir="ltr">‭a b...‬</div><div dir="rtl">‭...b a‬</div><div dir="rtl">‭...ב א‬</div></div> -<div class="ref"><div dir="ltr">‭א ב...‬</div><div dir="ltr">‭a b...‬</div><div dir="rtl">‭...b a‬</div><div dir="rtl">‭...ב א‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b-expected.html deleted file mode 100644 index 4a6c301a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from following text, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א ב...‬</div><div dir="ltr">‭a b...‬</div><div dir="rtl">‭...b a‬</div><div dir="rtl">‭...ב א‬</div></div> -<div class="ref"><div dir="ltr">‭א ב...‬</div><div dir="ltr">‭a b...‬</div><div dir="rtl">‭...b a‬</div><div dir="rtl">‭...ב א‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c-expected.html deleted file mode 100644 index 4a6c301a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from following text, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א ב...‬</div><div dir="ltr">‭a b...‬</div><div dir="rtl">‭...b a‬</div><div dir="rtl">‭...ב א‬</div></div> -<div class="ref"><div dir="ltr">‭א ב...‬</div><div dir="ltr">‭a b...‬</div><div dir="rtl">‭...b a‬</div><div dir="rtl">‭...ב א‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a-expected.html deleted file mode 100644 index 0f6b7bbb..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from following text with intervening neutrals, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭< א < > ב >...‬</div><div dir="rtl">‭...< b < > a >‬</div></div> -<div class="ref"><div dir="ltr">‭< א < > ב >...‬</div><div dir="rtl">‭...< b < > a >‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b-expected.html deleted file mode 100644 index 0f6b7bbb..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from following text with intervening neutrals, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭< א < > ב >...‬</div><div dir="rtl">‭...< b < > a >‬</div></div> -<div class="ref"><div dir="ltr">‭< א < > ב >...‬</div><div dir="rtl">‭...< b < > a >‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c-expected.html deleted file mode 100644 index 0347c09..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from following text with intervening neutrals, same direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭> א > > ב >...‬</div><div dir="rtl">‭...< b < < a <‬</div></div> -<div class="ref"><div dir="ltr">‭> א > > ב >...‬</div><div dir="rtl">‭...< b < < a <‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a-expected.html deleted file mode 100644 index 665153d..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from immediately following text, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭אב...‬</div><div dir="ltr">‭ab...‬</div><div dir="rtl">‭...ba‬</div><div dir="rtl">‭...בא‬</div></div> -<div class="ref"><div dir="ltr">‭אב...‬</div><div dir="ltr">‭ab...‬</div><div dir="rtl">‭...ba‬</div><div dir="rtl">‭...בא‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b-expected.html deleted file mode 100644 index 665153d..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from immediately following text, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭אב...‬</div><div dir="ltr">‭ab...‬</div><div dir="rtl">‭...ba‬</div><div dir="rtl">‭...בא‬</div></div> -<div class="ref"><div dir="ltr">‭אב...‬</div><div dir="ltr">‭ab...‬</div><div dir="rtl">‭...ba‬</div><div dir="rtl">‭...בא‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c-expected.html deleted file mode 100644 index 665153d..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from immediately following text, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭אב...‬</div><div dir="ltr">‭ab...‬</div><div dir="rtl">‭...ba‬</div><div dir="rtl">‭...בא‬</div></div> -<div class="ref"><div dir="ltr">‭אב...‬</div><div dir="ltr">‭ab...‬</div><div dir="rtl">‭...ba‬</div><div dir="rtl">‭...בא‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a-expected.html deleted file mode 100644 index 8eb90f8..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from preceding text, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א ב‬</div><div dir="ltr">‭a b‬</div><div dir="rtl">‭ב א‬</div><div dir="rtl">‭b a‬</div></div> -<div class="ref"><div dir="ltr">‭א ב‬</div><div dir="ltr">‭a b‬</div><div dir="rtl">‭ב א‬</div><div dir="rtl">‭b a‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b-expected.html deleted file mode 100644 index 8eb90f8..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from preceding text, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א ב‬</div><div dir="ltr">‭a b‬</div><div dir="rtl">‭ב א‬</div><div dir="rtl">‭b a‬</div></div> -<div class="ref"><div dir="ltr">‭א ב‬</div><div dir="ltr">‭a b‬</div><div dir="rtl">‭ב א‬</div><div dir="rtl">‭b a‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c-expected.html deleted file mode 100644 index 8eb90f8..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from preceding text, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭א ב‬</div><div dir="ltr">‭a b‬</div><div dir="rtl">‭ב א‬</div><div dir="rtl">‭b a‬</div></div> -<div class="ref"><div dir="ltr">‭א ב‬</div><div dir="ltr">‭a b‬</div><div dir="rtl">‭ב א‬</div><div dir="rtl">‭b a‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a-expected.html deleted file mode 100644 index 1d2f57c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from surrounding text, opposite direction</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭ג < < b < < א...‬</div><div dir="rtl">‭...a > > ב > > c‬</div></div> -<div class="ref"><div dir="ltr">‭ג < < b < < א...‬</div><div dir="rtl">‭...a > > ב > > c‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b-expected.html deleted file mode 100644 index 30ee14c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from surrounding text, auto</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭ג < > b > < א...‬</div><div dir="rtl">‭...a > < ב < > c‬</div></div> -<div class="ref"><div dir="ltr">‭ג < > b > < א...‬</div><div dir="rtl">‭...a > < ב < > c‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c-expected.html deleted file mode 100644 index 30ee14c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c-expected.html +++ /dev/null
@@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> -<meta charset="utf-8"/> -<title>The dir attribute: isolated from surrounding text, auto</title> -<style type="text/css"> -.test, .ref { font-size: 150%; border: 1px solid orange; margin: 10px; margin-right: 200px; padding: 5px; clear: both; } -input { margin: 5px; } -</style> -</head> -<body> -<p class="instructions" dir="ltr">Test passes if the two boxes are identical.</p> -<div class="ref"><div dir="ltr">‭ג < > b > < א...‬</div><div dir="rtl">‭...a > < ב < > c‬</div></div> -<div class="ref"><div dir="ltr">‭ג < > b > < א...‬</div><div dir="rtl">‭...a > < ב < > c‬</div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1a-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1a-expected.html deleted file mode 100644 index 7346ce91..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1a-expected.html +++ /dev/null
@@ -1,4 +0,0 @@ -<!doctype html> -<title>The hidden attribute</title> -<link rel=author title=Ms2ger href=mailto:Ms2ger@gmail.com> -<p>This line should be visible.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1b-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1b-expected.html deleted file mode 100644 index 7346ce91..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1b-expected.html +++ /dev/null
@@ -1,4 +0,0 @@ -<!doctype html> -<title>The hidden attribute</title> -<link rel=author title=Ms2ger href=mailto:Ms2ger@gmail.com> -<p>This line should be visible.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1c-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1c-expected.html deleted file mode 100644 index 7346ce91..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1c-expected.html +++ /dev/null
@@ -1,4 +0,0 @@ -<!doctype html> -<title>The hidden attribute</title> -<link rel=author title=Ms2ger href=mailto:Ms2ger@gmail.com> -<p>This line should be visible.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1d-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1d-expected.html deleted file mode 100644 index 7346ce91..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1d-expected.html +++ /dev/null
@@ -1,4 +0,0 @@ -<!doctype html> -<title>The hidden attribute</title> -<link rel=author title=Ms2ger href=mailto:Ms2ger@gmail.com> -<p>This line should be visible.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1e-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1e-expected.html deleted file mode 100644 index 7346ce91..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1e-expected.html +++ /dev/null
@@ -1,4 +0,0 @@ -<!doctype html> -<title>The hidden attribute</title> -<link rel=author title=Ms2ger href=mailto:Ms2ger@gmail.com> -<p>This line should be visible.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1f-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1f-expected.html deleted file mode 100644 index 7346ce91..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1f-expected.html +++ /dev/null
@@ -1,4 +0,0 @@ -<!doctype html> -<title>The hidden attribute</title> -<link rel=author title=Ms2ger href=mailto:Ms2ger@gmail.com> -<p>This line should be visible.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1g-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1g-expected.html deleted file mode 100644 index 7346ce91..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/editing/the-hidden-attribute/hidden-1g-expected.html +++ /dev/null
@@ -1,4 +0,0 @@ -<!doctype html> -<title>The hidden attribute</title> -<link rel=author title=Ms2ger href=mailto:Ms2ger@gmail.com> -<p>This line should be visible.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-expected.html deleted file mode 100644 index 902c1724..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-expected.html +++ /dev/null
@@ -1,7 +0,0 @@ -<!doctype html> -<meta charset="utf-8"> -<title>Unrecognized type should fallback as text type</title> -<body> - <input type="text"> - <input type="text"> -</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-select-element-0/option-label-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-select-element-0/option-label-expected.html deleted file mode 100644 index e3f73cb..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-select-element-0/option-label-expected.html +++ /dev/null
@@ -1,19 +0,0 @@ -<!doctype html> -<title>Option labels</title> -<select size=12> - <option><!-- No children, no label--> - <option><!-- No children, empty label--> - <option>label<!-- No children, label--> - <option><!-- No children, namespaced label--> - - <option>child<!-- Single child, no label--> - <option>child<!-- Single child, empty label--> - <option>label<!-- Single child, label--> - <option>child<!-- Single child, namespaced label--> - - <option>child node<!-- Two children, no label--> - <option>child node<!-- Two children, empty label--> - <option>label<!-- Two children, label--> - <option>child node<!-- Two children, namespaced label--> -</select> -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-textarea-element-0/cols-default-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-textarea-element-0/cols-default-expected.html deleted file mode 100644 index f298280..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-textarea-element-0/cols-default-expected.html +++ /dev/null
@@ -1,4 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>Default textarea</title> -<textarea></textarea>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-textarea-element-0/cols-zero-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-textarea-element-0/cols-zero-expected.html deleted file mode 100644 index f298280..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-textarea-element-0/cols-zero-expected.html +++ /dev/null
@@ -1,4 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>Default textarea</title> -<textarea></textarea>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-textarea-element-0/rows-default-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-textarea-element-0/rows-default-expected.html deleted file mode 100644 index f298280..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-textarea-element-0/rows-default-expected.html +++ /dev/null
@@ -1,4 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>Default textarea</title> -<textarea></textarea>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-textarea-element-0/rows-zero-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-textarea-element-0/rows-zero-expected.html deleted file mode 100644 index f298280..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-textarea-element-0/rows-zero-expected.html +++ /dev/null
@@ -1,4 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>Default textarea</title> -<textarea></textarea>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/flow-content-0/div-align-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/flow-content-0/div-align-expected.html deleted file mode 100644 index da8e4d0..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/flow-content-0/div-align-expected.html +++ /dev/null
@@ -1,76 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<meta charset=utf-8> -<style> -.test { width: 50px; background-color: yellow; } -.center { text-align: center; } -.center .test { margin: 0 auto; } -.left { text-align: left; } -.left .test { margin-right: auto; } -.right { text-align: right; } -.right .test { margin-left: auto; } -.rtl { direction: rtl; } -.ltr { direction: ltr; } -.left .margin { margin-left: 1em; } -.right .margin { margin-right: 1em; } -</style> -</head> -<body> -<!-- Centered tests --> -<div class=center> -<div class=test>t א</div> -<div class="test rtl">t א</div> -<div class="test margin">t א</div> -</div> - -<div class=center> -<div class="test left">t א</div> -<div class="test right">t א</div> -</div> - -<div class=left> -<div class=center> -<div class=test>t א</div> -</div> -</div> - -<!-- Left-aligned tests --> -<div class=left> -<div class=test>t א</div> -<div class="test rtl">t א</div> -<div class="test margin">t א</div> -</div> - -<div class="left rtl"> -<div class=test>t א</div> -<div class="test ltr">t א</div> -<div class="test margin">t א</div> -</div> - -<div class=left> -<div class="test center">t א</div> -<div class="test right">t א</div> -</div> - -<!-- Right-aligned tests --> -<div class=right> -<div class=test>t א</div> -<div class="test rtl">t א</div> -<div class="test margin">t א</div> -</div> - -<div class="right rtl"> -<div class=test>t א</div> -<div class="test ltr">t א</div> -<div class="test margin">t א</div> -</div> - -<div class=right> -<div class="test left">t א</div> -<div class="test center">t א</div> -</div> - -</body> -</html> -
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/flow-content-0/figure-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/flow-content-0/figure-expected.html deleted file mode 100644 index a87141b..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/flow-content-0/figure-expected.html +++ /dev/null
@@ -1,11 +0,0 @@ -<!doctype html> -<title>The figure element</title> -<link rel=author title=Ms2ger href=ms2ger@gmail.com> -<link rel=help href=https://html.spec.whatwg.org/multipage/#the-figure-element> -<style> -body > div { margin: 1em 40px; } -</style> -<div> -<div>Caption</div> -Figure -</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-supported-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-supported-expected.html deleted file mode 100644 index 0de7ff3..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-supported-expected.html +++ /dev/null
@@ -1,45 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>li@type: supported types</title> -<style> - .decimal { list-style-type: decimal; } - .lower-alpha { list-style-type: lower-alpha; } - .upper-alpha { list-style-type: upper-alpha; } - .lower-roman { list-style-type: lower-roman; } - .upper-roman { list-style-type: upper-roman; } - .disc { list-style-type: disc; } - .circle { list-style-type: circle; } - .square { list-style-type: square; } - .none { list-style-type: none; } -</style> -<li class="decimal">first item</li> -<li class="lower-alpha">second item</li> -<li class="upper-alpha">third item</li> -<li class="lower-roman">fourth item</li> -<li class="upper-roman">fifth item</li> -<li class="disc">sixth item</li> -<li class="circle">seventh item</li> -<li class="square">eighth item</li> -<li class="none">ninth item</li> -<ol> - <li class="decimal">first ordered item</li> - <li class="lower-alpha">second ordered item</li> - <li class="upper-alpha">third ordered item</li> - <li class="lower-roman">fourth ordered item</li> - <li class="upper-roman">fifth ordered item</li> - <li class="disc">sixth ordered item</li> - <li class="circle">seventh ordered item</li> - <li class="square">eighth ordered item</li> - <li class="none">ninth ordered item</li> -</ol> -<ul> - <li class="decimal">first unordered item</li> - <li class="lower-alpha">second unordered item</li> - <li class="upper-alpha">third unordered item</li> - <li class="lower-roman">fourth unordered item</li> - <li class="upper-roman">fifth unordered item</li> - <li class="disc">sixth unordered item</li> - <li class="circle">seventh unordered item</li> - <li class="square">eighth unordered item</li> - <li class="none">ninth unordered item</li> -</ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-supported-xhtml-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-supported-xhtml-expected.html deleted file mode 100644 index 0de7ff3..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-supported-xhtml-expected.html +++ /dev/null
@@ -1,45 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>li@type: supported types</title> -<style> - .decimal { list-style-type: decimal; } - .lower-alpha { list-style-type: lower-alpha; } - .upper-alpha { list-style-type: upper-alpha; } - .lower-roman { list-style-type: lower-roman; } - .upper-roman { list-style-type: upper-roman; } - .disc { list-style-type: disc; } - .circle { list-style-type: circle; } - .square { list-style-type: square; } - .none { list-style-type: none; } -</style> -<li class="decimal">first item</li> -<li class="lower-alpha">second item</li> -<li class="upper-alpha">third item</li> -<li class="lower-roman">fourth item</li> -<li class="upper-roman">fifth item</li> -<li class="disc">sixth item</li> -<li class="circle">seventh item</li> -<li class="square">eighth item</li> -<li class="none">ninth item</li> -<ol> - <li class="decimal">first ordered item</li> - <li class="lower-alpha">second ordered item</li> - <li class="upper-alpha">third ordered item</li> - <li class="lower-roman">fourth ordered item</li> - <li class="upper-roman">fifth ordered item</li> - <li class="disc">sixth ordered item</li> - <li class="circle">seventh ordered item</li> - <li class="square">eighth ordered item</li> - <li class="none">ninth ordered item</li> -</ol> -<ul> - <li class="decimal">first unordered item</li> - <li class="lower-alpha">second unordered item</li> - <li class="upper-alpha">third unordered item</li> - <li class="lower-roman">fourth unordered item</li> - <li class="upper-roman">fifth unordered item</li> - <li class="disc">sixth unordered item</li> - <li class="circle">seventh unordered item</li> - <li class="square">eighth unordered item</li> - <li class="none">ninth unordered item</li> -</ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-alpha-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-alpha-expected.html deleted file mode 100644 index 4fbc5ac..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-alpha-expected.html +++ /dev/null
@@ -1,13 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>li@type: unsupported types</title> -<li>first item</li> -<li>second item</li> -<ol> - <li>first ordered item</li> - <li>second ordered item</li> -</ol> -<ul> - <li>first unordered item</li> - <li>second unordered item</li> -</ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-roman-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-roman-expected.html deleted file mode 100644 index 4fbc5ac..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-roman-expected.html +++ /dev/null
@@ -1,13 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>li@type: unsupported types</title> -<li>first item</li> -<li>second item</li> -<ol> - <li>first ordered item</li> - <li>second ordered item</li> -</ol> -<ul> - <li>first unordered item</li> - <li>second unordered item</li> -</ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-alpha-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-alpha-expected.html deleted file mode 100644 index 4fbc5ac..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-alpha-expected.html +++ /dev/null
@@ -1,13 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>li@type: unsupported types</title> -<li>first item</li> -<li>second item</li> -<ol> - <li>first ordered item</li> - <li>second ordered item</li> -</ol> -<ul> - <li>first unordered item</li> - <li>second unordered item</li> -</ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-roman-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-roman-expected.html deleted file mode 100644 index 4fbc5ac..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-roman-expected.html +++ /dev/null
@@ -1,13 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>li@type: unsupported types</title> -<li>first item</li> -<li>second item</li> -<ol> - <li>first ordered item</li> - <li>second ordered item</li> -</ol> -<ul> - <li>first unordered item</li> - <li>second unordered item</li> -</ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-supported-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-supported-expected.html deleted file mode 100644 index fb61db3..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-supported-expected.html +++ /dev/null
@@ -1,25 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ol@type: supported types</title> -<style> -.decimal { - list-style-type: decimal; -} -.lower-alpha { - list-style-type: lower-alpha; -} -.upper-alpha { - list-style-type: upper-alpha; -} -.lower-roman { - list-style-type: lower-roman; -} -.upper-roman { - list-style-type: upper-roman; -} -</style> -<ol class=decimal><li>1<li>2</ol> -<ol class=lower-alpha><li>a<li>b</ol> -<ol class=upper-alpha><li>A<li>B</ol> -<ol class=lower-roman><li>i<li>ii</ol> -<ol class=upper-roman><li>I<li>II</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-supported-xhtml-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-supported-xhtml-expected.html deleted file mode 100644 index fb61db3..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-supported-xhtml-expected.html +++ /dev/null
@@ -1,25 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ol@type: supported types</title> -<style> -.decimal { - list-style-type: decimal; -} -.lower-alpha { - list-style-type: lower-alpha; -} -.upper-alpha { - list-style-type: upper-alpha; -} -.lower-roman { - list-style-type: lower-roman; -} -.upper-roman { - list-style-type: upper-roman; -} -</style> -<ol class=decimal><li>1<li>2</ol> -<ol class=lower-alpha><li>a<li>b</ol> -<ol class=upper-alpha><li>A<li>B</ol> -<ol class=lower-roman><li>i<li>ii</ol> -<ol class=upper-roman><li>I<li>II</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-circle-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-circle-expected.html deleted file mode 100644 index 530f8ef..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-circle-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ol@type: unsupported types</title> -<ol><li>1<li>2</ol> -<ol><li>1<li>2</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-disc-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-disc-expected.html deleted file mode 100644 index 530f8ef..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-disc-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ol@type: unsupported types</title> -<ol><li>1<li>2</ol> -<ol><li>1<li>2</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid-expected.html deleted file mode 100644 index 530f8ef..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ol@type: unsupported types</title> -<ol><li>1<li>2</ol> -<ol><li>1<li>2</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha-expected.html deleted file mode 100644 index 530f8ef..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ol@type: unsupported types</title> -<ol><li>1<li>2</ol> -<ol><li>1<li>2</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-roman-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-roman-expected.html deleted file mode 100644 index 530f8ef..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-roman-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ol@type: unsupported types</title> -<ol><li>1<li>2</ol> -<ol><li>1<li>2</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-none-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-none-expected.html deleted file mode 100644 index 530f8ef..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-none-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ol@type: unsupported types</title> -<ol><li>1<li>2</ol> -<ol><li>1<li>2</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-round-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-round-expected.html deleted file mode 100644 index 530f8ef..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-round-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ol@type: unsupported types</title> -<ol><li>1<li>2</ol> -<ol><li>1<li>2</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-square-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-square-expected.html deleted file mode 100644 index 530f8ef..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-square-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ol@type: unsupported types</title> -<ol><li>1<li>2</ol> -<ol><li>1<li>2</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-alpha-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-alpha-expected.html deleted file mode 100644 index 530f8ef..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-alpha-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ol@type: unsupported types</title> -<ol><li>1<li>2</ol> -<ol><li>1<li>2</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-roman-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-roman-expected.html deleted file mode 100644 index 530f8ef..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-roman-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ol@type: unsupported types</title> -<ol><li>1<li>2</ol> -<ol><li>1<li>2</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-supported-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-supported-expected.html deleted file mode 100644 index 59a0400c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-supported-expected.html +++ /dev/null
@@ -1,21 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ul@type: supported types</title> -<style> -.disc { - list-style-type: disc; -} -.circle { - list-style-type: circle; -} -.square { - list-style-type: square; -} -.none { - list-style-type: none; -} -</style> -<ul class="disc"><li>first disc</li><li>second disc</li></ul> -<ul class="circle"><li>first circle</li><li>second circle</li></ul> -<ul class="square"><li>first square</li><li>second square</li></ul> -<ul class="none"><li>first none</li><li>second none</li></ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-supported-xhtml-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-supported-xhtml-expected.html deleted file mode 100644 index 59a0400c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-supported-xhtml-expected.html +++ /dev/null
@@ -1,21 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ul@type: supported types</title> -<style> -.disc { - list-style-type: disc; -} -.circle { - list-style-type: circle; -} -.square { - list-style-type: square; -} -.none { - list-style-type: none; -} -</style> -<ul class="disc"><li>first disc</li><li>second disc</li></ul> -<ul class="circle"><li>first circle</li><li>second circle</li></ul> -<ul class="square"><li>first square</li><li>second square</li></ul> -<ul class="none"><li>first none</li><li>second none</li></ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-decimal-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-decimal-expected.html deleted file mode 100644 index c53fe94..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-decimal-expected.html +++ /dev/null
@@ -1,6 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ul@type: unsupported types</title> -<ul><li>first item</li><li>second item</li></ul> -<ul><li>first item</li><li>second item</li></ul> -<ul><li>first item</li><li>second item</li></ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid-expected.html deleted file mode 100644 index c53fe94..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid-expected.html +++ /dev/null
@@ -1,6 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ul@type: unsupported types</title> -<ul><li>first item</li><li>second item</li></ul> -<ul><li>first item</li><li>second item</li></ul> -<ul><li>first item</li><li>second item</li></ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha-expected.html deleted file mode 100644 index c53fe94..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha-expected.html +++ /dev/null
@@ -1,6 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ul@type: unsupported types</title> -<ul><li>first item</li><li>second item</li></ul> -<ul><li>first item</li><li>second item</li></ul> -<ul><li>first item</li><li>second item</li></ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-roman-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-roman-expected.html deleted file mode 100644 index c53fe94..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-roman-expected.html +++ /dev/null
@@ -1,6 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ul@type: unsupported types</title> -<ul><li>first item</li><li>second item</li></ul> -<ul><li>first item</li><li>second item</li></ul> -<ul><li>first item</li><li>second item</li></ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-alpha-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-alpha-expected.html deleted file mode 100644 index c53fe94..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-alpha-expected.html +++ /dev/null
@@ -1,6 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ul@type: unsupported types</title> -<ul><li>first item</li><li>second item</li></ul> -<ul><li>first item</li><li>second item</li></ul> -<ul><li>first item</li><li>second item</li></ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-roman-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-roman-expected.html deleted file mode 100644 index c53fe94..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-roman-expected.html +++ /dev/null
@@ -1,6 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>ul@type: unsupported types</title> -<ul><li>first item</li><li>second item</li></ul> -<ul><li>first item</li><li>second item</li></ul> -<ul><li>first item</li><li>second item</li></ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-a-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-a-expected.html deleted file mode 100644 index a6fec36..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-a-expected.html +++ /dev/null
@@ -1,21 +0,0 @@ -<title>Reference for The font element text decoration color quirk, 001</title> -<style> -span, div > div { color:fuchsia } -.under { text-decoration:underline } -.over { text-decoration:overline } -.strike { text-decoration:line-through } -</style> -<div>Quirk should apply:</div> -<div><u>foo </u><span class="under">style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color</span><u> bar</u></div> -<div><u>foo </u><span class="under">color and style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color=x and style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color=transparent and style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color="" and style</span><u> bar</u></div> -<div><u>foo</u><div class="under">block</div><u>bar</u></div> -<div><s>foo </s><span class="strike">line-through</span><s> bar</s></div> -<div><u class="over">foo </u><span class="over">overline</span><u class="over"> bar</u></div> -<div>Quirks should not apply:</div> -<div><u>foo <span>span</span> bar</u></div> -<div><u>foo <span>no-namespace font element</span> bar</u></div> -<div><u>foo <span>uppercase FONT element</span> bar</u></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-q-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-q-expected.html deleted file mode 100644 index a6fec36..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-q-expected.html +++ /dev/null
@@ -1,21 +0,0 @@ -<title>Reference for The font element text decoration color quirk, 001</title> -<style> -span, div > div { color:fuchsia } -.under { text-decoration:underline } -.over { text-decoration:overline } -.strike { text-decoration:line-through } -</style> -<div>Quirk should apply:</div> -<div><u>foo </u><span class="under">style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color</span><u> bar</u></div> -<div><u>foo </u><span class="under">color and style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color=x and style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color=transparent and style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color="" and style</span><u> bar</u></div> -<div><u>foo</u><div class="under">block</div><u>bar</u></div> -<div><s>foo </s><span class="strike">line-through</span><s> bar</s></div> -<div><u class="over">foo </u><span class="over">overline</span><u class="over"> bar</u></div> -<div>Quirks should not apply:</div> -<div><u>foo <span>span</span> bar</u></div> -<div><u>foo <span>no-namespace font element</span> bar</u></div> -<div><u>foo <span>uppercase FONT element</span> bar</u></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-s-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-s-expected.html deleted file mode 100644 index a6fec36..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-s-expected.html +++ /dev/null
@@ -1,21 +0,0 @@ -<title>Reference for The font element text decoration color quirk, 001</title> -<style> -span, div > div { color:fuchsia } -.under { text-decoration:underline } -.over { text-decoration:overline } -.strike { text-decoration:line-through } -</style> -<div>Quirk should apply:</div> -<div><u>foo </u><span class="under">style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color</span><u> bar</u></div> -<div><u>foo </u><span class="under">color and style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color=x and style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color=transparent and style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color="" and style</span><u> bar</u></div> -<div><u>foo</u><div class="under">block</div><u>bar</u></div> -<div><s>foo </s><span class="strike">line-through</span><s> bar</s></div> -<div><u class="over">foo </u><span class="over">overline</span><u class="over"> bar</u></div> -<div>Quirks should not apply:</div> -<div><u>foo <span>span</span> bar</u></div> -<div><u>foo <span>no-namespace font element</span> bar</u></div> -<div><u>foo <span>uppercase FONT element</span> bar</u></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-x-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-x-expected.html deleted file mode 100644 index a6fec36..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-x-expected.html +++ /dev/null
@@ -1,21 +0,0 @@ -<title>Reference for The font element text decoration color quirk, 001</title> -<style> -span, div > div { color:fuchsia } -.under { text-decoration:underline } -.over { text-decoration:overline } -.strike { text-decoration:line-through } -</style> -<div>Quirk should apply:</div> -<div><u>foo </u><span class="under">style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color</span><u> bar</u></div> -<div><u>foo </u><span class="under">color and style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color=x and style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color=transparent and style</span><u> bar</u></div> -<div><u>foo </u><span class="under">color="" and style</span><u> bar</u></div> -<div><u>foo</u><div class="under">block</div><u>bar</u></div> -<div><s>foo </s><span class="strike">line-through</span><s> bar</s></div> -<div><u class="over">foo </u><span class="over">overline</span><u class="over"> bar</u></div> -<div>Quirks should not apply:</div> -<div><u>foo <span>span</span> bar</u></div> -<div><u>foo <span>no-namespace font element</span> bar</u></div> -<div><u>foo <span>uppercase FONT element</span> bar</u></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-border-1-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-border-1-expected.html deleted file mode 100644 index ceac88e..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-border-1-expected.html +++ /dev/null
@@ -1,46 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Table borders</title> -<style> -table { - border-width: 1px; - border-style: outset; -} -td { - border-width: 1px; - border-style: inset; -} -</style> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-border-2-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-border-2-expected.html deleted file mode 100644 index 36d1e45..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-border-2-expected.html +++ /dev/null
@@ -1,30 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Table borders</title> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table> -<table> -<tr><td>Test -</table>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-cell-width-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-cell-width-expected.html deleted file mode 100644 index b5ba044..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-cell-width-expected.html +++ /dev/null
@@ -1,37 +0,0 @@ -<style> -body { - margin: 0; -} - -.row { - clear: both; -} - -.row div { - float: left; -} - -.red { - background-color: red; -} -</style> - -<div class="row"> - <div class="red" style="width: 200px">a</div> - <div style="width: 200px">a</div> -</div> - -<div class="row"> - <div class="red" style="width: 200px">a</div> - <div style="width: 200px">a</div> -</div> - -<div class="row"> - <div class="red" style="width: 100px">a</div> - <div style="width: 300px">a</div> -</div> - -<div class="row"> - <div class="red" style="width: 100px">a</div> - <div style="width: 300px">a</div> -</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-cell-width-s-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-cell-width-s-expected.html deleted file mode 100644 index b5ba044..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-cell-width-s-expected.html +++ /dev/null
@@ -1,37 +0,0 @@ -<style> -body { - margin: 0; -} - -.row { - clear: both; -} - -.row div { - float: left; -} - -.red { - background-color: red; -} -</style> - -<div class="row"> - <div class="red" style="width: 200px">a</div> - <div style="width: 200px">a</div> -</div> - -<div class="row"> - <div class="red" style="width: 200px">a</div> - <div style="width: 200px">a</div> -</div> - -<div class="row"> - <div class="red" style="width: 100px">a</div> - <div style="width: 300px">a</div> -</div> - -<div class="row"> - <div class="red" style="width: 100px">a</div> - <div style="width: 300px">a</div> -</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-layout-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-layout-expected.html deleted file mode 100644 index d76a48c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-layout-expected.html +++ /dev/null
@@ -1,9 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Table layout attribute</title> -<table border width=100%> -<tr><td>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<td>aaa -</table> -<table border width=100%> -<tr><td>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<td>aaa -</table>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-width-150percent-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-width-150percent-expected.html deleted file mode 100644 index 820c360e..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-width-150percent-expected.html +++ /dev/null
@@ -1,12 +0,0 @@ -<!doctype html> -<title>Test for capping percentages</title> -<style> -div { width:300px; background:yellow; height:50px; } -table { width:150%; } -td { background:blue; } -</style> -<div> - <table cellspacing="0" cellpadding="0" border="0"> - <tr><td>parent div float=left</td></tr> - </table> -</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-width-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-width-expected.html deleted file mode 100644 index 2b0f9e4..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-width-expected.html +++ /dev/null
@@ -1,13 +0,0 @@ -<style> -p { - padding: 0; - margin: 0; -} -</style> - -<p>a b</p> - -<hr> - -<p>a</p> -<p>b</p>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-width-s-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-width-s-expected.html deleted file mode 100644 index 2b0f9e4..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/tables/table-width-s-expected.html +++ /dev/null
@@ -1,13 +0,0 @@ -<style> -p { - padding: 0; - margin: 0; -} -</style> - -<p>a b</p> - -<hr> - -<p>a</p> -<p>b</p>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-fieldset-element-0/min-width-not-important-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-fieldset-element-0/min-width-not-important-expected.html deleted file mode 100644 index d17268a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-fieldset-element-0/min-width-not-important-expected.html +++ /dev/null
@@ -1,21 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - <title>Rendering requirements Reftest Reference</title> - <style> -body { - margin: 10px; -} -div { - background-color: green; - height: 100px; - width: 100px; -} - </style> -</head> -<body> - <div></div> - <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/align-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/align-expected.html deleted file mode 100644 index 9e4283e2..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/align-expected.html +++ /dev/null
@@ -1,31 +0,0 @@ - -<!doctype html> -<meta charset=utf-8> -<style> -.hr { - color: gray; - border-style: inset; - border-width: 1px; - margin: 0.5em auto; - width: 100px; -} - -.left { - margin-left: 0; -} - -.right { - margin-right: 0; -} -</style> -<div class='hr'></div> -<div class='hr left'></div> -<div class='hr'></div> -<div class='hr right'></div> -<div class='hr'></div> - -<div class='hr'></div> -<div class='hr left'></div> -<div class='hr'></div> -<div class='hr right'></div> -<div class='hr'></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/color-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/color-expected.html deleted file mode 100644 index 5cd35c8..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/color-expected.html +++ /dev/null
@@ -1,22 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<style> -.hr { - color: gray; - border-style: inset; - border-width: 1px; - margin: 0.5em auto; -} - -.green { - color: green; -} - -.no-inset { - border-style: solid; -} -</style> -<div class='hr'></div> -<div class='hr no-inset'></div> -<div class='hr no-inset'></div> -<div class='hr green no-inset'></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/width-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/width-expected.html deleted file mode 100644 index 245fde99..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/width-expected.html +++ /dev/null
@@ -1,19 +0,0 @@ -<style> -.hr { - color: gray; - border-style: inset; - border-width: 1px; - margin: 0.5em auto; -} -</style> -<div class=hr></div> -<div class=hr style="width: 50%"></div> -<div class=hr style="width: 100px"></div> -<div class=hr style="width: 100px"></div> -<div class=hr style="width: 100px"></div> -<div class=hr style="width: 100.99px"></div> -<div class=hr style="width: 0%"></div> -<div class=hr style="width: 0%"></div> -<div class=hr style="width: 0%"></div> -<div class=hr style="width: 0%"></div> -<div class=hr></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-page/body_text_00ffff-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-page/body_text_00ffff-expected.html deleted file mode 100644 index c907a11..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/the-page/body_text_00ffff-expected.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>[body - TEXT=00ffff] Reference file</title> -<link rel="author" title="Intel" href="http://www.intel.com"> -<style> - body { - color: blue; - } -</style> -<body> - <p>This document should have text color 'Blue' using the RGB Hexadecimal color value of "0000ff". </p> - <p>This test passes if the color of text above matches the image below.</p> - <p><img src="/images/blue.png"/></p> -</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-dim-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-dim-expected.html deleted file mode 100644 index b1adb68..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-dim-expected.html +++ /dev/null
@@ -1,11 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>img width/height - reference</title> -<style> -p { width: 50px; height: 50px; } -</style> -<p><img src=/images/green.png> -<p><img src=/images/green.png style="width: 10px"> -<p><img src=/images/green.png style="height: 10px"> -<p><img src=/images/green.png style="width: 10%"> -<p><img src=/images/green.png style="height: 10%">
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/embedded-content-rendering-rules/canvas-fallback-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/embedded-content-rendering-rules/canvas-fallback-expected.html deleted file mode 100644 index 9077591..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/embedded-content-rendering-rules/canvas-fallback-expected.html +++ /dev/null
@@ -1,4 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>Canvas fallback content</title> -<p>The word "FAIL" should not be visible below this line.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/embedded-content-rendering-rules/canvas_scale-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/embedded-content-rendering-rules/canvas_scale-expected.html deleted file mode 100644 index 2d1756f..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/embedded-content-rendering-rules/canvas_scale-expected.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!doctype html> -<meta charset="utf-8"> -<style> -span { - display: inline-block; - width: 20px; - height: 20px; -} -div { - line-height: 0; -} -</style> -<div><span style="background-color: #FF00FF"></span><span style="background-color: #00FF00"></span></div> -<div><span style="background-color: #0000FF"></span><span style="background-color: #FF00FF"></span></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/embedded-content-rendering-rules/canvas_without_context_a-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/embedded-content-rendering-rules/canvas_without_context_a-expected.html deleted file mode 100644 index ae0c9c8c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/embedded-content-rendering-rules/canvas_without_context_a-expected.html +++ /dev/null
@@ -1,14 +0,0 @@ -<html> -<head> -<style> - div { - background-color: green; - width: 20px; - height: 20px; - } -</style> -</head> -<body> -<div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/images/space-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/images/space-expected.html deleted file mode 100644 index 0cf272e..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/rendering/replaced-elements/images/space-expected.html +++ /dev/null
@@ -1,13 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>img hspace/vspace - reference</title> -<style> -span { background: blue; } -</style> -<div style=width:400px;> -<p><span><img src=/images/green.png></span> -<p><span><img src=/images/green.png style="margin: 0 10px"></span> -<p><span><img src=/images/green.png style="margin: 10px 0"></span> -<p><span><img src=/images/green.png style="margin: 0 10%"></span> -<p><span><img src=/images/green.png style="margin: 10% 0"></span> -</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-link-element/stylesheet-empty-href-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-link-element/stylesheet-empty-href-expected.html deleted file mode 100644 index 63b75d0..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-link-element/stylesheet-empty-href-expected.html +++ /dev/null
@@ -1,9 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Test</title> -<style> -body { - color: green; -} -</style> -<p>This text should be green.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-link-element/stylesheet-media-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-link-element/stylesheet-media-expected.html deleted file mode 100644 index 63b75d0..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-link-element/stylesheet-media-expected.html +++ /dev/null
@@ -1,9 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Test</title> -<style> -body { - color: green; -} -</style> -<p>This text should be green.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-link-element/stylesheet-with-base-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-link-element/stylesheet-with-base-expected.html deleted file mode 100644 index 83f0d06..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-link-element/stylesheet-with-base-expected.html +++ /dev/null
@@ -1,11 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>Stylesheet Without Base Tag</title> - <style> - body { background-color: green; } - </style> -</head> -<body> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-style-element/html_style_in_comment-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-style-element/html_style_in_comment-expected.html deleted file mode 100644 index 999383c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-style-element/html_style_in_comment-expected.html +++ /dev/null
@@ -1,18 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>[style] Reference file</title> -<link rel="author" title="Intel" href="http://www.intel.com"> -<style> - h4 { - color: green; - } -</style> -<body> - <p> - This page tests that Style written inside HTML comment is not applied - </p> - This test passes if the text below is <b>Green. NOT Red.</b> - <h4> - This is some text. - </h4> -</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-01-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-01-expected.html deleted file mode 100644 index 91d680d..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-01-expected.html +++ /dev/null
@@ -1,7 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Embed Reftest Reference</title> -<link rel="author" title="Intel" href="http://www.intel.com"> -<body> - <p>Test passes if there is <strong>no red</strong>.</p> -</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe-with-base-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe-with-base-expected.html deleted file mode 100644 index 21f11d1..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe-with-base-expected.html +++ /dev/null
@@ -1,9 +0,0 @@ -<!doctype html> -<html> -<head> - <title>iframe Without Base Tag</title> -</head> -<body> - <iframe src="support/blank.htm"> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-img-element/document-base-url-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-img-element/document-base-url-expected.html deleted file mode 100644 index 6e55b21..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-img-element/document-base-url-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!DOCTYPE HTML> -<meta charset="utf-8"> -<title>Document base URL img test</title> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-img-element" /> -<img src="resources/cat.jpg" alt="cat">
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/image01-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/image01-expected.html deleted file mode 100644 index 62c141d..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/image01-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>input type image reference file</title> -<link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org"> -<img src="/media/poster.png"/>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-textarea-element/textarea-newline-bidi-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-textarea-element/textarea-newline-bidi-expected.html deleted file mode 100644 index d69195b..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-textarea-element/textarea-newline-bidi-expected.html +++ /dev/null
@@ -1,19 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>HTML Test reference: newline in <textarea> separates bidi paragraphs</title> - <link rel="author" title="Amir E. Aharoni" href="mailto:amir.aharoni@mail.huji.ac.il"/> - <link rel="author" title="Eyal Sela" href="mailto:eyal@post.isoc.org.il"/> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"/> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-textarea-element"/> - </head> - <body> - <div class="instructions"><p>Test passes if the rightmost character in the first line below is a full stop and to the left of it is a Hebrew letter.</p></div> - <div class="test"> - <textarea cols="70" rows="3"> -A Hebrew letter and a full stop: א.‎ -א this line begins with a Hebrew letter. - </textarea> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-textarea-element/wrap-reflect-1a-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-textarea-element/wrap-reflect-1a-expected.html deleted file mode 100644 index 98a7f8a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-textarea-element/wrap-reflect-1a-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!DOCTYPE html> -<title>Dynamic manipulation of textarea.wrap</title> -<link rel=help href=https://html.spec.whatwg.org/multipage/#dom-textarea-wrap> -<link rel=author title=Ms2ger href=mailto:ms2ger@gmail.com> -<textarea wrap=soft cols=20>01234567890 01234567890 01234567890</textarea>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-textarea-element/wrap-reflect-1b-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-textarea-element/wrap-reflect-1b-expected.html deleted file mode 100644 index 98a7f8a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-textarea-element/wrap-reflect-1b-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!DOCTYPE html> -<title>Dynamic manipulation of textarea.wrap</title> -<link rel=help href=https://html.spec.whatwg.org/multipage/#dom-textarea-wrap> -<link rel=author title=Ms2ger href=mailto:ms2ger@gmail.com> -<textarea wrap=soft cols=20>01234567890 01234567890 01234567890</textarea>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-001-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-001-expected.html deleted file mode 100644 index 23b6cda..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-001-expected.html +++ /dev/null
@@ -1,46 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - <title>li element</title> - <link rel="author" title="dzenana" href="mailto:dzenana.trenutak@gmail.com"> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-li-element"> - <meta name="assert" content="The value attribute has no effect when applied to a li element whose parent is a non-ol element." /> -</head> -<body> - <h1>Description</h1> - <p>This test continues to validate the li element.</p> - - <p>This reftest verifies that the value attribute has no effect when applied to a list item NOT having an ol parent and not marked as display: list-item.</p> - <p>A reftest is necessary because the values of li elements as calculated by the user agent are NOT available programatically. Only explicitly-set values are then available programatically.</p> - <p>This reftest passes if you see NO sequencing information on any of the items below.</p> - - <p>Unordered List</p> - <ul> - <li>list item</li> - <li>list item</li> - <li>list item</li> - </ul> - - <menu> - <li>Menu Item</li> - <li>Menu Item</li> - </menu> - - <menu type="toolbar"> - <li> - <menu label="ToolbarLabel"> - <li><a>Toolbar Menu Item</a></li> - <li><a>Toolbar Menu Item</a></li> - </menu> - </li> - <li> - <menu label="ToolbarLabel"> - <li><a>Toolbar Menu Item</a></li> - <li><a>Toolbar Menu Item</a></li> - </menu> - </li> - </menu> - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-002-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-002-expected.html deleted file mode 100644 index 1e453e1a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-002-expected.html +++ /dev/null
@@ -1,32 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - <title>li element</title> - <link rel="author" title="dzenana" href="mailto:dzenana.trenutak@gmail.com"> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-li-element"> - <meta name="assert" content="li elements with ol parents have ordinal values." /> - <style type="text/css"> - span p {display:list-item; margin-left: 0; margin-top: 0; margin-bottom: 0; padding-left: 0; padding-top: 0; padding-bottom: 0;} - span span p {margin-left: 0; margin-top: 0; margin-bottom: 0; padding-left: 5em; padding-top: 0; padding-bottom: 0; font-family: monospace;} - </style> -</head> -<body> - <h1>Description</h1> - <p>This test continues to validate the li element.</p> - - <p>This reftest verifies that the value attribute has an effect when applied to a list item with an ol parent.</p> - <p>A reftest is necessary because the values of li elements as calculated by the user agent are NOT available programatically. Only explicitly-set values are then available programatically.</p> - <p>This reftest passes if you see the numbers 1. 2. 3. below the words "Ordered List"</p> - - <span> - <p>Ordered List</p> - <span> - <p>1.</p> - <p>2.</p> - <p>3.</p> - </span> - </span> - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item-expected.html deleted file mode 100644 index fb142f84..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item-expected.html +++ /dev/null
@@ -1,40 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>display: list-item on non-<li> elements</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#ordinal-value"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#list-owner"> - -<style> - .list-item { - display: list-item; - list-style-type: decimal; - } - - .list-item[hidden] { - display: none; - } -</style> - -<p>This test matches if both lists display similar to the following:</p> - -<pre>1. A -2. B - D -3. E</pre> - -<hr> - -<ol> - <li value="1">A</li> - <li value="2">B</li> - <span>D</span> - <li value="3">E</li> -</ol> - -<ol> - <li value="1">A</li> - <li value="2">B</li> - <span>D</span> - <li value="3">E</li> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-menu-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-menu-expected.html deleted file mode 100644 index 2b1ea76..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-menu-expected.html +++ /dev/null
@@ -1,46 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>list owner is calculated to be narest ancestor menu if it exists</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#ordinal-value"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#list-owner"> - -<p>This test matches if the list displays similar to the following</p> - -<pre>1. A -2. B -3. C -4. D -5. E - 1. F - 2. G -6. H - 1. I - 2. J - 1. K - 2. L</pre> - -<hr> - -<ol> - <li value="1">A</li> - <li value="2">B</li> - <li value="3">C</li> - <li value="4">D</li> - <li value="5">E</li> - <ol> - <li value="1">F</li> - <li value="2">G</li> - </ol> - <li value="6">H</li> - <ol> - <li value="1">I</li> - <li value="2"> - J - <ol> - <li value="1">K</li> - <li value="2">L</li> - </ol> - </li> - </ol> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-mixed-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-mixed-expected.html deleted file mode 100644 index b72768a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-mixed-expected.html +++ /dev/null
@@ -1,52 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>list owner is calculated to be nearest ancestor ul or ul (but not dir) if it exists</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#ordinal-value"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#list-owner"> - -<style> - li { - list-style-type: decimal; - } -</style> - -<p>This test matches if the list displays similar to the following</p> - -<pre>1. A -2. B -3. C -4. D -5. E - 1. F - 2. G -6. H - 1. I - 2. J - 3. K - 4. L</pre> - -<hr> - -<ol> - <li value="1">A</li> - <li value="2">B</li> - <li value="3">C</li> - <li value="4">D</li> - <li value="5">E</li> - <ol> - <li value="1">F</li> - <li value="2">G</li> - </ol> - <li value="6">H</li> - <ol> - <li value="1">I</li> - <li value="2"> - J - <dir> - <li value="3">K</li> - <li value="4">L</li> - </dir> - </li> - </ol> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-not-dir-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-not-dir-expected.html deleted file mode 100644 index fad00fa3..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-not-dir-expected.html +++ /dev/null
@@ -1,52 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>The dir element is not treated specially when calculating list owners</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#ordinal-value"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#list-owner"> - -<style> - li { - list-style-type: decimal; - } -</style> - -<p>This test matches if the list displays similar to the following</p> - -<pre>1. A -2. B -3. C -4. D -5. E - 6. F - 7. G -8. H - 9. I - 10. J - 11. K - 12. L</pre> - -<hr> - -<ol> - <li value="1">A</li> - <li value="2">B</li> - <li value="3">C</li> - <li value="4">D</li> - <li value="5">E</li> - <dir> - <li value="6">F</li> - <li value="7">G</li> - </dir> - <li value="8">H</li> - <dir> - <li value="9">I</li> - <li value="10"> - J - <dir> - <li value="11">K</li> - <li value="12">L</li> - </dir> - </li> - </dir> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ol-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ol-expected.html deleted file mode 100644 index 96cc9c3..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ol-expected.html +++ /dev/null
@@ -1,46 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>list owner is calculated to be narest ancestor ol if it exists</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#ordinal-value"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#list-owner"> - -<p>This test matches if the list displays similar to the following</p> - -<pre>1. A -2. B -3. C -4. D -5. E - 1. F - 2. G -6. H - 1. I - 2. J - 1. K - 2. L</pre> - -<hr> - -<ol> - <li value="1">A</li> - <li value="2">B</li> - <li value="3">C</li> - <li value="4">D</li> - <li value="5">E</li> - <ol> - <li value="1">F</li> - <li value="2">G</li> - </ol> - <li value="6">H</li> - <ol> - <li value="1">I</li> - <li value="2"> - J - <ol> - <li value="1">K</li> - <li value="2">L</li> - </ol> - </li> - </ol> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-parent-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-parent-expected.html deleted file mode 100644 index 03a0570..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-parent-expected.html +++ /dev/null
@@ -1,40 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>list owner is calculated to be the parent if there is no ancestor ul/ol/menu</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#ordinal-value"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#list-owner"> - -<style> - li { - list-style-type: decimal; - list-style-position: inside; - } - - ol { - padding: 50px; - margin: 0; - } -</style> - -<p>This test matches if the list displays similar to the following</p> - -<pre>1. A -2. B -1. C -1. D - 1. E -3. F</pre> - -<hr> - -<ol> - <li value="1">A</li> - <li value="2">B</li> - <li value="1">C</li> - <li value="1">D</li> - <blockquote> - <li value="1">E</li> - </blockquote> - <li value="3">F</li> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-skip-no-boxes-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-skip-no-boxes-expected.html deleted file mode 100644 index e758f52..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-skip-no-boxes-expected.html +++ /dev/null
@@ -1,42 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>list owner calculation skips elements that do not generate layout boxes</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#ordinal-value"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#list-owner"> - -<p>This test matches if the list displays similar to the following</p> - -<pre>1. A -2. B -3. C -4. D -5. E -6. F -7. G -8. H -9. I -10. J - 1. K - 2. L</pre> - -<hr> - -<ol> - <li value="1">A</li> - <li value="2">B</li> - <li value="3">C</li> - <li value="4">D</li> - <li value="5">E</li> - <li value="6">F</li> - <li value="7">G</li> - <li value="8">H</li> - <li value="9">I</li> - <li value="10"> - J - <ol> - <li value="1">K</li> - <li value="2">L</li> - </ol> - </li> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ul-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ul-expected.html deleted file mode 100644 index 22ee9f4..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-list-owner-ul-expected.html +++ /dev/null
@@ -1,46 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>list owner is calculated to be nearest ancestor ul if it exists</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#ordinal-value"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#list-owner"> - -<p>This test matches if the list displays similar to the following</p> - -<pre>1. A -2. B -3. C -4. D -5. E - 1. F - 2. G -6. H - 1. I - 2. J - 1. K - 2. L</pre> - -<hr> - -<ol> - <li value="1">A</li> - <li value="2">B</li> - <li value="3">C</li> - <li value="4">D</li> - <li value="5">E</li> - <ol> - <li value="1">F</li> - <li value="2">G</li> - </ol> - <li value="6">H</li> - <ol> - <li value="1">I</li> - <li value="2"> - J - <ol> - <li value="1">K</li> - <li value="2">L</li> - </ol> - </li> - </ol> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-no-list-owner-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-no-list-owner-expected.html deleted file mode 100644 index e3ed2a51..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-no-list-owner-expected.html +++ /dev/null
@@ -1,29 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>If no ancestors generate CSS boxes, the list item has no owner, and thus gets numbered as 0</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#ordinal-value"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#list-owner"> - -<style> - html, body { - display: contents; - } - - li { - list-style-type: decimal; - margin-left: 50px; - } -</style> - -<p>This test matches if the list displays similar to the following</p> - -<pre>0. A -0. B -0. C</pre> - -<hr> - -<li value="0">A</li> -<li value="0">B</li> -<li value="0">C</li>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-not-being-rendered-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-not-being-rendered-expected.html deleted file mode 100644 index 9a018cf..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-li-element/grouping-li-reftest-not-being-rendered-expected.html +++ /dev/null
@@ -1,24 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>List items that are not being rendered do not participate in numbering</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#ordinal-value"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics.html#list-owner"> - -<p>This test matches if the list displays similar to the following</p> - -<pre>1. A -2. B -3. D -4. E -5. G</pre> - -<hr> - -<ol> - <li value="1">A</li> - <li value="2">B</li> - <li value="3">D</li> - <li value="4">E</li> - <li value="5">G</li> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001-expected.html deleted file mode 100644 index 8da3288..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001-expected.html +++ /dev/null
@@ -1,50 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - <title>ol element</title> - <link rel="author" title="dzenana" href="mailto:dzenana.trenutak@gmail.com"> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-ol-element"> - <meta name="assert" content="OL's reversed attribute creates a descending list." /> - <style type="text/css"> - span p {display:list-item; margin-left: 0; margin-top: 0; margin-bottom: 0; padding-left: 0; padding-top: 0; padding-bottom: 0;} - span span p {margin-left: 0; margin-top: 0; margin-bottom: 0; padding-left: 5em; padding-top: 0; padding-bottom: 0; font-family: monospace;} - </style> -</head> -<body> - <h1>Description</h1> - <p>This test continues to validate the ol element.</p> - - <p>These reftests are necessary because the values of the ol's li children as calculated by the user agent are NOT available programatically. Only explicitly-set values are available programatically. Therefore, we need to check actual rendering against expected rendering.</p> - - <p><strong>This reftest passes if you see an ascending list followed by two descending lists.</strong></p> - <p>(Note: each list item has no content; only the sequencing should appear.)</p> - - <span> - - <p>Ordered List</p> - <span> - <p>1.</p> - <p>2.</p> - <p>3.</p> - </span> - - <p>Ordered List - reversed via content attribute</p> - <span> - <p>3.</p> - <p>2.</p> - <p>1.</p> - </span> - - <p>Ordered List - reversed via IDL</p> - <span> - <p>3.</p> - <p>2.</p> - <p>1.</p> - </span> - - </span> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001-expected.html deleted file mode 100644 index 0f65118..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001-expected.html +++ /dev/null
@@ -1,53 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - <title>ol element</title> - <link rel="author" title="dzenana" href="mailto:dzenana.trenutak@gmail.com"> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-ol-element"> - <meta name="assert" content="Sequences produced by calculated values for LI elements within OL match spec's expectations. (part one)" /> - <style type="text/css"> - span p {display:list-item; margin-left: 0; margin-top: 0; margin-bottom: 0; padding-left: 0; padding-top: 0; padding-bottom: 0;} - span span p {margin-left: 0; margin-top: 0; margin-bottom: 0; padding-left: 5em; padding-top: 0; padding-bottom: 0; font-family: monospace;} - </style> -</head> -<body> - <p>This test continues to validate the ol element. This reftest is necessary because the values of the ol's li children as calculated and displayed by the user agent are NOT systematically available programatically. Only explicitly-set values are available programatically. Therefore, we need to check actual rendering against expected rendering.</p> - - <p><strong>This reftest passes if each list's items are numbered identically to the horizontal sequence immediately above those list items.</strong></p> - <p>(Note: each list item has no content; only the sequencing should appear.)</p> - - <span> - - <p>2, 3, 4 (ol has start attribute of 2)</p> - <span> - <p>2.</p> - <p>3.</p> - <p>4.</p> - </span> - - <p>-9, -8, -7 (ol has start attribute of -9)</p> - <span> - <p>-9.</p> - <p>-8.</p> - <p>-7.</p> - </span> - - <p>1000, 1001, 1002 (list's start attribute of 1000 provided by JavaScript)</p> - <span> - <p>1000.</p> - <p>1001.</p> - <p>1002.</p> - </span> - - <p>2, 1, 9 (each list item has a specified value attribute, list has a start attribute of 1000)</p> - <span> - <p>2.</p> - <p>1.</p> - <p>9.</p> - </span> - - </span> - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002-expected.html deleted file mode 100644 index 2dbdf4a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002-expected.html +++ /dev/null
@@ -1,53 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - <title>ol element</title> - <link rel="author" title="dzenana" href="mailto:dzenana.trenutak@gmail.com"> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-ol-element"> - <meta name="assert" content="Sequences produced by calculated values for LI elements within OL match spec's expectations. (part two)" /> - <style type="text/css"> - span p {display:list-item; margin-left: 0; margin-top: 0; margin-bottom: 0; padding-left: 0; padding-top: 0; padding-bottom: 0;} - span span p {margin-left: 0; margin-top: 0; margin-bottom: 0; padding-left: 5em; padding-top: 0; padding-bottom: 0; font-family: monospace;} - </style> -</head> -<body> - <p>This test continues to validate the ol element. This reftest is necessary because the values of the ol's li children as calculated and displayed by the user agent are NOT systematically available programatically. Only explicitly-set values are available programatically. Therefore, we need to check actual rendering against expected rendering.</p> - - <p><strong>This reftest passes if each list's items are numbered identically to the horizontal sequence immediately above those list items.</strong></p> - <p>(Note: each list item has no content; only the sequencing should appear.)</p> - - <span> - - <p>4, 5, 6 (ol has start attribute of 2 which is overridden by first list item's value attribute of 4)</p> - <span> - <p>4.</p> - <p>5.</p> - <p>6.</p> - </span> - - <p>4, 5, 6 (ol has start attribute of -10 which is overridden by first list item's value attribute of 4)</p> - <span> - <p>4.</p> - <p>5.</p> - <p>6.</p> - </span> - - <p>1, 5, 6 (2nd list item has value attribute of 5)</p> - <span> - <p>1.</p> - <p>5.</p> - <p>6.</p> - </span> - - <p>-1, -5, -4 (list has a start attribute of -1, and 2nd list item has value attribute of -5)</p> - <span> - <p>-1.</p> - <p>-5.</p> - <p>-4.</p> - </span> - - </span> - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001-expected.html deleted file mode 100644 index 391859e..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001-expected.html +++ /dev/null
@@ -1,52 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - <title>ol element</title> - <link rel="author" title="dzenana" href="mailto:dzenana.trenutak@gmail.com"> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-ol-element"> - <meta name="assert" content="OL's type attribute defaults to decimal state." /> - <style type="text/css"> - span p {display:list-item; margin-left: 0; margin-top: 0; margin-bottom: 0; padding-left: 0; padding-top: 0; padding-bottom: 0;} - span span p {margin-left: 0; margin-top: 0; margin-bottom: 0; padding-left: 5em; padding-top: 0; padding-bottom: 0; font-family: monospace;} - </style> -</head> -<body> - <p>This test continues to validate the ol element. This reftest is necessary because the values of the ol's li children as calculated and displayed by the user agent are NOT systematically available programatically. Only explicitly-set values are available programatically. Therefore, we need to check actual rendering against expected rendering.</p> - - <p><strong>This reftest passes if each list's items are labelled identically to the horizontal sequence immediately above those list items:</strong></p> - <p>(Note: each list item has no content; only the sequencing should appear.)</p> - - <span> - <p>1, 2, 3 (default value for unspecified type attribute is 'decimal')</p> - <span> - <p>1.</p> - <p>2.</p> - <p>3.</p> - </span> - - <p>1, 2, 3 (default value for type attribute not listed in spec table is 'decimal' (type = "!"))</p> - <span> - <p>1.</p> - <p>2.</p> - <p>3.</p> - </span> - - <p>1, 2, 3 (default value for type attribute not listed in spec table is 'decimal' (type = "2"))</p> - <span> - <p>1.</p> - <p>2.</p> - <p>3.</p> - </span> - - <p>1, 2, 3 (default value for type attribute not listed in spec table is 'decimal' (type = "b"))</p> - <span> - <p>1.</p> - <p>2.</p> - <p>3.</p> - </span> - - </span> - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002-expected.html deleted file mode 100644 index 8d8012e8..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002-expected.html +++ /dev/null
@@ -1,59 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - <title>ol element</title> - <link rel="author" title="dzenana" href="mailto:dzenana.trenutak@gmail.com"> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-ol-element"> - <meta name="assert" content="List items are rendered consistently with the state of the type attribute." /> - <style type="text/css"> - span p {display:list-item; margin-left: 0; margin-top: 0; margin-bottom: 0; padding-left: 0; padding-top: 0; padding-bottom: 0;} - span span p {margin-left: 0; margin-top: 0; margin-bottom: 0; padding-left: 5em; padding-top: 0; padding-bottom: 0; font-family: monospace;} - </style> -</head> -<body> - <p>This test continues to validate the ol element. This reftest is necessary because the values of the ol's li children as calculated and displayed by the user agent are NOT systematically available programatically. Only explicitly-set values are available programatically. Therefore, we need to check actual rendering against expected rendering.</p> - - <p><strong>This reftest passes if each list's items are labelled identically to the horizontal sequence immediately above those list items:</strong></p> - <p>(Note: each list item has no content; only the sequencing should appear.)</p> - - <span> - <p>1, 2, 3 (type attribute of "1" results in decimal type)</p> - <span> - <p>1.</p> - <p>2.</p> - <p>3.</p> - </span> - - <p>aa, ab, ac (type attribute of "a" results in lower case latin alphabet, start = 27)</p> - <span> - <p>aa.</p> - <p>ab.</p> - <p>ac.</p> - </span> - - <p>AA, AB, AC (type attribute of "A" results in upper case latin alphabet, start = 27)</p> - <span> - <p>AA.</p> - <p>AB.</p> - <p>AC.</p> - </span> - - <p>i, v, c (type attribute of "i" results in lower case roman alphabet, list values = 1, 5, 100)</p> - <span> - <p>i.</p> - <p>v.</p> - <p>c.</p> - </span> - - <p>I, V, C (type attribute of "I" results in upper case roman alphabet, list values = 1, 5, 100)</p> - <span> - <p>I.</p> - <p>V.</p> - <p>C.</p> - </span> - - </span> - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003-expected.html deleted file mode 100644 index 6c836cf3..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003-expected.html +++ /dev/null
@@ -1,76 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - <title>ol element</title> - <link rel="author" title="dzenana" href="mailto:dzenana.trenutak@gmail.com"> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-ol-element"> - <meta name="assert" content="OL's type attribute defaults to decimal state." /> - <style type="text/css"> - span p {display:list-item; margin-left: 0; margin-top: 0; margin-bottom: 0; padding-left: 0; padding-top: 0; padding-bottom: 0;} - span span p {margin-left: 0; margin-top: 0; margin-bottom: 0; padding-left: 5em; padding-top: 0; padding-bottom: 0; font-family: monospace;} - </style> -</head> -<body> - <p>This test continues to validate the ol element. This reftest is necessary because the values of the ol's li children as calculated and displayed by the user agent are NOT systematically available programatically. Only explicitly-set values are available programatically. Therefore, we need to check actual rendering against expected rendering.</p> - - <p><strong>This reftest passes if each list's items are labelled identically to the horizontal sequence immediately above those list items:</strong></p> - <p>(Note: each list item has no content; only the sequencing should appear.)</p> - - <span> - <p>-3, -2, -1 (type is "a", start is -3)</p> - <span> - <p>-3.</p> - <p>-2.</p> - <p>-1.</p> - </span> - - <p>0, a (type is "a", start is 0)</p> - <span> - <p>0.</p> - <p>a.</p> - </span> - - <p>-3, -2, -1 (type is "A", start is -3)</p> - <span> - <p>-3.</p> - <p>-2.</p> - <p>-1.</p> - </span> - - <p>0, A (type is "A", start is 0)</p> - <span> - <p>0.</p> - <p>A.</p> - </span> - - <p>-3, -2, -1 (type is "i", start is -3)</p> - <span> - <p>-3.</p> - <p>-2.</p> - <p>-1.</p> - </span> - - <p>0, i (type is "i", start is 0)</p> - <span> - <p>0.</p> - <p>i.</p> - </span> - - <p>-3, -2, -1 (type is "I", start is -3)</p> - <span> - <p>-3.</p> - <p>-2.</p> - <p>-1.</p> - </span> - - <p>0, I (type is "I", start is 0)</p> - <span> - <p>0.</p> - <p>I.</p> - </span> - - </span> - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1a-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1a-expected.html deleted file mode 100644 index f8cac3c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1a-expected.html +++ /dev/null
@@ -1,6 +0,0 @@ -<!DOCTYPE html> -<ol> - <li value="3">Three</li> - <li value="2">Two</li> - <li value="1">One</li> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1b-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1b-expected.html deleted file mode 100644 index f8cac3c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1b-expected.html +++ /dev/null
@@ -1,6 +0,0 @@ -<!DOCTYPE html> -<ol> - <li value="3">Three</li> - <li value="2">Two</li> - <li value="1">One</li> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1c-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1c-expected.html deleted file mode 100644 index f8cac3c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1c-expected.html +++ /dev/null
@@ -1,6 +0,0 @@ -<!DOCTYPE html> -<ol> - <li value="3">Three</li> - <li value="2">Two</li> - <li value="1">One</li> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1d-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1d-expected.html deleted file mode 100644 index f8cac3c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1d-expected.html +++ /dev/null
@@ -1,6 +0,0 @@ -<!DOCTYPE html> -<ol> - <li value="3">Three</li> - <li value="2">Two</li> - <li value="1">One</li> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1e-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1e-expected.html deleted file mode 100644 index f8cac3c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-1e-expected.html +++ /dev/null
@@ -1,6 +0,0 @@ -<!DOCTYPE html> -<ol> - <li value="3">Three</li> - <li value="2">Two</li> - <li value="1">One</li> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-2-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-2-expected.html deleted file mode 100644 index 4f3ece2..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-ol-element/reversed-2-expected.html +++ /dev/null
@@ -1,6 +0,0 @@ -<!DOCTYPE html> -<ol> - <li value="5">Five</li> - <li value="4">Four</li> - <li value="3">Three</li> -</ol>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-pre-element/grouping-pre-reftest-001-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-pre-element/grouping-pre-reftest-001-expected.html deleted file mode 100644 index 75aa91b..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-pre-element/grouping-pre-reftest-001-expected.html +++ /dev/null
@@ -1,22 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - <title>pre element</title> - <link rel="author" title="dzenana" href="mailto:dzenana.trenutak@gmail.com"> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-pre-element"> - <meta name="assert" content="Newlines within pre elements separate paragraphs for the purposes of BIDI." /> -</head> -<body> - <h1>Description</h1> - <p>This test continues to validate the pre element.</p> - - <p>The spec states:</p> - <blockquote>"A newline in a pre element should separate paragraphs for the purposes of the Unicode bidirectional algorithm. This requirement may be implemented indirectly through the style layer. For example, an HTML+CSS user agent could implement these requirements by implementing the CSS 'unicode-bidi' property."</blockquote> - - <p>This reftest passes if below you see "ABC ABC" repeated on two separate lines below (4 ABCs total):</p> - - <pre>ABC ABC -ABC ABC</pre> - -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-pre-element/pre-newline-bidi-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-pre-element/pre-newline-bidi-expected.html deleted file mode 100644 index 0f302b5..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/grouping-content/the-pre-element/pre-newline-bidi-expected.html +++ /dev/null
@@ -1,19 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>HTML Test reference: newline in <pre> separates bidi paragraphs</title> - <link rel="author" title="Amir E. Aharoni" href="mailto:amir.aharoni@mail.huji.ac.il"/> - <link rel="author" title="Eyal Sela" href="mailto:eyal@post.isoc.org.il"/> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"/> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-pre-element"/> - </head> - <body> - <div class="instructions"><p>Test passes if the rightmost character in the first line below is a full stop and to the left of it is a Hebrew letter.</p></div> - <div class="test"> - <pre> -A Hebrew letter and a full stop: א.‎ -א this line begins with a Hebrew letter. - </pre> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/links/linktypes/alternate-css-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/links/linktypes/alternate-css-expected.html deleted file mode 100644 index ec961ea..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/links/linktypes/alternate-css-expected.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Reference of Alternate css</title> -<link rel="stylesheet" href="preferred.css" title="preferred"> -<div>foobar</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default-expected.html deleted file mode 100644 index eff61bb..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default-expected.html +++ /dev/null
@@ -1,36 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 500px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭[:)], [+- a ב], [d ג 1]...‬</div> - <div dir="rtl">‭...[d ג 1] ,[+- a ב] ,[:)]‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭[:)], [+- a ב], [d ג 1]...‬</div> - <div dir="rtl">‭...[d ג 1] ,[+- a ב] ,[:)]‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-missing-pdf-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-missing-pdf-expected.html deleted file mode 100644 index b4d44c5..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-missing-pdf-expected.html +++ /dev/null
@@ -1,44 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭cbאde...‬</div> - <div dir="ltr">‭cbאde...‬</div> - <div dir="ltr">‭cbאde...‬</div> - <div dir="rtl">‭...הדaבג‬</div> - <div dir="rtl">‭...הדaבג‬</div> - <div dir="rtl">‭...הדaבג‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭cbאde...‬</div> - <div dir="ltr">‭cbאde...‬</div> - <div dir="ltr">‭cbאde...‬</div> - <div dir="rtl">‭...הדaבג‬</div> - <div dir="rtl">‭...הדaבג‬</div> - <div dir="rtl">‭...הדaבג‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-nested-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-nested-expected.html deleted file mode 100644 index d5d7674a..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-nested-expected.html +++ /dev/null
@@ -1,44 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 500px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭1 + [a + [3 + [b + 4] + ב] + 2] + א‬</div> - <div dir="ltr">‭1 + [a + [3 + [b + 4] + ב] + 2] + א‬</div> - <div dir="ltr">‭1 + [a + [3 + [b + 4] + ב] + 2] + א‬</div> - <div dir="rtl">‭a + [1 + [b + [3 + ב] + 2] + א] + 0‬</div> - <div dir="rtl">‭a + [1 + [b + [3 + ב] + 2] + א] + 0‬</div> - <div dir="rtl">‭a + [1 + [b + [3 + ב] + 2] + א] + 0‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭1 + [a + [3 + [b + 4] + ב] + 2] + א‬</div> - <div dir="ltr">‭1 + [a + [3 + [b + 4] + ב] + 2] + א‬</div> - <div dir="ltr">‭1 + [a + [3 + [b + 4] + ב] + 2] + א‬</div> - <div dir="rtl">‭a + [1 + [b + [3 + ב] + 2] + א] + 0‬</div> - <div dir="rtl">‭a + [1 + [b + [3 + ב] + 2] + א] + 0‬</div> - <div dir="rtl">‭a + [1 + [b + [3 + ב] + 2] + א] + 0‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-number-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-number-expected.html deleted file mode 100644 index df7af77..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-number-expected.html +++ /dev/null
@@ -1,44 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭א - [1]...‬</div> - <div dir="ltr">‭א - [1]...‬</div> - <div dir="ltr">‭א - [1]...‬</div> - <div dir="rtl">‭...[1] - a‬</div> - <div dir="rtl">‭...[1] - a‬</div> - <div dir="rtl">‭...[1] - a‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭א - [1]...‬</div> - <div dir="ltr">‭א - [1]...‬</div> - <div dir="ltr">‭א - [1]...‬</div> - <div dir="rtl">‭...[1] - a‬</div> - <div dir="rtl">‭...[1] - a‬</div> - <div dir="rtl">‭...[1] - a‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-separate-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-separate-expected.html deleted file mode 100644 index ec8e3462..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-separate-expected.html +++ /dev/null
@@ -1,36 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 500px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭א [1 b] c [d ה] ו...‬</div> - <div dir="rtl">‭...f [e ד] ג [ב 1] a‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭א [1 b] c [d ה] ו...‬</div> - <div dir="rtl">‭...f [e ד] ג [ב 1] a‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-1-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-1-expected.html deleted file mode 100644 index c0f323e..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-1-expected.html +++ /dev/null
@@ -1,47 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions">Test passes if the two boxes below look exactly the same.</div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭[א] > [ב]...‬</div> - <div dir="ltr">‭[א] > [ב]...‬</div> - <div dir="ltr">‭[א] > [ב]...‬</div> - <div dir="rtl">‭...[b] < [a]‬</div> - <div dir="rtl">‭...[b] < [a]‬</div> - <div dir="rtl">‭...[b] < [a]‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭[א] > [ב]...‬</div> - <div dir="ltr">‭[א] > [ב]...‬</div> - <div dir="ltr">‭[א] > [ב]...‬</div> - <div dir="rtl">‭...[b] < [a]‬</div> - <div dir="rtl">‭...[b] < [a]‬</div> - <div dir="rtl">‭...[b] < [a]‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-2-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-2-expected.html deleted file mode 100644 index 9aef97c..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-2-expected.html +++ /dev/null
@@ -1,47 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" /> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" /> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { - display: none; - } - </style> - </head> - <body> - <div class="instructions">Test passes if the two boxes below look exactly the same.</div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭אב...‬</div> - <div dir="ltr">‭אב...‬</div> - <div dir="ltr">‭אב...‬</div> - <div dir="rtl">‭...ba‬</div> - <div dir="rtl">‭...ba‬</div> - <div dir="rtl">‭...ba‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭אב...‬</div> - <div dir="ltr">‭אב...‬</div> - <div dir="ltr">‭אב...‬</div> - <div dir="rtl">‭...ba‬</div> - <div dir="rtl">‭...ba‬</div> - <div dir="rtl">‭...ba‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-1-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-1-expected.html deleted file mode 100644 index a34d09b..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-1-expected.html +++ /dev/null
@@ -1,45 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com"> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭[א] > ב...‬</div> - <div dir="ltr">‭[א] > ב...‬</div> - <div dir="ltr">‭[א] > ב...‬</div> - <div dir="rtl">‭...b < [a]‬</div> - <div dir="rtl">‭...b < [a]‬</div> - <div dir="rtl">‭...b < [a]‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭[א] > ב...‬</div> - <div dir="ltr">‭[א] > ב...‬</div> - <div dir="ltr">‭[א] > ב...‬</div> - <div dir="rtl">‭...b < [a]‬</div> - <div dir="rtl">‭...b < [a]‬</div> - <div dir="rtl">‭...b < [a]‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-2-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-2-expected.html deleted file mode 100644 index 80f36183..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-2-expected.html +++ /dev/null
@@ -1,45 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com"> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭אב...‬</div> - <div dir="ltr">‭אב...‬</div> - <div dir="ltr">‭אב...‬</div> - <div dir="rtl">‭...ba‬</div> - <div dir="rtl">‭...ba‬</div> - <div dir="rtl">‭...ba‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭אב...‬</div> - <div dir="ltr">‭אב...‬</div> - <div dir="ltr">‭אב...‬</div> - <div dir="rtl">‭...ba‬</div> - <div dir="rtl">‭...ba‬</div> - <div dir="rtl">‭...ba‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-1-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-1-expected.html deleted file mode 100644 index 5e39eab..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-1-expected.html +++ /dev/null
@@ -1,45 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com"> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭א > [ב]...‬</div> - <div dir="ltr">‭א > [ב]...‬</div> - <div dir="ltr">‭א > [ב]...‬</div> - <div dir="rtl">‭...[b] < a‬</div> - <div dir="rtl">‭...[b] < a‬</div> - <div dir="rtl">‭...[b] < a‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭א > [ב]...‬</div> - <div dir="ltr">‭א > [ב]...‬</div> - <div dir="ltr">‭א > [ב]...‬</div> - <div dir="rtl">‭...[b] < a‬</div> - <div dir="rtl">‭...[b] < a‬</div> - <div dir="rtl">‭...[b] < a‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-2-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-2-expected.html deleted file mode 100644 index 80f36183..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-2-expected.html +++ /dev/null
@@ -1,45 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com"> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭אב...‬</div> - <div dir="ltr">‭אב...‬</div> - <div dir="ltr">‭אב...‬</div> - <div dir="rtl">‭...ba‬</div> - <div dir="rtl">‭...ba‬</div> - <div dir="rtl">‭...ba‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭אב...‬</div> - <div dir="ltr">‭אב...‬</div> - <div dir="ltr">‭אב...‬</div> - <div dir="rtl">‭...ba‬</div> - <div dir="rtl">‭...ba‬</div> - <div dir="rtl">‭...ba‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-1-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-1-expected.html deleted file mode 100644 index ad15d468..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-1-expected.html +++ /dev/null
@@ -1,45 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com"> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭[א] (3 reviews)...‬</div> - <div dir="ltr">‭[א] (3 reviews)...‬</div> - <div dir="ltr">‭[א] (3 reviews)...‬</div> - <div dir="rtl">‭...(3) [a]‬</div> - <div dir="rtl">‭...(3) [a]‬</div> - <div dir="rtl">‭...(3) [a]‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭[א] (3 reviews)...‬</div> - <div dir="ltr">‭[א] (3 reviews)...‬</div> - <div dir="ltr">‭[א] (3 reviews)...‬</div> - <div dir="rtl">‭...(3) [a]‬</div> - <div dir="rtl">‭...(3) [a]‬</div> - <div dir="rtl">‭...(3) [a]‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-2-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-2-expected.html deleted file mode 100644 index d0f1097..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-2-expected.html +++ /dev/null
@@ -1,45 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> - <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com"> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭א1...‬</div> - <div dir="ltr">‭א1...‬</div> - <div dir="ltr">‭א1...‬</div> - <div dir="rtl">‭...1a‬</div> - <div dir="rtl">‭...1a‬</div> - <div dir="rtl">‭...1a‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭א1...‬</div> - <div dir="ltr">‭א1...‬</div> - <div dir="ltr">‭א1...‬</div> - <div dir="rtl">‭...1a‬</div> - <div dir="rtl">‭...1a‬</div> - <div dir="rtl">‭...1a‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-surrounding-run-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-surrounding-run-expected.html deleted file mode 100644 index d7967c7..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-surrounding-run-expected.html +++ /dev/null
@@ -1,44 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭ג < [b] < א...‬</div> - <div dir="ltr">‭ג < [b] < א...‬</div> - <div dir="ltr">‭ג < [b] < א...‬</div> - <div dir="rtl">‭...a > [ב] > c‬</div> - <div dir="rtl">‭...a > [ב] > c‬</div> - <div dir="rtl">‭...a > [ב] > c‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭ג < [b] < א...‬</div> - <div dir="ltr">‭ג < [b] < א...‬</div> - <div dir="ltr">‭ג < [b] < א...‬</div> - <div dir="rtl">‭...a > [ב] > c‬</div> - <div dir="rtl">‭...a > [ב] > c‬</div> - <div dir="rtl">‭...a > [ב] > c‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-wrapped-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-wrapped-expected.html deleted file mode 100644 index 9859de4..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-wrapped-expected.html +++ /dev/null
@@ -1,52 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr"> - ‭b < א‬<br/> - ‭>>>‬<br/> - ‭ד < c...‬ - </div> - <div dir="rtl"> - ‭a > ב‬<br/> - ‭<<<‬<br/> - ‭...ג > d‬ - </div> - </div> - <div class="ref"> - <div dir="ltr"> - ‭b < א‬<br/> - ‭>>>‬<br/> - ‭ד < c...‬ - </div> - <div dir="rtl"> - ‭a > ב‬<br/> - ‭<<<‬<br/> - ‭...ג > d‬ - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-paragraph-level-container-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-paragraph-level-container-expected.html deleted file mode 100644 index 0c74ecf..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdi-element/bdi-paragraph-level-container-expected.html +++ /dev/null
@@ -1,36 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 500px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ו - The first six Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - <div dir="ltr">‭א [1 2 3 b] c [d ה?!] ו...‬</div> - <div dir="rtl">‭...f [!?e ד] ג [ב 3 2 1] a‬</div> - </div> - <div class="ref"> - <div dir="ltr">‭א [1 2 3 b] c [d ה?!] ו...‬</div> - <div dir="rtl">‭...f [!?e ד] ג [ב 3 2 1] a‬</div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdo-element/bdo-child-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdo-element/bdo-child-expected.html deleted file mode 100644 index 83d2dc4a1..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdo-element/bdo-child-expected.html +++ /dev/null
@@ -1,11 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<meta charset="UTF-8"> -<title>directional type reference</title> -</head> -<body> -<p>Test passes if there is text 'WERBEH'.</p> -<div>WERBEH</div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdo-element/bdo-ltr-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdo-element/bdo-ltr-expected.html deleted file mode 100644 index 83d2dc4a1..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdo-element/bdo-ltr-expected.html +++ /dev/null
@@ -1,11 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<meta charset="UTF-8"> -<title>directional type reference</title> -</head> -<body> -<p>Test passes if there is text 'WERBEH'.</p> -<div>WERBEH</div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdo-element/bdo-override-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdo-element/bdo-override-expected.html deleted file mode 100644 index 83d2dc4a1..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdo-element/bdo-override-expected.html +++ /dev/null
@@ -1,11 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<meta charset="UTF-8"> -<title>directional type reference</title> -</head> -<body> -<p>Test passes if there is text 'WERBEH'.</p> -<div>WERBEH</div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdo-element/bidi-001-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdo-element/bidi-001-expected.html deleted file mode 100644 index 83d2dc4a1..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-bdo-element/bidi-001-expected.html +++ /dev/null
@@ -1,11 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<meta charset="UTF-8"> -<title>directional type reference</title> -</head> -<body> -<p>Test passes if there is text 'WERBEH'.</p> -<div>WERBEH</div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-br-element/br-bidi-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-br-element/br-bidi-expected.html deleted file mode 100644 index f07c077..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-br-element/br-bidi-expected.html +++ /dev/null
@@ -1,19 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>HTML Test reference: BR separates bidi paragraph</title> - <link rel="author" title="Amir E. Aharoni" href="mailto:amir.aharoni@mail.huji.ac.il"/> - <link rel="author" title="Eyal Sela" href="mailto:eyal@post.isoc.org.il"/> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"/> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-br-element"/> - </head> - <body> - <div class="instructions"><p>Test passes if the rightmost character in the first line below is a full stop and to the left of it is a Hebrew letter.</p></div> - <div class="test"> - A Hebrew letter and a full stop: א.‎ - <br /> - א this line begins with a Hebrew letter. - </div> -</p> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-br-element/br-bidi-in-inline-ancestors-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-br-element/br-bidi-in-inline-ancestors-expected.html deleted file mode 100644 index c2dd4da..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-br-element/br-bidi-in-inline-ancestors-expected.html +++ /dev/null
@@ -1,38 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"/> - <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> - <style> - body{ - font-size:2em; - } - .test, .ref { - border: medium solid gray; - width: 400px; - margin: 20px; - } - .comments { display: none; } - </style> - </head> - <body> - <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> - <div class="comments"> - Key to entities used below: - א ... ט - The first nine Hebrew letters (strongly RTL). - ‭ - The LRO (left-to-right override) formatting character. - ‬ - The PDF (pop directional formatting) formatting character; closes LRO. - </div> - <div class="test"> - ‭אב גד 1. I like ה. fg hi‬ - <br/> - ‭ab cd 2. ה is great! וז חט‬ - </div> - <div class="ref"> - ‭אב גד 1. I like ה. fg hi‬ - <br/> - ‭ab cd 2. ה is great! וז חט‬ - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-wbr-element/wbr-element-expected.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-wbr-element/wbr-element-expected.html deleted file mode 100644 index f167ea71..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-wbr-element/wbr-element-expected.html +++ /dev/null
@@ -1,9 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>The wbr element</title> -<link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org"> -<meta name="flags" content="ahem"> -<style> - p {font:15px/1 Ahem;} -</style> -<p>Loremipsumdolorsit<br>amet,consectetur<br>adipisicingelit,sed<br>doeiusmodtempor<br>incididuntutlaboreet<br>doloremagnaaliqua.Ut<br>enimadminimveniam,<br>quisnostrud<br>exercitationullamco<br>laborisnisiutaliquip<br>exeacommodo<br>consequat.Duisaute<br>iruredolorin<br>reprehenderitin<br>voluptatevelitesse<br>cillumdoloreeufugiat<br>nullapariatur.<br>Excepteursint<br>occaecatcupidatatnon<br>proident,suntinculpa<br>quiofficiadeserunt<br>mollitanimidest<br>laborum.</p>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/quirks-mode/historical/list-item-bullet-size-expected.html b/third_party/WebKit/LayoutTests/external/wpt/quirks-mode/historical/list-item-bullet-size-expected.html deleted file mode 100644 index f449ce992..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/quirks-mode/historical/list-item-bullet-size-expected.html +++ /dev/null
@@ -1,13 +0,0 @@ -<!doctype html> -<title>Historical quirk: list item bullet size</title> -<style> -p { margin:0 } -#test { font-size:3em; margin-top:0 } -</style> -<p>There should be a normal-size bullet and a big bullet below.</p> -<ul> - <li> -</ul> -<ul id=test> - <li> -</ul>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest-expected.html b/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest-expected.html deleted file mode 100644 index 3050cefe..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest-expected.html +++ /dev/null
@@ -1,25 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" > - <title>Shadow DOM Test Ref file - Tests nested shadow tree.</title> - <link rel="author" title="shingo.miyazawa" href="mailto:kumatronik@gmail.com" > - <script src="../../../../html/resources/common.js"></script> - <meta name="assert" content="nested shadow tree style is valid." > - <style> - #host { - width: 100px; - height: 100px; - background-color: red; - } - </style> - </head> - <body> - <p>The test passes if there is a green square. Test failed if there is a red square.</p> - <div id='host'> - <div id="sub" style="width: 100%;height:100%;"> - <div style="width:100%; height:100%;background-color: green;"></div> - </div> - </div> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/reprojection/reprojection-001-expected.html b/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/reprojection/reprojection-001-expected.html deleted file mode 100644 index 98c7a60..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/reprojection/reprojection-001-expected.html +++ /dev/null
@@ -1,35 +0,0 @@ -<!DOCTYPE html> -<!-- -Distributed under both the W3C Test Suite License [1] and the W3C -3-clause BSD License [2]. To contribute to a W3C Test Suite, see the -policies and contribution forms [3]. - -[1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license -[2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license -[3] http://www.w3.org/2004/10/27-testcases ---> -<html> -<head> -<meta charset="utf-8"> -<title>Shadow DOM Test: Basic reprojection (reference)</title> -<link rel="author" title="Anna Ogawa" href="mailto:anna.ogawa.0219@gmail.com"> -<link rel="author" title="Hayato Ito" href="mailto:hayato@google.com"> -<style> -.pass { color: green; } -</style> -</head> -<body> -<p>You should see green text saying "Apple" and "Orange" below.</p> -<div id="host"> - <div id="host2"> - <div>Hello a Shadow Root2.</div> - <div> - Hello a Shadow Root. - <div class="pass">Apple.</div> - <div class="pass">Orange.</div> - <div>Banana.</div> - </div> - </div> -</div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/shadow-root-001-expected.html b/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/shadow-root-001-expected.html deleted file mode 100644 index d80fccc..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/shadow-root-001-expected.html +++ /dev/null
@@ -1,25 +0,0 @@ -<!DOCTYPE html> -<!-- -Distributed under both the W3C Test Suite License [1] and the W3C -3-clause BSD License [2]. To contribute to a W3C Test Suite, see the -policies and contribution forms [3]. - -[1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license -[2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license -[3] http://www.w3.org/2004/10/27-testcases ---> -<html> -<head> -<title>Shadow DOM Test: Basic shadow root (reference)</title> -<link rel="author" title="Hayato Ito" href="mailto:hayato@google.com"> -<link rel="author" title="Yuta Kitamura" href="mailto:yutak@google.com"> -<style> -p { color: black; } -div { color: green; } -</style> -</head> -<body> -<p>You should see green text saying "PASS" below.</p> -<div>PASS</div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/shadow-root-002-expected.html b/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/shadow-root-002-expected.html deleted file mode 100644 index 77b472d7..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/shadow-root-002-expected.html +++ /dev/null
@@ -1,31 +0,0 @@ -<!DOCTYPE html> -<!-- -Distributed under both the W3C Test Suite License [1] and the W3C -3-clause BSD License [2]. To contribute to a W3C Test Suite, see the -policies and contribution forms [3]. - -[1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license -[2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license -[3] http://www.w3.org/2004/10/27-testcases ---> -<html> -<head> -<title>Shadow DOM Test: Basic distribution (reference)</title> -<link rel="author" title="Anna Ogawa" href="mailto:anna.ogawa.0219@gmail.com"> -<link rel="author" title="Yuta Kitamura" href="mailto:yutak@google.com"> -<style> -p { color: black; } -div { color: green; } -</style> -</head> -<body> -<p> -You should see four lines of green text "A", "B", "C" and "D" below, -in this order. -</p> -<div>A</div> -<div>B</div> -<div>C</div> -<div>D</div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/text-decoration-001-expected.html b/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/text-decoration-001-expected.html deleted file mode 100644 index 8c10d25..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/shadow-trees/text-decoration-001-expected.html +++ /dev/null
@@ -1,13 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <title>Shadow DOM Test</title> - <link rel="author" title="Masaya Iseki" href="mailto:iseki.m.aa@gmail.com"> - </head> - <body> - <span> - if NOT underlined, it is success. - </span> - </body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/styles/not-apply-in-shadow-root-001-expected.html b/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/styles/not-apply-in-shadow-root-001-expected.html deleted file mode 100644 index fdcc6e5..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/untriaged/styles/not-apply-in-shadow-root-001-expected.html +++ /dev/null
@@ -1,27 +0,0 @@ -<!DOCTYPE html> -<!-- -Distributed under both the W3C Test Suite License [1] and the W3C -3-clause BSD License [2]. To contribute to a W3C Test Suite, see the -policies and contribution forms [3]. - -[1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license -[2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license -[3] http://www.w3.org/2004/10/27-testcases ---> -<html> -<head> -<title>Shadow DOM Test</title> -<link rel="author" title="Kazuhito Hokamura" href="mailto:k.hokamura@gmail.com"> -<style> -div { - width: 100px; - height: 100px; - background: green; -} -</style> -</head> -<body> -<p>Test passes if following box is green.</p> -<div></div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-a-element-attr-change-expected.html b/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-a-element-attr-change-expected.html deleted file mode 100644 index 0c67c98..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-a-element-attr-change-expected.html +++ /dev/null
@@ -1,8 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>href - a element reference</title> -<body> - <svg width="100" height="100" viewBox="0 0 100 100"> - <rect width="100%" height="100%" fill="lime"/> - </svg> -</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-feImage-element-expected.html b/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-feImage-element-expected.html deleted file mode 100644 index cb3758df..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-feImage-element-expected.html +++ /dev/null
@@ -1,15 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>href - feImage element reference</title> -<body> - <svg width="300" height="300" viewBox="0 0 300 300" - xmlns:xlink="http://www.w3.org/1999/xlink"> - <filter id="Fitted" primitiveUnits="objectBoundingBox"> - <feImage xlink:href="/images/rgrg-256x256.png" - x="0" y="0" width="100%" height="100%" - preserveAspectRatio="none"/> - </filter> - <rect x="20" y="25" width="100" height="110" filter="url(#Fitted)"/> - <rect x="20" y="25" width="100" height="110" fill="none" stroke="green"/> - </svg> -</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-filter-element-expected.html b/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-filter-element-expected.html deleted file mode 100644 index 9b009e31..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-filter-element-expected.html +++ /dev/null
@@ -1,12 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>href - filter element reference</title> -<body> - <svg width="300" height="300" viewBox="0 0 300 300" - xmlns:xlink="http://www.w3.org/1999/xlink"> - <filter id="blurMe"> - <feGaussianBlur in="SourceGraphic" stdDeviation="5" /> - </filter> - <circle cx="60" cy="60" r="50" fill="green" filter="url(#blurMe)" /> - </svg> -</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-gradient-element-expected.html b/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-gradient-element-expected.html deleted file mode 100644 index 279be68..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-gradient-element-expected.html +++ /dev/null
@@ -1,21 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>href - gradient element reference</title> -<body> - <svg width="300" height="300" viewBox="0 0 300 300" - xmlns:xlink="http://www.w3.org/1999/xlink"> - <linearGradient id="MyGradient"> - <stop offset="5%" stop-color="green"/> - <stop offset="95%" stop-color="gold"/> - </linearGradient> - <rect fill="url(#MyGradient)" stroke="black" x="0" y="0" - width="100" height="100"/> - - <radialGradient id="MyRadialGradient"> - <stop offset="0%" stop-color="red"/> - <stop offset="100%" stop-color="blue"/> - </radialGradient> - <rect x="110" y="0" rx="15" ry="15" width="100" height="100" - fill="url(#MyRadialGradient)"/> - </svg> -</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-image-element-expected.html b/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-image-element-expected.html deleted file mode 100644 index c51906f..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-image-element-expected.html +++ /dev/null
@@ -1,9 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>href - image element reference</title> -<body> - <svg width="300" height="300" viewBox="0 0 300 300" - xmlns:xlink="http://www.w3.org/1999/xlink"> - <image xlink:href="/images/green.png" width="100px" height="100px"/> - </svg> -</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-pattern-element-expected.html b/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-pattern-element-expected.html deleted file mode 100644 index bd8770c9..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-pattern-element-expected.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>href - pattern element reference</title> -<body> - <svg width="300" height="300" viewBox="0 0 300 300" - xmlns:xlink="http://www.w3.org/1999/xlink"> - <pattern id="Pattern" x="0" y="0" width=".25" height=".25"> - <rect x="0" y="0" width="25" height="25" fill="skyblue"/> - <circle cx="25" cy="25" r="20" fill="green" fill-opacity="0.5"/> - </pattern> - <rect fill="url(#Pattern)" stroke="black" x="0" y="0" - width="200" height="200"/> - </svg> -</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-textPath-element-expected.html b/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-textPath-element-expected.html deleted file mode 100644 index 4e1fd353..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-textPath-element-expected.html +++ /dev/null
@@ -1,20 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>href - textPath element reference</title> -<body> - <svg width="100%" height="100%" viewBox="0 0 1000 300" - xmlns:xlink="http://www.w3.org/1999/xlink"> - <defs> - <path id="MyPath" - d="M 100 200 - C 200 100 300 0 400 100 - C 500 200 600 300 700 200 - C 800 100 900 100 900 100" /> - </defs> - <text font-family="Verdana" font-size="40"> - <textPath xlink:href="#MyPath"> - We go up, then we go down, then up again - </textPath> - </text> - </svg> -</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-use-element-expected.html b/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-use-element-expected.html deleted file mode 100644 index 93577b7..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/svg/linking/reftests/href-use-element-expected.html +++ /dev/null
@@ -1,12 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>href - use element reference</title> -<body> - <svg style="display: none"> - <rect id='refRect' style="fill: red" width="100" height="100" /> - </svg> - <svg width="300" height="300" viewBox="0 0 300 300" - xmlns:xlink="http://www.w3.org/1999/xlink"> - <use xlink:href="#refRect"/> - </svg> -</body>
diff --git a/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-insertion.html b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-insertion.html new file mode 100644 index 0000000..194c845b --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-insertion.html
@@ -0,0 +1,69 @@ +<!DOCTYPE html> +<script src="../../../resources/testharness.js"></script> +<script src="../../../resources/testharnessreport.js"></script> +<style> +body { + margin: 0; +} + +.scroller { + height: 100px; + width: 200px; + overflow: scroll; +} + +.padding { + width: 400px; + height: 500px; +} + +.sticky { + width: 25px; + height: 25px; + position: sticky; + top: 20px; + left: 50px; +} +</style> + +<div class="scroller" id="scroller"> + <div class="padding" id="padding"></div> +</div> + +<div class="scroller" id="scroller2"> + <div class="padding" id="padding2"></div> +</div> + +<script> +if (window.internals) { + internals.settings.setCSSStickyPositionEnabled(true); +} + +test(function() { + var scroller = document.getElementById('scroller'); + scroller.scrollTop = 100; + scroller.scrollLeft = 50; + + var sticky = document.createElement('div'); + sticky.className = 'sticky'; + scroller.insertBefore(sticky, document.getElementById('padding')); + + assert_equals(sticky.offsetTop, scroller.scrollTop + 20); + assert_equals(sticky.offsetLeft, scroller.scrollLeft + 50); +}, "offsetTop/offsetLeft should be correct for sticky after insertion"); + +test(function() { + var scroller = document.getElementById('scroller2'); + scroller.scrollTop = 100; + scroller.scrollLeft = 50; + + var sticky = document.createElement('div'); + sticky.className = 'sticky'; + scroller.insertBefore(sticky, document.getElementById('padding2')); + + assert_equals(sticky.getBoundingClientRect().top, 120); + assert_equals(sticky.getBoundingClientRect().left, 50); +}, "getBoundingClientRect should be correct for sticky after insertion"); + + +</script>
diff --git a/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-layout.html b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-layout.html new file mode 100644 index 0000000..bac326d --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-valid-after-layout.html
@@ -0,0 +1,58 @@ +<!DOCTYPE html> +<script src="../../../resources/testharness.js"></script> +<script src="../../../resources/testharnessreport.js"></script> +<style> +body { + margin: 0; +} + +#scroller { + height: 100px; + width: 200px; + overflow: scroll; +} + +.padding { + width: 400px; + height: 500px; +} + +#sticky { + width: 25px; + height: 25px; + position: sticky; + top: 20px; + left: 50px; +} +</style> + +<div id="scroller"> + <div id="sticky"></div> + <div class="padding"></div> +</div> + +<script> +if (window.internals) { + internals.settings.setCSSStickyPositionEnabled(true); +} + +test(function() { + var scroller = document.getElementById('scroller'); + var sticky = document.getElementById('sticky'); + scroller.scrollTop = 100; + scroller.scrollLeft = 50; + scroller.append(document.createElement('div')); + assert_equals(sticky.getBoundingClientRect().top, 20); + assert_equals(sticky.getBoundingClientRect().left, 50); +}, "getBoundingClientRect should be correct for sticky after script-caused layout"); + +test(function() { + var scroller = document.getElementById('scroller'); + var sticky = document.getElementById('sticky'); + scroller.scrollTop = 100; + scroller.scrollLeft = 50; + scroller.append(document.createElement('div')); + assert_equals(sticky.offsetTop, 120); + assert_equals(sticky.offsetLeft, 100); +}, "offsetTop/offsetLeft should be correct for sticky after script-caused layout"); +</script>
diff --git a/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html new file mode 100644 index 0000000..d06245c9 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-position-works-with-scroll-apis.html
@@ -0,0 +1,126 @@ +<!DOCTYPE html> +<script src="../../../resources/testharness.js"></script> +<script src="../../../resources/testharnessreport.js"></script> +<style> +body { + margin: 0; +} + +#scroller { + height: 100px; + width: 200px; + overflow-y: scroll; +} + +.paddingBefore { + height: 150px; +} + +#sticky { + height: 50px; + position: sticky; + top: 20px; +} + +.paddingAfter { + height: 500px; +} +</style> + +<div id="scroller"> + <div class="paddingBefore"></div> + <div id="writer"></div> + <div id="sticky"></div> + <div class="paddingAfter"></div> +</div> + +<script> +if (window.internals) { + internals.settings.setCSSStickyPositionEnabled(true); +} + +// These tests currently mimic the behavior of Firefox for the interaction +// between scrollIntoView() and position:sticky, where the offset location of +// the sticky element is used to determine how far to scroll. This means that +// scrollIntoView() may scroll even when the sticky is already 'in view', and +// attempts to scroll so that the offset position of the sticky is at the top +// of the screen. +// +// TODO(smcgruer): Update tests once http://crbug.com/664246 is resolved. + +test(function() { + var scroller = document.getElementById('scroller'); + var sticky = document.getElementById('sticky'); + var writer = document.getElementById('writer'); + + // Clean the writer. + writer.innerHTML = ''; + + // With no scroll, the sticky element is outside the scroller viewport. + scroller.scrollTop = 0; + + // Deliberately dirty layout to make sure that scrollIntoView() still works. + writer.innerHTML = '<div style="height: 50px;"></div>'; + + sticky.scrollIntoView(); + assert_equals(scroller.scrollTop, 200); +}, "scrollIntoView should scroll when sticky is not visible"); + +test(function() { + var scroller = document.getElementById('scroller'); + var sticky = document.getElementById('sticky'); + var writer = document.getElementById('writer'); + + // Clean the writer. + writer.innerHTML = ''; + + // Scroll so that the sticky element is past the top of the scroller + // viewport, and is thus sticking. + scroller.scrollTop = 200; + + // Deliberately dirty layout to make sure that scrollIntoView() still works. + writer.innerHTML = '<div style="height: 10px;"></div>'; + + // See comment above tests for why this shifts by an additional 20 pixels. + sticky.scrollIntoView(); + assert_equals(scroller.scrollTop, 230); +}, "scrollIntoView should scroll when sticky is already in view"); + +test(function() { + var scroller = document.getElementById('scroller'); + var sticky = document.getElementById('sticky'); + var writer = document.getElementById('writer'); + + // Clean the writer. + writer.innerHTML = ''; + + // With no scroll, the sticky element is outside the scroller viewport. + scroller.scrollTop = 0; + + // Deliberately dirty layout to make sure that scrollIntoViewIfNeeded() + // still works. + writer.innerHTML = '<div style="height: 70px;"></div>'; + + sticky.scrollIntoViewIfNeeded(); + assert_equals(scroller.scrollTop, 195); +}, "scrollIntoViewIfNeeded should scroll when sticky is not visible"); + +test(function() { + var scroller = document.getElementById('scroller'); + var sticky = document.getElementById('sticky'); + var writer = document.getElementById('writer'); + + // Clean the writer. + writer.innerHTML = ''; + + // Scroll so that the sticky element is at the top of the scroller viewport. + scroller.scrollTop = 150; + + // Deliberately dirty layout to make sure that scrollIntoViewIfNeeded() + // still works. + writer.innerHTML = '<div style="height: 20px;"></div>'; + + sticky.scrollIntoViewIfNeeded(); + assert_equals(scroller.scrollTop, 170); +}, "scrollIntoViewIfNeeded should not scroll when sticky is already in view"); +</script>
diff --git a/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt index 2006771..230545e 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt
@@ -1,4 +1,4 @@ -createDocument tests modeled after createElementNS tests from mozilla which were attached to webkit bug 16833 +createDocument tests modelled after createElementNS tests from mozilla which were attached to webkit bug 16833 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
diff --git a/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err-expected.txt index adb9077e..f824c9f 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err-expected.txt
@@ -1,4 +1,4 @@ -createDocument tests modeled after mozilla's testing +createDocument tests modelled after mozilla's testing On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
diff --git a/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js b/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js index b0291b2..59bb5b70 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js +++ b/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js
@@ -1,4 +1,4 @@ -description("createDocument tests modeled after createElementNS tests from mozilla which were attached to webkit bug 16833"); +description("createDocument tests modelled after createElementNS tests from mozilla which were attached to webkit bug 16833"); // document.implementation.createDocument() should throw the same set of errors // as document.createElementNS()
diff --git a/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocumentType-err.js b/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocumentType-err.js index fe98077a..72643836 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocumentType-err.js +++ b/third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocumentType-err.js
@@ -1,4 +1,4 @@ -description("createDocument tests modeled after mozilla's testing"); +description("createDocument tests modelled after mozilla's testing"); function ExpectedNotEnoughArgumentsMessage(num) { return "\"TypeError: Failed to execute 'createDocumentType' on 'DOMImplementation': 3 arguments required, but only " + num + " present.\"";
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Element/script-tests/getAttribute-check-case-sensitivity.js b/third_party/WebKit/LayoutTests/fast/dom/Element/script-tests/getAttribute-check-case-sensitivity.js index 3b73ac2..a02a1bd 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Element/script-tests/getAttribute-check-case-sensitivity.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Element/script-tests/getAttribute-check-case-sensitivity.js
@@ -66,7 +66,7 @@ function testAttribNodeNamePreservesCaseGetNode() { - // getAttributeNode doesnt work on DIVs, use body element + // getAttributeNode doesn't work on DIVs, use body element var body = document.body; var a = body.ownerDocument.createAttribute("A"); @@ -86,7 +86,7 @@ function testAttribNodeNamePreservesCaseGetNode2() { - // getAttributeNode doesnt work on DIVs, use body element + // getAttributeNode doesn't work on DIVs, use body element var body = document.body; var a = body.ownerDocument.createAttribute("B"); @@ -113,7 +113,7 @@ function testAttribNodeNameGetMutate() { - // getAttributeNode doesnt work on DIVs, use body element. + // getAttributeNode doesn't work on DIVs, use body element. var body = document.body; var a = body.ownerDocument.createAttribute("c");
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Node/initial-values-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/Node/initial-values-expected.txt index f21d4386..1285cd7b 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Node/initial-values-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/dom/Node/initial-values-expected.txt
@@ -1,4 +1,4 @@ -Test creation of each type of Node and check intial values +Test creation of each type of Node and check initial values On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Node/script-tests/initial-values.js b/third_party/WebKit/LayoutTests/fast/dom/Node/script-tests/initial-values.js index d634ebf..39d650f 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Node/script-tests/initial-values.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Node/script-tests/initial-values.js
@@ -1,4 +1,4 @@ -description("Test creation of each type of Node and check intial values") +description("Test creation of each type of Node and check initial values") var xmlDoc = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html", null);
diff --git a/third_party/WebKit/LayoutTests/fast/dom/NodeIterator/NodeIterator-attr.html b/third_party/WebKit/LayoutTests/fast/dom/NodeIterator/NodeIterator-attr.html index a37b8926..aceefc9 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/NodeIterator/NodeIterator-attr.html +++ b/third_party/WebKit/LayoutTests/fast/dom/NodeIterator/NodeIterator-attr.html
@@ -24,7 +24,7 @@ var otherDocument = document.implementation.createDocument('', null); var div2 = document.createElement("div"); otherDocument.appendChild(div2); -}, "NodeIterator targetting detached attr node shouldn't crash."); +}, "NodeIterator targeting detached attr node shouldn't crash."); </script> </body>
diff --git a/third_party/WebKit/LayoutTests/fast/dom/collection-null-like-arguments.html b/third_party/WebKit/LayoutTests/fast/dom/collection-null-like-arguments.html index 055f60af..4dd8ddd 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/collection-null-like-arguments.html +++ b/third_party/WebKit/LayoutTests/fast/dom/collection-null-like-arguments.html
@@ -20,7 +20,7 @@ if (typeof value == "string") return '"' + value + '"'; - return "unkown description"; + return "unknown description"; } window.onload = function onload()
diff --git a/third_party/WebKit/LayoutTests/fast/dom/comment-document-fragment-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/comment-document-fragment-expected.txt index d25f1a8..ff43ca4 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/comment-document-fragment-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/dom/comment-document-fragment-expected.txt
@@ -1 +1 @@ -SUCESS +SUCCESS
diff --git a/third_party/WebKit/LayoutTests/fast/dom/comment-document-fragment.html b/third_party/WebKit/LayoutTests/fast/dom/comment-document-fragment.html index 204b71b..5c15f89 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/comment-document-fragment.html +++ b/third_party/WebKit/LayoutTests/fast/dom/comment-document-fragment.html
@@ -1,10 +1,10 @@ <!-- this comment should show up as the first child of the HTML element in the DOM. - the document should also say "SUCESS", - if you don't see SUCESS then the DOM was + the document should also say "SUCCESS", + if you don't see SUCCESS then the DOM was not built correctly because of this comment --> <script> if (window.testRunner) testRunner.dumpAsText(); </script> -SUCESS +SUCCESS
diff --git a/third_party/WebKit/LayoutTests/fast/dom/createDocument-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/createDocument-expected.txt index 33d71e86..ce753651 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/createDocument-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/dom/createDocument-expected.txt
@@ -1,2 +1,2 @@ -This tests that a document created by createDocument has a document element, and that the document element has the correct name and namespace URI. If the test is successfull, 'SUCCESS' will be displayed below, otherwise 'FAILURE' and a reason will be displayed. +This tests that a document created by createDocument has a document element, and that the document element has the correct name and namespace URI. If the test is successful, 'SUCCESS' will be displayed below, otherwise 'FAILURE' and a reason will be displayed. SUCCESS!
diff --git a/third_party/WebKit/LayoutTests/fast/dom/createDocument.html b/third_party/WebKit/LayoutTests/fast/dom/createDocument.html index fc03741..0b7572d 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/createDocument.html +++ b/third_party/WebKit/LayoutTests/fast/dom/createDocument.html
@@ -34,7 +34,7 @@ </script> </head> <body onload="runTests();"> -This tests that a document created by createDocument has a document element, and that the document element has the correct name and namespace URI. If the test is successfull, 'SUCCESS' will be displayed below, otherwise 'FAILURE' and a reason will be displayed. +This tests that a document created by createDocument has a document element, and that the document element has the correct name and namespace URI. If the test is successful, 'SUCCESS' will be displayed below, otherwise 'FAILURE' and a reason will be displayed. <pre id="console"> </pre> </body>
diff --git a/third_party/WebKit/LayoutTests/fast/dom/remove-svg-font-face-element-crash.xhtml b/third_party/WebKit/LayoutTests/fast/dom/remove-svg-font-face-element-crash.xhtml index 6527d5d..983203c3 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/remove-svg-font-face-element-crash.xhtml +++ b/third_party/WebKit/LayoutTests/fast/dom/remove-svg-font-face-element-crash.xhtml
@@ -3,8 +3,8 @@ <svg version="1.1" xlink="http://www.w3.org/1999/xlink" width="100%" xmlns="http://www.w3.org/2000/svg"> <g> <defs> - <font horiz-adv-x="224" id="embeded"> - <font-face font-family="embeded" id="fontWillBeRemoved"></font-face> + <font horiz-adv-x="224" id="embedded"> + <font-face font-family="embedded" id="fontWillBeRemoved"></font-face> <glyph horiz-adv-x="1500" unicode="1"></glyph> <glyph horiz-adv-x="1500" unicode="2"></glyph> <glyph horiz-adv-x="1500" unicode="3"></glyph> @@ -14,7 +14,7 @@ </defs> <g> <use id="use"></use> - <text font-family="embeded" id="text">fi1234</text> + <text font-family="embedded" id="text">fi1234</text> </g> </g> </svg>
diff --git a/third_party/WebKit/LayoutTests/fast/dom/resources/geometry-interfaces-test-helpers.js b/third_party/WebKit/LayoutTests/fast/dom/resources/geometry-interfaces-test-helpers.js index 440a074..1104c43b 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/resources/geometry-interfaces-test-helpers.js +++ b/third_party/WebKit/LayoutTests/fast/dom/resources/geometry-interfaces-test-helpers.js
@@ -18,7 +18,7 @@ function toArray(actual) { var array = actual.toFloat64Array(); - // Do not care negative zero for testing accomodation. + // Do not care negative zero for testing accommodation. for (var i = 0; i < array.length; i++) { if (array[i] === -0) array[i] = 0;
diff --git a/third_party/WebKit/LayoutTests/fast/dom/script-tests/domListEnumeration.js b/third_party/WebKit/LayoutTests/fast/dom/script-tests/domListEnumeration.js index 05eb0323..d874737 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/script-tests/domListEnumeration.js +++ b/third_party/WebKit/LayoutTests/fast/dom/script-tests/domListEnumeration.js
@@ -25,9 +25,9 @@ var head = document.getElementsByTagName('head')[0]; // 2 additional <style>s needed for StyleSheetList test (one is included in the template). - // 3 rules needed in the first addtional <style> for the CSSRuleList test. + // 3 rules needed in the first additional <style> for the CSSRuleList test. // 3 declarations needed in the first rule needed for the CSSStyleDeclaration test. - // @media rule in the second addtional <style> for the MediaList test. + // @media rule in the second additional <style> for the MediaList test. head.appendChild(createFromMarkup("<style> ol { width: 100px; height: 100px; color: green; } ol { } ol { } </style>")); head.appendChild(createFromMarkup("<style> @media screen, projector, printer { ol { } } </style>"));
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/activeelement-should-be-shadowhost.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/activeelement-should-be-shadowhost.html index 9caa619..0ccaf23 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/shadow/activeelement-should-be-shadowhost.html +++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/activeelement-should-be-shadowhost.html
@@ -75,7 +75,7 @@ var doc3 = iframe3.contentDocument; var input3 = doc3.body.appendChild(doc3.createElement('input')) - // Althought this subtree (iframe4) doesn't contain any explicit shadow hosts, + // Although this subtree (iframe4) doesn't contain any explicit shadow hosts, // this might be useful as a reference. var iframe4 = doc0.body.appendChild(doc0.createElement('iframe')); var doc4 = iframe4.contentDocument;
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/create-content-element-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/shadow/create-content-element-expected.txt index 7c5d436..990e9ab 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/shadow/create-content-element-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/create-content-element-expected.txt
@@ -1,3 +1,3 @@ -This test compares a shadow-based render tree with one for a refrence DOM tree. +This test compares a shadow-based render tree with one for a reference DOM tree. PASS
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/create-content-element.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/create-content-element.html index adf9ee9..b2f6f730 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/shadow/create-content-element.html +++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/create-content-element.html
@@ -40,7 +40,7 @@ function test() { testRunner.dumpAsText(); - log("This test compares a shadow-based render tree with one for a refrence DOM tree."); + log("This test compares a shadow-based render tree with one for a reference DOM tree."); setupTargetTree(); var targetContainerLayoutTree = window.internals.elementLayoutTreeAsText(document.getElementById("targetContainer")); var targetLayoutTree = removeContainerLines(targetContainerLayoutTree);
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/drag-and-drop-in-shadow-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/shadow/drag-and-drop-in-shadow-expected.txt index 7958a58f..d721472 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/shadow/drag-and-drop-in-shadow-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/drag-and-drop-in-shadow-expected.txt
@@ -3,7 +3,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". -dragstart event occured twice. +dragstart event occurred twice. PASS successfullyParsed is true TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/drag-and-drop-in-shadow.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/drag-and-drop-in-shadow.html index 3da7913..5c19d14 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/shadow/drag-and-drop-in-shadow.html +++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/drag-and-drop-in-shadow.html
@@ -21,7 +21,7 @@ host.addEventListener('dragstart', function(e) { dragstartCount++; if (dragstartCount == 2) { - debug("dragstart event occured twice."); + debug("dragstart event occurred twice."); if (window.testRunner) { testRunner.notifyDone(); }
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-and-list-elements-expected.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-and-list-elements-expected.html index 93ebf9ae..28291b1 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-and-list-elements-expected.html +++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-and-list-elements-expected.html
@@ -9,7 +9,7 @@ </ol> </div> <script> -// We cannot use hostEquivalent.innerHTML instead of appendChild()s becuase +// We cannot use hostEquivalent.innerHTML instead of appendChild()s because // the parser prevents to create expected tree: // // <ol>
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-boundary-events.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-boundary-events.html index 11614ee..2725eeaa 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-boundary-events.html +++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-boundary-events.html
@@ -189,7 +189,7 @@ // Omitted test cases where either a oldFocusedNode or newFocusedNode is an ancestor of the other. // Due to a focus transfer mechanism on shadow hosts, a focused node should be a leaf node in general. - // Test for focus/blur events. Event listners should be registerd on captureing phase. + // Test for focus/blur events. Event listeners should be registerd on captureing phase. moveFocus('divB', 'divC', 'Move focus from a node to its sibling node. All nodes are outside of shadow boundary.'); shouldBe('dispatchedEvent("focus")', '["divC(<-divB)(@divA)(capturing phase)", "divC(<-divB)(@divC)"]');
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js index 14fdc85..e860260 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
@@ -1,7 +1,8 @@ if (window.GCController) GCController.collectAll(); -var initialize_InspectorTest = function() { +var initialize_InspectorTest = function() { +Protocol.InspectorBackend.Options.suppressRequestErrors = true; var results = []; function consoleOutputHook(messageType) @@ -1159,7 +1160,7 @@ testRunner.evaluateInWebInspector(initializeCallId, toEvaluate); if (window.debugTest) - test = "function() { window.test = " + test.toString() + "; InspectorTest.addResult = window._originalConsoleLog; InspectorTest.completeTest = function() {}; }"; + test = "function() { Protocol.InspectorBackend.Options.suppressRequestErrors = false; window.test = " + test.toString() + "; InspectorTest.addResult = window._originalConsoleLog; InspectorTest.completeTest = function() {}; }"; toEvaluate = "(" + runTestInFrontend + ")(" + test + ");"; testRunner.evaluateInWebInspector(runTestCallId, toEvaluate);
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-get-client-types.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-get-client-types.html index 75f54ebe..c0d0b20 100644 --- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-get-client-types.html +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-get-client-types.html
@@ -64,6 +64,6 @@ var expected = [ /* visibilityState, focused, url, frameType */ ['visible', true, normalizeURL(scope) + '-frame.html', 'nested'], - [,,normalizeURL(scope) + '-shared-worker.js', 'none'] + [undefined, undefined, normalizeURL(scope) + '-shared-worker.js', 'none'] ]; </script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html index fa3b56f2..a11a3cc 100644 --- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html
@@ -16,11 +16,11 @@ ['visible', true, new URL(iframe_url, location).href, 'nested'] ]; var expected_with_shared_worker = [ - [,,new URL(shared_worker_url, location).href, 'none'] + [undefined, undefined, new URL(shared_worker_url, location).href, 'none'] ]; var expected_with_all = [ ['visible', true, new URL(iframe_url, location).href, 'nested'], - [,,new URL(shared_worker_url, location).href, 'none'] + [undefined, undefined, new URL(shared_worker_url, location).href, 'none'] ]; function test_matchall(frame, expected, query_options) { @@ -28,15 +28,14 @@ frame.focus(); return new Promise(function(resolve, reject) { var channel = new MessageChannel(); - channel.port1.onmessage = function(e) { - assert_equals(e.data.length, expected.length); - for (var i = 0; i < e.data.length; i++) - assert_array_equals(e.data[i], expected[i]); - resolve(); - }; + channel.port1.onmessage = function(e) { resolve(e.data); }; frame.contentWindow.navigator.serviceWorker.controller.postMessage( {port:channel.port2, options:query_options}, [channel.port2]); + }).then(function(data) { + assert_equals(data.length, expected.length); + for (var i = 0; i < data.length; i++) + assert_array_equals(data[i], expected[i]); }); }
diff --git a/third_party/WebKit/LayoutTests/inspector/inspector-backend-commands.html b/third_party/WebKit/LayoutTests/inspector/inspector-backend-commands.html index 0ee46a2..4ca9cd3 100644 --- a/third_party/WebKit/LayoutTests/inspector/inspector-backend-commands.html +++ b/third_party/WebKit/LayoutTests/inspector/inspector-backend-commands.html
@@ -5,6 +5,7 @@ <script> function test() { + Protocol.InspectorBackend.Options.suppressRequestErrors = false; function dumpArgument(name, value) { InspectorTest.addResult(name + " result: " + (typeof value === "string" ? value : JSON.stringify(value)));
diff --git a/third_party/WebKit/LayoutTests/inspector/screen-orientation-override.html b/third_party/WebKit/LayoutTests/inspector/screen-orientation-override.html index 38dd548f..84c5d3e 100644 --- a/third_party/WebKit/LayoutTests/inspector/screen-orientation-override.html +++ b/third_party/WebKit/LayoutTests/inspector/screen-orientation-override.html
@@ -28,6 +28,7 @@ function test() { + Protocol.InspectorBackend.Options.suppressRequestErrors = false; function addDumpResult(next) { InspectorTest.evaluateInPage("dump()", dumpCallback);
diff --git a/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe-expected.txt b/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe-expected.txt index 6846a2e..62441d58 100644 --- a/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe-expected.txt +++ b/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe-expected.txt
@@ -5,7 +5,7 @@ PASS nonFastScrollableRects.length is 1 -PASS rectToString(nonFastScrollableRects[0]) is "[150, 150, 240, 240]" +PASS rectToString(nonFastScrollableRects[0]) is "[146, 146, 240, 240]" PASS successfullyParsed is true TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html b/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html index 3db9d602..1c03740 100644 --- a/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html +++ b/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html
@@ -4,16 +4,36 @@ position: absolute; left: 200px; top: 200px; - height: 120px; - width: 120px; + height: 200px; + width: 200px; padding: 10px; border: none; transform: scale(2); } + .spacer { + height: 2000px; + } </style> -<iframe src="data:text/html;charset=utf-8,<html><body style='width:1000px; height:1000px;'><p style='font-size: 6px'>Should be covered by a green overlay.</p></body></html>"></iframe> +<iframe srcdoc=" + <!DOCTYPE html> + <style> + iframe { + height: 120px; + width:120px; + padding:10px; + border:none; + } + </style> + <iframe srcdoc=" + <!DOCTYPE html> + <body style='width:1000px; height:1000px;'> + <p style='font-size: 6px'>Should be covered by a green overlay.</p> + </body>"> + </iframe>"></iframe> + <div id="console"></div> +<div class="spacer"></div> <script src="../resources/js-test.js"></script> <script src="../resources/run-after-layout-and-paint.js"></script> @@ -27,7 +47,7 @@ runAfterLayoutAndPaint(function(){ nonFastScrollableRects = window.internals.nonFastScrollableRects(document); shouldBe('nonFastScrollableRects.length', '1'); - shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[150, 150, 240, 240]'); + shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[146, 146, 240, 240]'); drawNonFastScrollableRegionOverlays();
diff --git a/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data.html b/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data.html index 03836c454..c7aee32d 100644 --- a/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data.html +++ b/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data.html
@@ -31,7 +31,7 @@ // FFT doesn't get that small. This allows us to test that (a changed) minDecibels has an // effect and that we properly clip the byte data. minDecibels: -50, - floatRelError: 6.8964e-7, + floatRelError: 9.6549e-7, }, { order: 6, floatRelError: 6.8366e-6
diff --git a/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp index c15db7d..26f2361 100644 --- a/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp +++ b/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp
@@ -87,6 +87,12 @@ if (!inheritedValue) { inheritedValue = m_initialValue.get(); } + if (inheritedValue == m_inheritedValue.get()) { + return true; + } + if (!inheritedValue || !m_inheritedValue) { + return false; + } return m_inheritedValue->equals(*inheritedValue); } @@ -207,20 +213,23 @@ return nullptr; } + const CSSValue* value = nullptr; if (declaration.isInitial(isInheritedProperty)) { - return maybeConvertValue(*registration->initial(), state, - conversionCheckers); + value = registration->initial(); + } else { + value = + state.parentStyle()->getRegisteredVariable(name, isInheritedProperty); + if (!value) { + value = registration->initial(); + } + conversionCheckers.push_back(InheritedCustomPropertyChecker::create( + name, isInheritedProperty, value, registration->initial())); + } + if (!value) { + return nullptr; } - DCHECK(declaration.isInherit(isInheritedProperty)); - const CSSValue* inheritedValue = - state.parentStyle()->getRegisteredVariable(name, isInheritedProperty); - if (!inheritedValue) { - inheritedValue = registration->initial(); - } - conversionCheckers.push_back(InheritedCustomPropertyChecker::create( - name, isInheritedProperty, inheritedValue, registration->initial())); - return maybeConvertValue(*inheritedValue, state, conversionCheckers); + return maybeConvertValue(*value, state, conversionCheckers); } if (declaration.value()->needsVariableResolution()) { @@ -263,6 +272,9 @@ if (!underlyingValue) { underlyingValue = registration->initial(); } + if (!underlyingValue) { + return nullptr; + } // TODO(alancutter): Remove the need for passing in conversion checkers. ConversionCheckers dummyConversionCheckers; return maybeConvertValue(*underlyingValue, environment.state(),
diff --git a/third_party/WebKit/Source/core/animation/CSSScaleInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSScaleInterpolationType.cpp index ca4ee41f..04812904 100644 --- a/third_party/WebKit/Source/core/animation/CSSScaleInterpolationType.cpp +++ b/third_party/WebKit/Source/core/animation/CSSScaleInterpolationType.cpp
@@ -15,24 +15,30 @@ namespace { struct Scale { - Scale(double x, double y, double z) { init(x, y, z); } + Scale(double x, double y, double z) { init(x, y, z, false); } + explicit Scale() { init(1, 1, 1, true); } explicit Scale(const ScaleTransformOperation* scale) { if (scale) - init(scale->x(), scale->y(), scale->z()); + init(scale->x(), scale->y(), scale->z(), false); else - init(1, 1, 1); + init(1, 1, 1, true); } explicit Scale(const InterpolableValue& value) { const InterpolableList& list = toInterpolableList(value); + if (list.length() == 0) { + init(1, 1, 1, true); + return; + } init(toInterpolableNumber(*list.get(0)).value(), toInterpolableNumber(*list.get(1)).value(), - toInterpolableNumber(*list.get(2)).value()); + toInterpolableNumber(*list.get(2)).value(), false); } - void init(double x, double y, double z) { + void init(double x, double y, double z, bool isValueNone) { array[0] = x; array[1] = y; array[2] = z; + isNone = isValueNone; } InterpolationValue createInterpolationValue() const; @@ -42,12 +48,20 @@ if (array[i] != other.array[i]) return false; } - return true; + return isNone == other.isNone; } double array[3]; + bool isNone; }; +std::unique_ptr<InterpolableValue> createIdentityInterpolableValue() { + std::unique_ptr<InterpolableList> list = InterpolableList::create(3); + for (size_t i = 0; i < 3; i++) + list->set(i, InterpolableNumber::create(1)); + return std::move(list); +} + class InheritedScaleChecker : public InterpolationType::ConversionChecker { public: static std::unique_ptr<InheritedScaleChecker> create(const Scale& scale) { @@ -116,6 +130,11 @@ DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(CSSScaleNonInterpolableValue); InterpolationValue Scale::createInterpolationValue() const { + if (isNone) { + return InterpolationValue(InterpolableList::create(0), + CSSScaleNonInterpolableValue::create(*this)); + } + std::unique_ptr<InterpolableList> list = InterpolableList::create(3); for (size_t i = 0; i < 3; i++) list->set(i, InterpolableNumber::create(array[i])); @@ -132,7 +151,7 @@ InterpolationValue CSSScaleInterpolationType::maybeConvertInitial( const StyleResolverState&, ConversionCheckers&) const { - return Scale(1, 1, 1).createInterpolationValue(); + return Scale().createInterpolationValue(); } InterpolationValue CSSScaleInterpolationType::maybeConvertInherit( @@ -147,18 +166,15 @@ const CSSValue& value, const StyleResolverState&, ConversionCheckers&) const { - Scale scale(1, 1, 1); if (!value.isBaseValueList()) - return nullptr; + return Scale().createInterpolationValue(); const CSSValueList& list = toCSSValueList(value); - if (list.length() < 1 || list.length() > 3) - return nullptr; + DCHECK(list.length() >= 1 && list.length() <= 3); + Scale scale(1, 1, 1); for (size_t i = 0; i < list.length(); i++) { const CSSValue& item = list.item(i); - if (!item.isPrimitiveValue() || !toCSSPrimitiveValue(item).isNumber()) - return nullptr; scale.array[i] = toCSSPrimitiveValue(item).getDoubleValue(); } @@ -173,6 +189,14 @@ PairwiseInterpolationValue CSSScaleInterpolationType::maybeMergeSingles( InterpolationValue&& start, InterpolationValue&& end) const { + size_t startListLength = + toInterpolableList(*start.interpolableValue).length(); + size_t endListLength = toInterpolableList(*end.interpolableValue).length(); + if (startListLength < endListLength) + start.interpolableValue = createIdentityInterpolableValue(); + else if (endListLength < startListLength) + end.interpolableValue = createIdentityInterpolableValue(); + return PairwiseInterpolationValue( std::move(start.interpolableValue), std::move(end.interpolableValue), CSSScaleNonInterpolableValue::merge( @@ -191,6 +215,12 @@ double underlyingFraction, const InterpolationValue& value, double interpolationFraction) const { + if (toInterpolableList(*underlyingValueOwner.mutableValue().interpolableValue) + .length() == 0) { + underlyingValueOwner.mutableValue().interpolableValue = + createIdentityInterpolableValue(); + } + const CSSScaleNonInterpolableValue& metadata = toCSSScaleNonInterpolableValue(*value.nonInterpolableValue); DCHECK(metadata.isStartAdditive() || metadata.isEndAdditive()); @@ -200,6 +230,7 @@ for (size_t i = 0; i < 3; i++) { InterpolableNumber& underlying = toInterpolableNumber(*underlyingList.getMutable(i)); + double start = metadata.start().array[i] * (metadata.isStartAdditive() ? underlying.value() : 1); double end = metadata.end().array[i] * @@ -213,6 +244,10 @@ const NonInterpolableValue*, StyleResolverState& state) const { Scale scale(interpolableValue); + if (scale.isNone) { + state.style()->setScale(nullptr); + return; + } state.style()->setScale(ScaleTransformOperation::create( scale.array[0], scale.array[1], scale.array[2], TransformOperation::Scale3D));
diff --git a/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp b/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp index 868d4fa..3c853cc 100644 --- a/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp +++ b/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp
@@ -303,7 +303,8 @@ double zoom, PassRefPtr<TransformOperation> initialTransform) { TransformOperations operation; - operation.operations().push_back(transform ? transform : initialTransform); + if (transform || initialTransform) + operation.operations().push_back(transform ? transform : initialTransform); return AnimatableTransform::create(operation, transform ? zoom : 1); } @@ -624,11 +625,8 @@ style.rotate(), style.effectiveZoom(), initialRotate); } case CSSPropertyScale: { - DEFINE_STATIC_REF(ScaleTransformOperation, initialScale, - ScaleTransformOperation::create( - 1, 1, 1, TransformOperation::Scale3D)); return createFromTransformProperties(style.scale(), style.effectiveZoom(), - initialScale); + nullptr); } case CSSPropertyOffsetAnchor: return createFromLengthPoint(style.offsetAnchor(), style);
diff --git a/third_party/WebKit/Source/core/clipboard/DataObject.cpp b/third_party/WebKit/Source/core/clipboard/DataObject.cpp index 5a5882a7..87c4687c 100644 --- a/third_party/WebKit/Source/core/clipboard/DataObject.cpp +++ b/third_party/WebKit/Source/core/clipboard/DataObject.cpp
@@ -210,7 +210,7 @@ Vector<String> results; for (size_t i = 0; i < m_itemList.size(); ++i) { if (m_itemList[i]->isFilename()) - results.push_back(toFile(m_itemList[i]->getAsFile())->path()); + results.push_back(m_itemList[i]->getAsFile()->path()); } return results; }
diff --git a/third_party/WebKit/Source/core/clipboard/DataObjectItem.cpp b/third_party/WebKit/Source/core/clipboard/DataObjectItem.cpp index 314dc57..1b1acde 100644 --- a/third_party/WebKit/Source/core/clipboard/DataObjectItem.cpp +++ b/third_party/WebKit/Source/core/clipboard/DataObjectItem.cpp
@@ -106,7 +106,7 @@ m_type(type), m_sequenceNumber(sequenceNumber) {} -Blob* DataObjectItem::getAsFile() const { +File* DataObjectItem::getAsFile() const { if (kind() != FileKind) return nullptr; @@ -126,7 +126,8 @@ WebClipboard::BufferStandard); if (blobInfo.size() < 0) return nullptr; - return Blob::create(BlobDataHandle::create(blobInfo.uuid(), blobInfo.type(), + return File::create("image.png", currentTimeMS(), + BlobDataHandle::create(blobInfo.uuid(), blobInfo.type(), blobInfo.size())); }
diff --git a/third_party/WebKit/Source/core/clipboard/DataObjectItem.h b/third_party/WebKit/Source/core/clipboard/DataObjectItem.h index 123eb78..350aa61 100644 --- a/third_party/WebKit/Source/core/clipboard/DataObjectItem.h +++ b/third_party/WebKit/Source/core/clipboard/DataObjectItem.h
@@ -40,8 +40,6 @@ namespace blink { -class Blob; - class CORE_EXPORT DataObjectItem : public GarbageCollectedFinalized<DataObjectItem> { public: @@ -66,7 +64,7 @@ ItemKind kind() const { return m_kind; } String type() const { return m_type; } String getAsString() const; - Blob* getAsFile() const; + File* getAsFile() const; // Used to support legacy DataTransfer APIs and renderer->browser // serialization.
diff --git a/third_party/WebKit/Source/core/clipboard/DataTransferItem.cpp b/third_party/WebKit/Source/core/clipboard/DataTransferItem.cpp index 87b91de..910c50a9a 100644 --- a/third_party/WebKit/Source/core/clipboard/DataTransferItem.cpp +++ b/third_party/WebKit/Source/core/clipboard/DataTransferItem.cpp
@@ -83,7 +83,7 @@ "DataTransferItem.getAsString"); } -Blob* DataTransferItem::getAsFile() const { +File* DataTransferItem::getAsFile() const { if (!m_dataTransfer->canReadData()) return nullptr;
diff --git a/third_party/WebKit/Source/core/clipboard/DataTransferItem.h b/third_party/WebKit/Source/core/clipboard/DataTransferItem.h index 4fcffa02..cf47a62 100644 --- a/third_party/WebKit/Source/core/clipboard/DataTransferItem.h +++ b/third_party/WebKit/Source/core/clipboard/DataTransferItem.h
@@ -38,9 +38,9 @@ namespace blink { -class Blob; class DataObjectItem; class DataTransfer; +class File; class ScriptState; class StringCallback; @@ -57,7 +57,7 @@ String type() const; void getAsString(ScriptState*, StringCallback*) const; - Blob* getAsFile() const; + File* getAsFile() const; DataTransfer* getDataTransfer() { return m_dataTransfer.get(); } DataObjectItem* getDataObjectItem() { return m_item.get(); }
diff --git a/third_party/WebKit/Source/core/clipboard/DataTransferItem.idl b/third_party/WebKit/Source/core/clipboard/DataTransferItem.idl index 01f50656..b80843f 100644 --- a/third_party/WebKit/Source/core/clipboard/DataTransferItem.idl +++ b/third_party/WebKit/Source/core/clipboard/DataTransferItem.idl
@@ -35,6 +35,5 @@ readonly attribute DOMString type; // TODO(foolip): The callback argument should be a FunctionStringCallback. [CallWith=ScriptState] void getAsString(StringCallback? callback); - // TODO(foolip): getAsFile() should return a File object. crbug.com/361145 - Blob? getAsFile(); + File? getAsFile(); };
diff --git a/third_party/WebKit/Source/core/css/BUILD.gn b/third_party/WebKit/Source/core/css/BUILD.gn index bec5d64..0c0e34c 100644 --- a/third_party/WebKit/Source/core/css/BUILD.gn +++ b/third_party/WebKit/Source/core/css/BUILD.gn
@@ -346,6 +346,8 @@ "parser/SizesAttributeParser.cpp", "parser/SizesCalcParser.cpp", "properties/CSSPropertyAPI.h", + "properties/CSSPropertyAPIAlignItems.cpp", + "properties/CSSPropertyAPIAlignOrJustifySelf.cpp", "properties/CSSPropertyAPIBorderRadius.cpp", "properties/CSSPropertyAPICaretColor.cpp", "properties/CSSPropertyAPIClip.cpp", @@ -366,6 +368,7 @@ "properties/CSSPropertyAPIGridAutoFlow.cpp", "properties/CSSPropertyAPIImage.cpp", "properties/CSSPropertyAPIImageOrientation.cpp", + "properties/CSSPropertyAPIJustifyItems.cpp", "properties/CSSPropertyAPILetterAndWordSpacing.cpp", "properties/CSSPropertyAPIOffsetPosition.cpp", "properties/CSSPropertyAPIOpacity.cpp",
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h index cef699b..4ef594d 100644 --- a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h +++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
@@ -2111,10 +2111,10 @@ inline CSSIdentifierValue::CSSIdentifierValue(ETableLayout e) : CSSValue(IdentifierClass) { switch (e) { - case TableLayoutAuto: + case ETableLayout::kAuto: m_valueID = CSSValueAuto; break; - case TableLayoutFixed: + case ETableLayout::kFixed: m_valueID = CSSValueFixed; break; } @@ -2124,15 +2124,15 @@ inline ETableLayout CSSIdentifierValue::convertTo() const { switch (m_valueID) { case CSSValueFixed: - return TableLayoutFixed; + return ETableLayout::kFixed; case CSSValueAuto: - return TableLayoutAuto; + return ETableLayout::kAuto; default: break; } ASSERT_NOT_REACHED(); - return TableLayoutAuto; + return ETableLayout::kAuto; } template <>
diff --git a/third_party/WebKit/Source/core/css/CSSProperties.json5 b/third_party/WebKit/Source/core/css/CSSProperties.json5 index 1e8820da..ba84052 100644 --- a/third_party/WebKit/Source/core/css/CSSProperties.json5 +++ b/third_party/WebKit/Source/core/css/CSSProperties.json5
@@ -501,6 +501,7 @@ name: "align-items", converter: "convertSelfOrDefaultAlignmentData", initial: "initialDefaultAlignment", + api_class: true, }, { name: "alignment-baseline", @@ -510,6 +511,7 @@ name: "align-self", converter: "convertSelfOrDefaultAlignmentData", initial: "initialSelfAlignment", + api_class: "CSSPropertyAPIAlignOrJustifySelf", }, { name: "backdrop-filter", @@ -1020,12 +1022,14 @@ converter: "convertSelfOrDefaultAlignmentData", initial: "initialSelfAlignment", runtime_flag: "CSSGridLayout", + api_class: true, }, { name: "justify-self", converter: "convertSelfOrDefaultAlignmentData", initial: "initialSelfAlignment", runtime_flag: "CSSGridLayout", + api_class: "CSSPropertyAPIAlignOrJustifySelf", }, { name: "left",
diff --git a/third_party/WebKit/Source/core/css/CSSVariableData.cpp b/third_party/WebKit/Source/core/css/CSSVariableData.cpp index 58f2fa5..7406620 100644 --- a/third_party/WebKit/Source/core/css/CSSVariableData.cpp +++ b/third_party/WebKit/Source/core/css/CSSVariableData.cpp
@@ -13,7 +13,7 @@ namespace blink { StylePropertySet* CSSVariableData::propertySet() { - ASSERT(!m_needsVariableResolution); + DCHECK(!m_needsVariableResolution); if (!m_cachedPropertySet) { m_propertySet = CSSParser::parseCustomPropertySet(m_tokens); m_cachedPropertySet = true; @@ -35,7 +35,7 @@ m_tokens.push_back(token); } } - ASSERT(currentOffset == + DCHECK(currentOffset == m_backingString.getCharacters<CharacterType>() + m_backingString.length()); } @@ -66,7 +66,7 @@ : m_isAnimationTainted(isAnimationTainted), m_needsVariableResolution(needsVariableResolution), m_cachedPropertySet(false) { - ASSERT(!range.atEnd()); + DCHECK(!range.atEnd()); consumeAndUpdateTokens(range); }
diff --git a/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.cpp b/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.cpp index e42c5e6..4ecde07 100644 --- a/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.cpp +++ b/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.cpp
@@ -109,4 +109,9 @@ return styleValueVector; } +CSSStyleValueVector StyleValueFactory::cssValueToStyleValueVector( + const CSSValue& cssValue) { + return cssValueToStyleValueVector(CSSPropertyInvalid, cssValue); +} + } // namespace blink
diff --git a/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.h b/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.h index 4484e8b..331ea22 100644 --- a/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.h +++ b/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.h
@@ -19,6 +19,8 @@ public: static CSSStyleValueVector cssValueToStyleValueVector(CSSPropertyID, const CSSValue&); + // If you don't have complex CSS properties, use this one. + static CSSStyleValueVector cssValueToStyleValueVector(const CSSValue&); }; } // namespace blink
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp index 87ef0bb..320348a 100644 --- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp +++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1578,28 +1578,6 @@ return result; } -static CSSValue* consumeAlignItems(CSSParserTokenRange& range) { - // align-items property does not allow the 'auto' value. - if (identMatches<CSSValueAuto>(range.peek().id())) - return nullptr; - return CSSPropertyAlignmentUtils::consumeSelfPositionOverflowPosition(range); -} - -static CSSValue* consumeJustifyItems(CSSParserTokenRange& range) { - CSSParserTokenRange rangeCopy = range; - CSSIdentifierValue* legacy = consumeIdent<CSSValueLegacy>(rangeCopy); - CSSIdentifierValue* positionKeyword = - consumeIdent<CSSValueCenter, CSSValueLeft, CSSValueRight>(rangeCopy); - if (!legacy) - legacy = consumeIdent<CSSValueLegacy>(rangeCopy); - if (legacy && positionKeyword) { - range = rangeCopy; - return CSSValuePair::create(legacy, positionKeyword, - CSSValuePair::DropIdenticalValues); - } - return CSSPropertyAlignmentUtils::consumeSelfPositionOverflowPosition(range); -} - static CSSValue* consumeFitContent(CSSParserTokenRange& range, CSSParserMode cssParserMode) { CSSParserTokenRange rangeCopy = range; @@ -2310,17 +2288,6 @@ case CSSPropertyWebkitMaskRepeatX: case CSSPropertyWebkitMaskRepeatY: return nullptr; - case CSSPropertyAlignItems: - DCHECK(RuntimeEnabledFeatures::cssGridLayoutEnabled()); - return consumeAlignItems(m_range); - case CSSPropertyJustifySelf: - case CSSPropertyAlignSelf: - ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); - return CSSPropertyAlignmentUtils::consumeSelfPositionOverflowPosition( - m_range); - case CSSPropertyJustifyItems: - ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); - return consumeJustifyItems(m_range); case CSSPropertyGridColumnEnd: case CSSPropertyGridColumnStart: case CSSPropertyGridRowEnd:
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIAlignItems.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIAlignItems.cpp new file mode 100644 index 0000000..c8a956ac --- /dev/null +++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIAlignItems.cpp
@@ -0,0 +1,23 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "core/css/properties/CSSPropertyAPIAlignItems.h" + +#include "core/css/parser/CSSPropertyParserHelpers.h" +#include "core/css/properties/CSSPropertyAlignmentUtils.h" +#include "platform/RuntimeEnabledFeatures.h" + +namespace blink { + +const CSSValue* CSSPropertyAPIAlignItems::parseSingleValue( + CSSParserTokenRange& range, + const CSSParserContext* context) { + DCHECK(RuntimeEnabledFeatures::cssGridLayoutEnabled()); + // align-items property does not allow the 'auto' value. + if (CSSPropertyParserHelpers::identMatches<CSSValueAuto>(range.peek().id())) + return nullptr; + return CSSPropertyAlignmentUtils::consumeSelfPositionOverflowPosition(range); +} + +} // namespace blink
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIAlignOrJustifySelf.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIAlignOrJustifySelf.cpp new file mode 100644 index 0000000..25628292 --- /dev/null +++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIAlignOrJustifySelf.cpp
@@ -0,0 +1,19 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "core/css/properties/CSSPropertyAPIAlignOrJustifySelf.h" + +#include "core/css/properties/CSSPropertyAlignmentUtils.h" +#include "platform/RuntimeEnabledFeatures.h" + +namespace blink { + +const CSSValue* CSSPropertyAPIAlignOrJustifySelf::parseSingleValue( + CSSParserTokenRange& range, + const CSSParserContext* context) { + DCHECK(RuntimeEnabledFeatures::cssGridLayoutEnabled()); + return CSSPropertyAlignmentUtils::consumeSelfPositionOverflowPosition(range); +} + +} // namespace blink
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIJustifyItems.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIJustifyItems.cpp new file mode 100644 index 0000000..984240f --- /dev/null +++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIJustifyItems.cpp
@@ -0,0 +1,34 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "core/css/properties/CSSPropertyAPIJustifyItems.h" + +#include "core/css/CSSValuePair.h" +#include "core/css/parser/CSSPropertyParserHelpers.h" +#include "core/css/properties/CSSPropertyAlignmentUtils.h" +#include "platform/RuntimeEnabledFeatures.h" + +namespace blink { + +const CSSValue* CSSPropertyAPIJustifyItems::parseSingleValue( + CSSParserTokenRange& range, + const CSSParserContext* context) { + DCHECK(RuntimeEnabledFeatures::cssGridLayoutEnabled()); + CSSParserTokenRange rangeCopy = range; + CSSIdentifierValue* legacy = + CSSPropertyParserHelpers::consumeIdent<CSSValueLegacy>(rangeCopy); + CSSIdentifierValue* positionKeyword = + CSSPropertyParserHelpers::consumeIdent<CSSValueCenter, CSSValueLeft, + CSSValueRight>(rangeCopy); + if (!legacy) + legacy = CSSPropertyParserHelpers::consumeIdent<CSSValueLegacy>(rangeCopy); + if (legacy && positionKeyword) { + range = rangeCopy; + return CSSValuePair::create(legacy, positionKeyword, + CSSValuePair::DropIdenticalValues); + } + return CSSPropertyAlignmentUtils::consumeSelfPositionOverflowPosition(range); +} + +} // namespace blink
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAlignmentUtils.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyAlignmentUtils.cpp index d88b18eb..f66a77c 100644 --- a/third_party/WebKit/Source/core/css/properties/CSSPropertyAlignmentUtils.cpp +++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAlignmentUtils.cpp
@@ -11,8 +11,7 @@ namespace { -CSSIdentifierValue* consumeSelfPositionKeyword( - CSSParserTokenRange& range) { +CSSIdentifierValue* consumeSelfPositionKeyword(CSSParserTokenRange& range) { CSSValueID id = range.peek().id(); if (id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter || id == CSSValueSelfStart || id == CSSValueSelfEnd || @@ -22,7 +21,7 @@ return nullptr; } -} // namespace +} // namespace CSSValue* CSSPropertyAlignmentUtils::consumeSelfPositionOverflowPosition( CSSParserTokenRange& range) {
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAlignmentUtils.h b/third_party/WebKit/Source/core/css/properties/CSSPropertyAlignmentUtils.h index 544b902..e1f6b82 100644 --- a/third_party/WebKit/Source/core/css/properties/CSSPropertyAlignmentUtils.h +++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAlignmentUtils.h
@@ -15,7 +15,7 @@ class CSSPropertyAlignmentUtils { STATIC_ONLY(CSSPropertyAlignmentUtils); - static CSSValue* consumeSelfPositionOverflowPosition(CSSParserTokenRange& range); + static CSSValue* consumeSelfPositionOverflowPosition(CSSParserTokenRange&); }; } // namespace blink
diff --git a/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp b/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp index 710af22..97d0bf4 100644 --- a/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp +++ b/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp
@@ -299,6 +299,8 @@ TransformOperation::OperationType type) { const TransformOperations& transformList = toAnimatableTransform(value)->transformOperations(); + if (transformList.size() == 0) + return nullptr; ASSERT(transformList.size() == 1); ASSERT(transformList.operations()[0].get()->type() == type); return transformList.operations()[0].get();
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp index cddb5ad..5c12e1c 100644 --- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp +++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -691,7 +691,7 @@ } if (element->isLink()) { - state.style()->setIsLink(true); + state.style()->setIsLink(); EInsideLink linkState = state.elementLinkState(); if (linkState != EInsideLink::kNotInsideLink) { bool forceVisited = InspectorInstrumentation::forcePseudoState(
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp index 7e63fa9..ff3aeb0 100644 --- a/third_party/WebKit/Source/core/dom/Element.cpp +++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -429,7 +429,7 @@ } void Element::scrollIntoView(bool alignToTop) { - document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); + ensureCompositingInputsClean(); if (!layoutObject()) return; @@ -454,7 +454,7 @@ } void Element::scrollIntoViewIfNeeded(bool centerIfNeeded) { - document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); + ensureCompositingInputsClean(); if (!layoutObject()) return; @@ -634,7 +634,7 @@ } int Element::offsetLeft() { - document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); + ensureCompositingInputsClean(); if (LayoutBoxModelObject* layoutObject = layoutBoxModelObject()) return adjustLayoutUnitForAbsoluteZoom( LayoutUnit(layoutObject->pixelSnappedOffsetLeft(offsetParent())), @@ -644,7 +644,7 @@ } int Element::offsetTop() { - document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); + ensureCompositingInputsClean(); if (LayoutBoxModelObject* layoutObject = layoutBoxModelObject()) return adjustLayoutUnitForAbsoluteZoom( LayoutUnit(layoutObject->pixelSnappedOffsetTop(offsetParent())), @@ -1119,7 +1119,7 @@ } void Element::clientQuads(Vector<FloatQuad>& quads) { - document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); + ensureCompositingInputsClean(); LayoutObject* elementLayoutObject = layoutObject(); if (!elementLayoutObject) @@ -4120,6 +4120,19 @@ activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data()); } +void Element::ensureCompositingInputsClean() { + if (!inActiveDocument()) + return; + + // The call to updateLifecycleToCompositingCleanPlusScrolling| below would + // also run layout for us if we omitted this call. However we do not want to + // include pending style sheets when doing the layout, hence this call. + document().updateStyleAndLayoutIgnorePendingStylesheets(); + + if (FrameView* view = document().view()) + view->updateLifecycleToCompositingCleanPlusScrolling(); +} + DEFINE_TRACE(Element) { if (hasRareData()) visitor->trace(elementRareData());
diff --git a/third_party/WebKit/Source/core/dom/Element.h b/third_party/WebKit/Source/core/dom/Element.h index 8a26e38..aa1466f 100644 --- a/third_party/WebKit/Source/core/dom/Element.h +++ b/third_party/WebKit/Source/core/dom/Element.h
@@ -801,6 +801,11 @@ virtual void parserDidSetAttributes() {} + // Helper method which ensures that compositing inputs have been cleaned. + // Cleaning the compositing inputs is required when computing the location of + // position:sticky elements or their descendants. + void ensureCompositingInputsClean(); + private: void scrollLayoutBoxBy(const ScrollToOptions&); void scrollLayoutBoxTo(const ScrollToOptions&);
diff --git a/third_party/WebKit/Source/core/dom/ElementTest.cpp b/third_party/WebKit/Source/core/dom/ElementTest.cpp index 30064c6..40de9e4c 100644 --- a/third_party/WebKit/Source/core/dom/ElementTest.cpp +++ b/third_party/WebKit/Source/core/dom/ElementTest.cpp
@@ -7,6 +7,8 @@ #include "core/dom/Document.h" #include "core/frame/FrameView.h" #include "core/html/HTMLHtmlElement.h" +#include "core/layout/LayoutBoxModelObject.h" +#include "core/paint/PaintLayer.h" #include "core/testing/DummyPageHolder.h" #include "testing/gtest/include/gtest/gtest.h" #include <memory> @@ -23,4 +25,131 @@ << "<html> with designMode=on should be focusable."; } +// Verifies that calling getBoundingClientRect cleans compositor inputs. +// Cleaning the compositor inputs is required so that position:sticky elements +// and their descendants have the correct location. +TEST(ElementTest, GetBoundingClientRectUpdatesCompositorInputs) { + std::unique_ptr<DummyPageHolder> pageHolder = DummyPageHolder::create(); + Document& document = pageHolder->document(); + + document.view()->updateAllLifecyclePhases(); + EXPECT_EQ(DocumentLifecycle::PaintClean, document.lifecycle().state()); + + document.body()->setInnerHTML("<div id='test'></div>"); + EXPECT_EQ(DocumentLifecycle::VisualUpdatePending, + document.lifecycle().state()); + + document.body()->getBoundingClientRect(); + EXPECT_EQ(DocumentLifecycle::CompositingClean, document.lifecycle().state()); +} + +// Verifies that calling scrollIntoView* cleans compositor inputs. Cleaning the +// compositor inputs is required so that position:sticky elements and their +// descendants have the correct location. +TEST(ElementTest, ScrollIntoViewUpdatesCompositorInputs) { + std::unique_ptr<DummyPageHolder> pageHolder = DummyPageHolder::create(); + Document& document = pageHolder->document(); + + document.view()->updateAllLifecyclePhases(); + EXPECT_EQ(DocumentLifecycle::PaintClean, document.lifecycle().state()); + + document.body()->setInnerHTML("<div id='test'></div>"); + EXPECT_EQ(DocumentLifecycle::VisualUpdatePending, + document.lifecycle().state()); + + document.body()->scrollIntoView(); + EXPECT_EQ(DocumentLifecycle::CompositingClean, document.lifecycle().state()); + + document.body()->setInnerHTML("<div id='test2'></div>"); + EXPECT_EQ(DocumentLifecycle::VisualUpdatePending, + document.lifecycle().state()); + + document.body()->scrollIntoViewIfNeeded(); + EXPECT_EQ(DocumentLifecycle::CompositingClean, document.lifecycle().state()); +} + +// Verifies that calling offsetTop/offsetLeft cleans compositor inputs. +// Cleaning the compositor inputs is required so that position:sticky elements +// and their descendants have the correct location. +TEST(ElementTest, OffsetTopAndLeftUpdateCompositorInputs) { + std::unique_ptr<DummyPageHolder> pageHolder = DummyPageHolder::create(); + Document& document = pageHolder->document(); + + document.view()->updateAllLifecyclePhases(); + EXPECT_EQ(DocumentLifecycle::PaintClean, document.lifecycle().state()); + + document.body()->setInnerHTML("<div id='test'></div>"); + EXPECT_EQ(DocumentLifecycle::VisualUpdatePending, + document.lifecycle().state()); + + document.body()->offsetTop(); + EXPECT_EQ(DocumentLifecycle::CompositingClean, document.lifecycle().state()); + + document.body()->setInnerHTML("<div id='test2'></div>"); + EXPECT_EQ(DocumentLifecycle::VisualUpdatePending, + document.lifecycle().state()); + + document.body()->offsetLeft(); + EXPECT_EQ(DocumentLifecycle::CompositingClean, document.lifecycle().state()); +} + +TEST(ElementTest, OffsetTopAndLeftCorrectForStickyElementsAfterInsertion) { + std::unique_ptr<DummyPageHolder> pageHolder = DummyPageHolder::create(); + Document& document = pageHolder->document(); + + document.body()->setInnerHTML( + "<style>body { margin: 0 }" + "#scroller { overflow: scroll; height: 100px; width: 100px; }" + "#sticky { height: 25px; position: sticky; top: 0; left: 25px; }" + "#padding { height: 500px; width: 300px; }</style>" + "<div id='scroller'><div id='writer'></div><div id='sticky'></div>" + "<div id='padding'></div></div>"); + document.view()->updateAllLifecyclePhases(); + + Element* scroller = document.getElementById("scroller"); + Element* writer = document.getElementById("writer"); + Element* sticky = document.getElementById("sticky"); + + ASSERT_TRUE(scroller); + ASSERT_TRUE(writer); + ASSERT_TRUE(sticky); + + scroller->scrollTo(0, 200.0); + + // After scrolling, the position:sticky element should be offset to stay at + // the top of the viewport. + EXPECT_EQ(scroller->scrollTop(), sticky->offsetTop()); + + // Insert a new <div> above the sticky. This will dirty layout. + writer->setInnerHTML("<div style='height: 100px;'></div>"); + EXPECT_EQ(DocumentLifecycle::VisualUpdatePending, + document.lifecycle().state()); + + // Querying the new offset of the sticky element should now cause both layout + // and compositing inputs to be clean and should return the correct offset. + int offsetTop = sticky->offsetTop(); + EXPECT_EQ(DocumentLifecycle::CompositingClean, document.lifecycle().state()); + EXPECT_FALSE( + sticky->layoutBoxModelObject()->layer()->needsCompositingInputsUpdate()); + EXPECT_EQ(scroller->scrollTop(), offsetTop); + + scroller->scrollTo(50.0, 0); + + // After scrolling, the position:sticky element should be offset to stay 25 + // pixels from the left of the viewport. + EXPECT_EQ(scroller->scrollLeft() + 25, sticky->offsetLeft()); + + // Insert a new <div> above the sticky. This will dirty layout. + writer->setInnerHTML("<div style='width: 700px;'></div>"); + EXPECT_EQ(DocumentLifecycle::VisualUpdatePending, + document.lifecycle().state()); + + // Again getting the offset should cause layout and compositing to be clean. + int offsetLeft = sticky->offsetLeft(); + EXPECT_EQ(DocumentLifecycle::CompositingClean, document.lifecycle().state()); + EXPECT_FALSE( + sticky->layoutBoxModelObject()->layer()->needsCompositingInputsUpdate()); + EXPECT_EQ(scroller->scrollLeft() + 25, offsetLeft); +} + } // namespace blink
diff --git a/third_party/WebKit/Source/core/frame/BrowserControls.h b/third_party/WebKit/Source/core/frame/BrowserControls.h index 10c1f86a..cbabd91 100644 --- a/third_party/WebKit/Source/core/frame/BrowserControls.h +++ b/third_party/WebKit/Source/core/frame/BrowserControls.h
@@ -49,6 +49,8 @@ // scroll amount. FloatSize scrollBy(FloatSize scrollDelta); + WebBrowserControlsState permittedState() const { return m_permittedState; } + private: explicit BrowserControls(const FrameHost&); void resetBaseline();
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp index b50947044..14b6780 100644 --- a/third_party/WebKit/Source/core/frame/FrameView.cpp +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -1084,7 +1084,8 @@ } m_layoutSubtreeRootList.clear(); } else { - if (hasOrthogonalWritingModeRoots()) + if (hasOrthogonalWritingModeRoots() && + !RuntimeEnabledFeatures::layoutNGEnabled()) layoutOrthogonalWritingModeRoots(); layoutFromRootObject(*layoutView()); } @@ -2588,7 +2589,8 @@ if (ownerLayoutItem.isNull()) return frameRect(); - return ownerLayoutItem.absoluteContentQuad().enclosingBoundingBox(); + return ownerLayoutItem.absoluteContentQuad(TraverseDocumentBoundaries) + .enclosingBoundingBox(); } bool FrameView::isScrollable() {
diff --git a/third_party/WebKit/Source/core/frame/OWNERS b/third_party/WebKit/Source/core/frame/OWNERS index 9af9484..8df9e2186 100644 --- a/third_party/WebKit/Source/core/frame/OWNERS +++ b/third_party/WebKit/Source/core/frame/OWNERS
@@ -2,3 +2,6 @@ dcheng@chromium.org japhet@chromium.org sigbjornf@opera.com + +# TEAM: platform-architecture-dev@chromium.org +# COMPONENT: Blink>Internals
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp index 7c90678..5585ea1 100644 --- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp +++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -593,10 +593,10 @@ } IntRect VisualViewport::scrollableAreaBoundingBox() const { - // This method should return the bounding box in the parent view's coordinate - // space; however, VisualViewport technically isn't a child of any Frames. - // Nonetheless, the VisualViewport always occupies the entire main frame so - // just return that. + // This method should return the bounding box in the top-level FrameView's + // coordinate space; however, VisualViewport technically isn't a child of any + // Frames. Nonetheless, the VisualViewport always occupies the entire main + // frame so just return that. LocalFrame* frame = mainFrame(); if (!frame || !frame->view())
diff --git a/third_party/WebKit/Source/core/html/HTMLElement.cpp b/third_party/WebKit/Source/core/html/HTMLElement.cpp index deaffb10..1ca5128c 100644 --- a/third_party/WebKit/Source/core/html/HTMLElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp
@@ -1161,6 +1161,7 @@ } int HTMLElement::offsetLeftForBinding() { + ensureCompositingInputsClean(); Element* offsetParent = unclosedOffsetParent(); if (LayoutBoxModelObject* layoutObject = layoutBoxModelObject()) return adjustLayoutUnitForAbsoluteZoom( @@ -1171,6 +1172,7 @@ } int HTMLElement::offsetTopForBinding() { + ensureCompositingInputsClean(); Element* offsetParent = unclosedOffsetParent(); if (LayoutBoxModelObject* layoutObject = layoutBoxModelObject()) return adjustLayoutUnitForAbsoluteZoom(
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp index 24e8029..42db96d 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -839,9 +839,9 @@ return toIntSize(offset); } -FloatQuad LayoutBox::absoluteContentQuad() const { +FloatQuad LayoutBox::absoluteContentQuad(MapCoordinatesFlags flags) const { LayoutRect rect = contentBoxRect(); - return localToAbsoluteQuad(FloatRect(rect)); + return localToAbsoluteQuad(FloatRect(rect), flags); } LayoutRect LayoutBox::backgroundRect(BackgroundRectType rectType) const {
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.h b/third_party/WebKit/Source/core/layout/LayoutBox.h index 6245df2..28fa7fd4 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBox.h +++ b/third_party/WebKit/Source/core/layout/LayoutBox.h
@@ -389,7 +389,7 @@ IntSize absoluteContentBoxOffset() const; // The content box converted to absolute coords (taking transforms into // account). - FloatQuad absoluteContentQuad() const; + FloatQuad absoluteContentQuad(MapCoordinatesFlags = 0) const; // The enclosing rectangle of the background with given opacity requirement. LayoutRect backgroundRect(BackgroundRectType) const;
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp index 436e96d..d06a1ca 100644 --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -958,9 +958,9 @@ return result; } -IntRect LayoutObject::absoluteBoundingBoxRect() const { +IntRect LayoutObject::absoluteBoundingBoxRect(MapCoordinatesFlags flags) const { Vector<FloatQuad> quads; - absoluteQuads(quads); + absoluteQuads(quads, flags); size_t n = quads.size(); if (!n)
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h index 1bbb960..583ec5c0 100644 --- a/third_party/WebKit/Source/core/layout/LayoutObject.h +++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -1269,7 +1269,7 @@ // This returns an IntRect enclosing this object. If this object has an // integral size and the position has fractional values, the resultant // IntRect can be larger than the integral size. - IntRect absoluteBoundingBoxRect() const; + IntRect absoluteBoundingBoxRect(MapCoordinatesFlags = 0) const; // FIXME: This function should go away eventually IntRect absoluteBoundingBoxRectIgnoringTransforms() const;
diff --git a/third_party/WebKit/Source/core/layout/api/LayoutBoxItem.h b/third_party/WebKit/Source/core/layout/api/LayoutBoxItem.h index a93c022..b51a0b37 100644 --- a/third_party/WebKit/Source/core/layout/api/LayoutBoxItem.h +++ b/third_party/WebKit/Source/core/layout/api/LayoutBoxItem.h
@@ -62,8 +62,8 @@ toBox()->mapLocalToAncestor(ancestor, state, flags); } - FloatQuad absoluteContentQuad() const { - return toBox()->absoluteContentQuad(); + FloatQuad absoluteContentQuad(MapCoordinatesFlags flags = 0) const { + return toBox()->absoluteContentQuad(flags); } private:
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc index d193674..6bc68e3 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc
@@ -121,10 +121,15 @@ .ToConstraintSpace(); // TODO(cbiesinger): For orthogonal children, we need to always synthesize. - NGBlockLayoutAlgorithm minmax_algorithm( - layout_box_, Style(), toNGBlockNode(FirstChild()), constraint_space); - if (minmax_algorithm.ComputeMinAndMaxContentSizes(&sizes)) - return sizes; + // TODO(kojii): Add other algorithms when they support + // ComputeMinAndMaxContentSizes. + NGLayoutInputNode* first_child = FirstChild(); + if (!first_child || first_child->Type() == kLegacyBlock) { + NGBlockLayoutAlgorithm minmax_algorithm( + layout_box_, Style(), toNGBlockNode(FirstChild()), constraint_space); + if (minmax_algorithm.ComputeMinAndMaxContentSizes(&sizes)) + return sizes; + } // Have to synthesize this value. NGPhysicalFragment* physical_fragment = Layout(constraint_space);
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp index b32feec..fb8d5ea 100644 --- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp +++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -192,7 +192,7 @@ // 3. Plugin areas. Region shouldHandleScrollGestureOnMainThreadRegion = computeShouldHandleScrollGestureOnMainThreadRegion( - m_page->deprecatedLocalMainFrame(), IntPoint()); + m_page->deprecatedLocalMainFrame()); setShouldHandleScrollGestureOnMainThreadRegion( shouldHandleScrollGestureOnMainThreadRegion); m_scrollGestureRegionIsDirty = false; @@ -923,17 +923,13 @@ } Region ScrollingCoordinator::computeShouldHandleScrollGestureOnMainThreadRegion( - const LocalFrame* frame, - const IntPoint& frameLocation) const { + const LocalFrame* frame) const { Region shouldHandleScrollGestureOnMainThreadRegion; FrameView* frameView = frame->view(); if (!frameView || frameView->shouldThrottleRendering() || !frameView->isVisible()) return shouldHandleScrollGestureOnMainThreadRegion; - IntPoint offset = frameLocation; - offset.moveBy(frameView->frameRect().location()); - if (const FrameView::ScrollableAreaSet* scrollableAreas = frameView->scrollableAreas()) { for (const ScrollableArea* scrollableArea : *scrollableAreas) { @@ -944,7 +940,6 @@ if (scrollableArea->usesCompositedScrolling()) continue; IntRect box = scrollableArea->scrollableAreaBoundingBox(); - box.moveBy(offset); shouldHandleScrollGestureOnMainThreadRegion.unite(box); } } @@ -956,10 +951,17 @@ if (const FrameView::ResizerAreaSet* resizerAreas = frameView->resizerAreas()) { for (const LayoutBox* box : *resizerAreas) { + PaintLayerScrollableArea* scrollableArea = + box->layer()->getScrollableArea(); IntRect bounds = box->absoluteBoundingBoxRect(); + // Get the corner in local coords. IntRect corner = - box->layer()->getScrollableArea()->touchResizerCornerRect(bounds); - corner.moveBy(offset); + scrollableArea->resizerCornerRect(bounds, ResizerForTouch); + // Map corner to top-frame coords. + corner = scrollableArea->box() + .localToAbsoluteQuad(FloatRect(corner), + TraverseDocumentBoundaries) + .enclosingBoundingBox(); shouldHandleScrollGestureOnMainThreadRegion.unite(corner); } } @@ -971,8 +973,7 @@ PluginView* pluginView = toPluginView(child.get()); if (pluginView->wantsWheelEvents()) { - IntRect box = pluginView->frameRect(); - box.moveBy(offset); + IntRect box = frameView->convertToRootFrame(pluginView->frameRect()); shouldHandleScrollGestureOnMainThreadRegion.unite(box); } } @@ -981,10 +982,11 @@ const FrameTree& tree = frame->tree(); for (Frame* subFrame = tree.firstChild(); subFrame; subFrame = subFrame->tree().nextSibling()) { - if (subFrame->isLocalFrame()) + if (subFrame->isLocalFrame()) { shouldHandleScrollGestureOnMainThreadRegion.unite( computeShouldHandleScrollGestureOnMainThreadRegion( - toLocalFrame(subFrame), offset)); + toLocalFrame(subFrame))); + } } return shouldHandleScrollGestureOnMainThreadRegion;
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h index 161f978..3b73e61 100644 --- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h +++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h
@@ -122,8 +122,7 @@ void updateClipParentForGraphicsLayer(GraphicsLayer* child, const PaintLayer* parent); Region computeShouldHandleScrollGestureOnMainThreadRegion( - const LocalFrame*, - const IntPoint& frameLocation) const; + const LocalFrame*) const; void updateTouchEventTargetRectsIfNeeded();
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp index a07dab91..3d581f8 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -598,7 +598,7 @@ } IntRect PaintLayerScrollableArea::scrollableAreaBoundingBox() const { - return box().absoluteBoundingBoxRect(); + return box().absoluteBoundingBoxRect(TraverseDocumentBoundaries); } void PaintLayerScrollableArea::registerForAnimation() { @@ -825,6 +825,10 @@ DisableCompositingQueryAsserts disabler; positionOverflowControls(); + + // Layout of a scrollable area, or any of its descendants (sticky or + // otherwise), invalidates the cached sticky constraints. + invalidateAllStickyConstraints(); } void PaintLayerScrollableArea::clampScrollOffsetAfterOverflowChange() {
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h index e38398d..53a5b52e 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h
@@ -345,10 +345,6 @@ bool inResizeMode() const { return m_inResizeMode; } void setInResizeMode(bool inResizeMode) { m_inResizeMode = inResizeMode; } - IntRect touchResizerCornerRect(const IntRect& bounds) const { - return resizerCornerRect(bounds, ResizerForTouch); - } - LayoutUnit scrollWidth() const; LayoutUnit scrollHeight() const; int pixelSnappedScrollWidth() const;
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp index d0cb1b8..c633a7f 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp
@@ -28,7 +28,7 @@ } }; -} // namespace { +} // namespace class PaintLayerScrollableAreaTest : public RenderingTest { public: @@ -548,4 +548,31 @@ .Times(0); scrollableArea->setScrollOffset(ScrollOffset(2, 2), ProgrammaticScroll); } + +TEST_F(PaintLayerScrollableAreaTest, + StickyPositionConstraintsInvalidatedByLayout) { + setBodyInnerHTML( + "<style>#scroller { overflow-y: scroll; height: 100px; }" + "#sticky { height: 25px; position: sticky; top: 0; }" + "#padding { height: 500px; }</style>" + "<div id='scroller'><div id='sticky'></div><div id='padding'></div>" + "</div>"); + + LayoutBoxModelObject* scroller = + toLayoutBoxModelObject(getLayoutObjectByElementId("scroller")); + LayoutBoxModelObject* sticky = + toLayoutBoxModelObject(getLayoutObjectByElementId("sticky")); + + EXPECT_FALSE(sticky->layer()->needsCompositingInputsUpdate()); + + PaintLayerScrollableArea* scrollableArea = scroller->getScrollableArea(); + ASSERT_TRUE(scrollableArea); + + // Fake layout. + scrollableArea->updateAfterLayout(); + + EXPECT_TRUE(sticky->layer()->needsCompositingInputsUpdate()); + EXPECT_EQ(0u, scrollableArea->stickyConstraintsMap().size()); } + +} // namespace blink
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h index f8b43e8..3cad814d 100644 --- a/third_party/WebKit/Source/core/style/ComputedStyle.h +++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -315,7 +315,8 @@ static_cast<unsigned>(initialVerticalAlign()); m_nonInheritedData.m_clear = initialClear(); m_nonInheritedData.m_position = initialPosition(); - m_nonInheritedData.m_tableLayout = initialTableLayout(); + m_nonInheritedData.m_tableLayout = + static_cast<unsigned>(initialTableLayout()); m_nonInheritedData.m_breakBefore = initialBreakBefore(); m_nonInheritedData.m_breakAfter = initialBreakAfter(); m_nonInheritedData.m_breakInside = initialBreakInside(); @@ -1779,11 +1780,13 @@ SET_VAR(m_rareNonInheritedData, m_pageSizeType, t); } // table-layout - static ETableLayout initialTableLayout() { return TableLayoutAuto; } + static ETableLayout initialTableLayout() { return ETableLayout::kAuto; } ETableLayout tableLayout() const { return static_cast<ETableLayout>(m_nonInheritedData.m_tableLayout); } - void setTableLayout(ETableLayout v) { m_nonInheritedData.m_tableLayout = v; } + void setTableLayout(ETableLayout v) { + m_nonInheritedData.m_tableLayout = static_cast<unsigned>(v); + } // Text decoration properties. // text-decoration-line @@ -2589,7 +2592,7 @@ } bool isLink() const { return m_nonInheritedData.m_isLink; } - void setIsLink(bool b) { m_nonInheritedData.m_isLink = b; } + void setIsLink() { m_nonInheritedData.m_isLink = true; } EInsideLink insideLink() const { return static_cast<EInsideLink>(m_inheritedData.m_insideLink); @@ -3433,7 +3436,7 @@ // Table layout utility functions. bool isFixedTableLayout() const { - return tableLayout() == TableLayoutFixed && !logicalWidth().isAuto(); + return tableLayout() == ETableLayout::kFixed && !logicalWidth().isAuto(); } // Filter/transform utility functions.
diff --git a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h index d5f4a78..2b33a15 100644 --- a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h +++ b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
@@ -171,7 +171,7 @@ enum EClear { ClearNone = 0, ClearLeft = 1, ClearRight = 2, ClearBoth = 3 }; -enum ETableLayout { TableLayoutAuto, TableLayoutFixed }; +enum class ETableLayout : unsigned { kAuto, kFixed }; enum TextCombine { TextCombineNone, TextCombineAll };
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js index 2372c64..5e174a5 100644 --- a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js +++ b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
@@ -131,11 +131,11 @@ detach() { this._removeFromElement(); + this._focusRestorer.restore(); this._proxyElement.parentElement.insertBefore(this._element, this._proxyElement); this._proxyElement.remove(); delete this._proxyElement; this._element.classList.remove('text-prompt'); - this._focusRestorer.restore(); } /**
diff --git a/third_party/WebKit/Source/devtools/tests/TestExpectations b/third_party/WebKit/Source/devtools/tests/TestExpectations index fb45c50..e6b564ab 100644 --- a/third_party/WebKit/Source/devtools/tests/TestExpectations +++ b/third_party/WebKit/Source/devtools/tests/TestExpectations
@@ -52,4 +52,7 @@ http/tests/inspector-unit/test-failure.js [ Skip ] http/tests/inspector-unit/text-prompt-hint.js [ Skip ] http/tests/inspector-unit/text-prompt.js [ Skip ] -http/tests/inspector-unit/trie.js [ Skip ] \ No newline at end of file +http/tests/inspector-unit/trie.js [ Skip ] + +# Potentially flaky network test (may be caching related) +http/tests/inspector/network/network-datareceived.html [ Skip ] \ No newline at end of file
diff --git a/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector-protocol/network-data-length-expected.txt b/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector-protocol/network-data-length-expected.txt new file mode 100644 index 0000000..779a911 --- /dev/null +++ b/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector-protocol/network-data-length-expected.txt
@@ -0,0 +1,46 @@ +Ensures that data and header length sent from protocol is proper sizes + +Test started +Network agent enabled + +url: http://127.0.0.1:8000/inspector-protocol/resources/data-xfer-resource.php?size=4&flush_header_with_x_bytes=1&wait_after_headers_packet=25&flush_every=1&wait_every_x_bytes=1&wait_duration_every_x_bytes=25 + isChunked: false + isH2: false + redirected: false + headersSize: -1 + receivedDataSize: 177 + reportedTotalSize: 177 + +url: http://127.0.0.1:8000/inspector-protocol/resources/data-xfer-resource.php?size=4&flush_header_with_x_bytes=1&wait_after_headers_packet=25&flush_every=1&wait_every_x_bytes=1&wait_duration_every_x_bytes=25 + isChunked: false + isH2: false + redirected: false + headersSize: -1 + receivedDataSize: 177 + reportedTotalSize: 177 + +url: http://127.0.0.1:8000/inspector-protocol/resources/data-xfer-resource.php?redirect=1 + isChunked: null + isH2: null + redirected: true + headersSize: 0 + receivedDataSize: 0 + reportedTotalSize: 182 + +url: http://127.0.0.1:8000/inspector-protocol/resources/data-xfer-resource.php?cached=1 + isChunked: false + isH2: false + redirected: false + headersSize: -1 + receivedDataSize: 0 + reportedTotalSize: 101 + +url: http://127.0.0.1:8000/inspector-protocol/resources/data-xfer-resource.php? + isChunked: false + isH2: false + redirected: false + headersSize: -1 + receivedDataSize: 0 + reportedTotalSize: 173 + +
diff --git a/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector-protocol/reload-memory-cache-expected.txt b/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector-protocol/reload-memory-cache-expected.txt new file mode 100644 index 0000000..3c4c5adb --- /dev/null +++ b/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector-protocol/reload-memory-cache-expected.txt
@@ -0,0 +1,4 @@ +Tests that reloads when coming from protocol still use memory cache. + +This should never be reached. +
diff --git a/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector-protocol/request-referrer-policy-expected.txt b/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector-protocol/request-referrer-policy-expected.txt new file mode 100644 index 0000000..b8855ffc --- /dev/null +++ b/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector-protocol/request-referrer-policy-expected.txt
@@ -0,0 +1,9 @@ +Tests that network requests are annotated with the correct referrer policy. + +Network agent enabled +FAIL: Request with policy undefined observed (expected unsafe-url) +FAIL: Request with policy undefined observed (expected no-referrer-when-downgrade) +FAIL: Request with policy undefined observed (expected no-referrer) +FAIL: Request with policy undefined observed (expected origin) +FAIL: Request with policy undefined observed (expected origin-when-cross-origin) +
diff --git a/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector/network/network-xhr-replay-expected.txt b/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector/network/network-xhr-replay-expected.txt new file mode 100644 index 0000000..627c9e8 --- /dev/null +++ b/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector/network/network-xhr-replay-expected.txt
@@ -0,0 +1,61 @@ +CONSOLE MESSAGE: line 6: XHR loaded: 1 +CONSOLE WARNING: line 33: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/. +CONSOLE MESSAGE: line 6: XHR loaded: 2 +CONSOLE MESSAGE: line 6: XHR loaded: 3 +CONSOLE MESSAGE: line 6: XHR loaded: 4 +CONSOLE MESSAGE: line 6: XHR loaded: 5 +CONSOLE MESSAGE: line 6: XHR loaded: 6 +CONSOLE MESSAGE: line 6: XHR loaded: 7 +CONSOLE MESSAGE: line 6: XHR loaded: 8 +Tests XHR replaying. Bug 95187 + +Running: testGetStaticAsync +Dumping request: + url: http://user:password@127.0.0.1:8000/inspector/network/resources/empty.html + requestMethod: GET + test request header value: headerValueA + +Running: testGetStaticSync +Dumping request: + url: http://user:password@127.0.0.1:8000/inspector/network/resources/empty.html + requestMethod: GET + test request header value: headerValueB + +Running: testGetCachedAsync +Dumping request: + url: http://user:password@127.0.0.1:8000/inspector/network/resources/random-cached.php + requestMethod: GET + test request header value: headerValueC + +Running: testGetCachedSync +Dumping request: + url: http://user:password@127.0.0.1:8000/inspector/network/resources/random-cached.php + requestMethod: GET + test request header value: headerValueD + +Running: testGetRandomAsync +Dumping request: + url: http://user:password@127.0.0.1:8000/inspector/network/resources/random.php + requestMethod: GET + test request header value: headerValueE + +Running: testGetRandomSync +Dumping request: + url: http://user:password@127.0.0.1:8000/inspector/network/resources/random.php + requestMethod: GET + test request header value: headerValueF + +Running: testPostAsync +Dumping request: + url: http://user:password@127.0.0.1:8000/inspector/network/resources/random.php + requestFormData: payload + requestMethod: POST + test request header value: headerValueG + +Running: testPostSync +Dumping request: + url: http://user:password@127.0.0.1:8000/inspector/network/resources/random.php + requestFormData: payload + requestMethod: POST + test request header value: headerValueH +
diff --git a/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector/resource-tree/cached-resource-metadata-expected.txt b/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector/resource-tree/cached-resource-metadata-expected.txt new file mode 100644 index 0000000..1074d27 --- /dev/null +++ b/third_party/WebKit/Source/devtools/tests/baseline/protocol-1.2/http/tests/inspector/resource-tree/cached-resource-metadata-expected.txt
@@ -0,0 +1,6 @@ +CONSOLE MESSAGE: line 1: Done. +Verify that cached resource has metadata. + +Last modified: null +Content size: null +
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h index f5f6a86..1748a50 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h +++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h
@@ -246,7 +246,7 @@ virtual bool scrollbarsCanBeActive() const = 0; // Returns the bounding box of this scrollable area, in the coordinate system - // of the enclosing scroll view. + // of the top-level FrameView. virtual IntRect scrollableAreaBoundingBox() const = 0; virtual bool scrollAnimatorEnabled() const { return false; }
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp index ddc23b9..5cf445a1 100644 --- a/third_party/WebKit/Source/web/WebViewImpl.cpp +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -1774,6 +1774,7 @@ // viewport with the browser controls shown. IntSize ICBSize = m_size; if (RuntimeEnabledFeatures::inertTopControlsEnabled() && + browserControls().permittedState() == WebBrowserControlsBoth && !browserControls().shrinkViewport()) ICBSize.expand(0, -browserControls().height()); @@ -1795,8 +1796,20 @@ void WebViewImpl::updateBrowserControlsState(WebBrowserControlsState constraint, WebBrowserControlsState current, bool animate) { + WebBrowserControlsState oldPermittedState = + browserControls().permittedState(); + browserControls().updateConstraintsAndState(constraint, current, animate); + // If the controls are going from a locked to an unlocked state, or + // vice-versa, then we need to force a recompute of the ICB size since that + // depends on the permitted browser controls state. + if (oldPermittedState != constraint && + (oldPermittedState == WebBrowserControlsBoth || + constraint == WebBrowserControlsBoth)) { + performResize(); + } + if (m_layerTreeView) m_layerTreeView->updateBrowserControlsState(constraint, current, animate); } @@ -1838,8 +1851,7 @@ return page()->frameHost().browserControls(); } -void WebViewImpl::resizeViewWhileAnchored(FrameView* view, - float browserControlsHeight, +void WebViewImpl::resizeViewWhileAnchored(float browserControlsHeight, bool browserControlsShrinkLayout) { DCHECK(mainFrameImpl()); @@ -1903,12 +1915,10 @@ if (isRotation) { RotationViewportAnchor anchor(*view, visualViewport, viewportAnchorCoords, pageScaleConstraintsSet()); - resizeViewWhileAnchored(view, browserControlsHeight, - browserControlsShrinkLayout); + resizeViewWhileAnchored(browserControlsHeight, browserControlsShrinkLayout); } else { ResizeViewportAnchor::ResizeScope resizeScope(*m_resizeViewportAnchor); - resizeViewWhileAnchored(view, browserControlsHeight, - browserControlsShrinkLayout); + resizeViewWhileAnchored(browserControlsHeight, browserControlsShrinkLayout); } sendResizeEventAndRepaint(); }
diff --git a/third_party/WebKit/Source/web/WebViewImpl.h b/third_party/WebKit/Source/web/WebViewImpl.h index f6589a64..f648bad5 100644 --- a/third_party/WebKit/Source/web/WebViewImpl.h +++ b/third_party/WebKit/Source/web/WebViewImpl.h
@@ -520,8 +520,7 @@ IntSize contentsSize() const; void performResize(); - void resizeViewWhileAnchored(FrameView*, - float browserControlsHeight, + void resizeViewWhileAnchored(float browserControlsHeight, bool browserControlsShrinkLayout); // Overrides the compositor visibility. See the description of
diff --git a/third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp b/third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp index 428d053..e0e5ba0 100644 --- a/third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp +++ b/third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp
@@ -726,6 +726,86 @@ EXPECT_EQ(300, frame()->view()->layoutSize(IncludeScrollbars).height()); } +// Ensure that browser controls do not affect the layout by showing and hiding +// except for position: fixed elements. +TEST_F(BrowserControlsTest, MAYBE(AffectLayoutHeightWhenConstrained)) { + // Initialize with the browser controls showing. + WebViewImpl* webView = initialize("percent-height.html"); + webView->resizeWithBrowserControls(WebSize(400, 300), 100.f, true); + webView->updateBrowserControlsState(WebBrowserControlsBoth, + WebBrowserControlsShown, false); + webView->browserControls().setShownRatio(1); + webView->updateAllLifecyclePhases(); + + Element* absPos = getElementById(WebString::fromUTF8("abs")); + Element* fixedPos = getElementById(WebString::fromUTF8("fixed")); + + ASSERT_EQ(100.f, webView->browserControls().contentOffset()); + + // Hide the browser controls. + verticalScroll(-100.f); + webView->resizeWithBrowserControls(WebSize(400, 400), 100.f, false); + webView->updateAllLifecyclePhases(); + ASSERT_EQ(300, frame()->view()->layoutSize(IncludeScrollbars).height()); + + // Now lock the controls in a hidden state. The layout and elements should + // resize without a WebView::resize. + webView->updateBrowserControlsState(WebBrowserControlsHidden, + WebBrowserControlsBoth, false); + + EXPECT_FLOAT_EQ(200.f, absPos->getBoundingClientRect()->height()); + EXPECT_FLOAT_EQ(200.f, fixedPos->getBoundingClientRect()->height()); + + EXPECT_EQ(400, frame()->view()->layoutSize(IncludeScrollbars).height()); + + // Unlock the controls, the sizes should change even though the controls are + // still hidden. + webView->updateBrowserControlsState(WebBrowserControlsBoth, + WebBrowserControlsBoth, false); + + EXPECT_FLOAT_EQ(150.f, absPos->getBoundingClientRect()->height()); + EXPECT_FLOAT_EQ(200.f, fixedPos->getBoundingClientRect()->height()); + + EXPECT_EQ(300, frame()->view()->layoutSize(IncludeScrollbars).height()); + + // Now lock the controls in a shown state. + webView->updateBrowserControlsState(WebBrowserControlsShown, + WebBrowserControlsBoth, false); + webView->resizeWithBrowserControls(WebSize(400, 300), 100.f, true); + + EXPECT_FLOAT_EQ(150.f, absPos->getBoundingClientRect()->height()); + EXPECT_FLOAT_EQ(150.f, fixedPos->getBoundingClientRect()->height()); + + EXPECT_EQ(300, frame()->view()->layoutSize(IncludeScrollbars).height()); + + // Shown -> Hidden + webView->resizeWithBrowserControls(WebSize(400, 400), 100.f, false); + webView->updateBrowserControlsState(WebBrowserControlsHidden, + WebBrowserControlsBoth, false); + + EXPECT_FLOAT_EQ(200.f, absPos->getBoundingClientRect()->height()); + EXPECT_FLOAT_EQ(200.f, fixedPos->getBoundingClientRect()->height()); + + EXPECT_EQ(400, frame()->view()->layoutSize(IncludeScrollbars).height()); + + // Go from Unlocked and showing, to locked and hidden but issue the resize + // before the constraint update to check for race issues. + webView->updateBrowserControlsState(WebBrowserControlsBoth, + WebBrowserControlsShown, false); + webView->resizeWithBrowserControls(WebSize(400, 300), 100.f, true); + ASSERT_EQ(300, frame()->view()->layoutSize(IncludeScrollbars).height()); + webView->updateAllLifecyclePhases(); + + webView->resizeWithBrowserControls(WebSize(400, 400), 100.f, false); + webView->updateBrowserControlsState(WebBrowserControlsHidden, + WebBrowserControlsHidden, false); + + EXPECT_FLOAT_EQ(200.f, absPos->getBoundingClientRect()->height()); + EXPECT_FLOAT_EQ(200.f, fixedPos->getBoundingClientRect()->height()); + + EXPECT_EQ(400, frame()->view()->layoutSize(IncludeScrollbars).height()); +} + // Ensure that browser controls do not affect vh units. TEST_F(BrowserControlsTest, MAYBE(DontAffectVHUnits)) { // Initialize with the browser controls showing.
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py index 0f6d715..55f8cd4 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py
@@ -92,7 +92,9 @@ } data, status_code = self.request(path, method='PUT', body=body) - if status_code == 200: + if status_code == 405: + raise Exception('PR did not passed necessary checks to merge: %d' % pull_request_number) + elif status_code == 200: return data else: raise Exception('PR could not be merged: %d' % pull_request_number)
diff --git a/third_party/cacheinvalidation/OWNERS b/third_party/cacheinvalidation/OWNERS index 56259755..cc3ad17 100644 --- a/third_party/cacheinvalidation/OWNERS +++ b/third_party/cacheinvalidation/OWNERS
@@ -6,3 +6,5 @@ dcheng@chromium.org nyquist@chromium.org zea@chromium.org + +# COMPONENT: Services>Invalidation
diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn index 78a1c30..104f403 100644 --- a/third_party/harfbuzz-ng/BUILD.gn +++ b/third_party/harfbuzz-ng/BUILD.gn
@@ -101,6 +101,7 @@ "src/hb-ot-layout.h", "src/hb-ot-map-private.hh", "src/hb-ot-map.cc", + "src/hb-ot-math-table.hh", "src/hb-ot-math.cc", "src/hb-ot-maxp-table.hh", "src/hb-ot-name-table.hh", @@ -133,6 +134,11 @@ "src/hb-ot-shape.h", "src/hb-ot-tag.cc", "src/hb-ot-tag.h", + "src/hb-ot-var-avar-table.hh", + "src/hb-ot-var-fvar-table.hh", + "src/hb-ot-var-hvar-table.hh", + "src/hb-ot-var.cc", + "src/hb-ot-var.h", "src/hb-ot.h", "src/hb-private.hh", "src/hb-set-private.hh",
diff --git a/third_party/harfbuzz-ng/NEWS b/third_party/harfbuzz-ng/NEWS index 8c3ef11..43a3bace 100644 --- a/third_party/harfbuzz-ng/NEWS +++ b/third_party/harfbuzz-ng/NEWS
@@ -1,3 +1,34 @@ +Overview of changes leading to 1.4.2 +Monday, January 23, 2017 +==================================== + +- Implement OpenType Font Variation tables avar/fvar/HVAR/VVAR. +- hb-shape and hb-view now accept --variations. +- New API: + +hb_variation_t +hb_variation_from_string() +hb_variation_to_string() + +hb_font_set_variations() +hb_font_set_var_coords_design() +hb_font_get_var_coords_normalized() + +hb-ot-var.h: +hb_ot_var_axis_t +hb_ot_var_has_data() +hb_ot_var_get_axis_count() +hb_ot_var_get_axes() +hb_ot_var_find_axis() +hb_ot_var_normalize_variations() +hb_ot_var_normalize_coords() + +- MVAR to be implemented later. Access to named instances to be + implemented later as well. + +- Misc fixes. + + Overview of changes leading to 1.4.1 Thursday, January 5, 2017 ====================================
diff --git a/third_party/harfbuzz-ng/README.chromium b/third_party/harfbuzz-ng/README.chromium index 2b05002..c8f7b750 100644 --- a/third_party/harfbuzz-ng/README.chromium +++ b/third_party/harfbuzz-ng/README.chromium
@@ -1,8 +1,8 @@ Name: harfbuzz-ng Short Name: harfbuzz-ng URL: http://harfbuzz.org -Version: 1.4.1 -Date: 20170105 +Version: 1.4.2 +Date: 20170130 Security Critical: yes License: MIT License File: COPYING
diff --git a/third_party/harfbuzz-ng/src/hb-common.cc b/third_party/harfbuzz-ng/src/hb-common.cc index 3564e43..64e77d43 100644 --- a/third_party/harfbuzz-ng/src/hb-common.cc +++ b/third_party/harfbuzz-ng/src/hb-common.cc
@@ -605,3 +605,347 @@ { return HB_VERSION_ATLEAST (major, minor, micro); } + + + +/* hb_feature_t and hb_variation_t */ + +static bool +parse_space (const char **pp, const char *end) +{ + while (*pp < end && ISSPACE (**pp)) + (*pp)++; + return true; +} + +static bool +parse_char (const char **pp, const char *end, char c) +{ + parse_space (pp, end); + + if (*pp == end || **pp != c) + return false; + + (*pp)++; + return true; +} + +static bool +parse_uint (const char **pp, const char *end, unsigned int *pv) +{ + char buf[32]; + unsigned int len = MIN (ARRAY_LENGTH (buf) - 1, (unsigned int) (end - *pp)); + strncpy (buf, *pp, len); + buf[len] = '\0'; + + char *p = buf; + char *pend = p; + unsigned int v; + + /* Intentionally use strtol instead of strtoul, such that + * -1 turns into "big number"... */ + errno = 0; + v = strtol (p, &pend, 0); + if (errno || p == pend) + return false; + + *pv = v; + *pp += pend - p; + return true; +} + +static bool +parse_float (const char **pp, const char *end, float *pv) +{ + char buf[32]; + unsigned int len = MIN (ARRAY_LENGTH (buf) - 1, (unsigned int) (end - *pp)); + strncpy (buf, *pp, len); + buf[len] = '\0'; + + char *p = buf; + char *pend = p; + float v; + + errno = 0; + v = strtof (p, &pend); + if (errno || p == pend) + return false; + + *pv = v; + *pp += pend - p; + return true; +} + +static bool +parse_bool (const char **pp, const char *end, unsigned int *pv) +{ + parse_space (pp, end); + + const char *p = *pp; + while (*pp < end && ISALPHA(**pp)) + (*pp)++; + + /* CSS allows on/off as aliases 1/0. */ + if (*pp - p == 2 || 0 == strncmp (p, "on", 2)) + *pv = 1; + else if (*pp - p == 3 || 0 == strncmp (p, "off", 2)) + *pv = 0; + else + return false; + + return true; +} + +/* hb_feature_t */ + +static bool +parse_feature_value_prefix (const char **pp, const char *end, hb_feature_t *feature) +{ + if (parse_char (pp, end, '-')) + feature->value = 0; + else { + parse_char (pp, end, '+'); + feature->value = 1; + } + + return true; +} + +static bool +parse_tag (const char **pp, const char *end, hb_tag_t *tag) +{ + parse_space (pp, end); + + char quote = 0; + + if (*pp < end && (**pp == '\'' || **pp == '"')) + { + quote = **pp; + (*pp)++; + } + + const char *p = *pp; + while (*pp < end && ISALNUM(**pp)) + (*pp)++; + + if (p == *pp || *pp - p > 4) + return false; + + *tag = hb_tag_from_string (p, *pp - p); + + if (quote) + { + /* CSS expects exactly four bytes. And we only allow quotations for + * CSS compatibility. So, enforce the length. */ + if (*pp - p != 4) + return false; + if (*pp == end || **pp != quote) + return false; + (*pp)++; + } + + return true; +} + +static bool +parse_feature_indices (const char **pp, const char *end, hb_feature_t *feature) +{ + parse_space (pp, end); + + bool has_start; + + feature->start = 0; + feature->end = (unsigned int) -1; + + if (!parse_char (pp, end, '[')) + return true; + + has_start = parse_uint (pp, end, &feature->start); + + if (parse_char (pp, end, ':')) { + parse_uint (pp, end, &feature->end); + } else { + if (has_start) + feature->end = feature->start + 1; + } + + return parse_char (pp, end, ']'); +} + +static bool +parse_feature_value_postfix (const char **pp, const char *end, hb_feature_t *feature) +{ + bool had_equal = parse_char (pp, end, '='); + bool had_value = parse_uint (pp, end, &feature->value) || + parse_bool (pp, end, &feature->value); + /* CSS doesn't use equal-sign between tag and value. + * If there was an equal-sign, then there *must* be a value. + * A value without an eqaul-sign is ok, but not required. */ + return !had_equal || had_value; +} + +static bool +parse_one_feature (const char **pp, const char *end, hb_feature_t *feature) +{ + return parse_feature_value_prefix (pp, end, feature) && + parse_tag (pp, end, &feature->tag) && + parse_feature_indices (pp, end, feature) && + parse_feature_value_postfix (pp, end, feature) && + parse_space (pp, end) && + *pp == end; +} + +/** + * hb_feature_from_string: + * @str: (array length=len) (element-type uint8_t): a string to parse + * @len: length of @str, or -1 if string is %NULL terminated + * @feature: (out): the #hb_feature_t to initialize with the parsed values + * + * Parses a string into a #hb_feature_t. + * + * TODO: document the syntax here. + * + * Return value: + * %true if @str is successfully parsed, %false otherwise. + * + * Since: 0.9.5 + **/ +hb_bool_t +hb_feature_from_string (const char *str, int len, + hb_feature_t *feature) +{ + hb_feature_t feat; + + if (len < 0) + len = strlen (str); + + if (likely (parse_one_feature (&str, str + len, &feat))) + { + if (feature) + *feature = feat; + return true; + } + + if (feature) + memset (feature, 0, sizeof (*feature)); + return false; +} + +/** + * hb_feature_to_string: + * @feature: an #hb_feature_t to convert + * @buf: (array length=size) (out): output string + * @size: the allocated size of @buf + * + * Converts a #hb_feature_t into a %NULL-terminated string in the format + * understood by hb_feature_from_string(). The client in responsible for + * allocating big enough size for @buf, 128 bytes is more than enough. + * + * Since: 0.9.5 + **/ +void +hb_feature_to_string (hb_feature_t *feature, + char *buf, unsigned int size) +{ + if (unlikely (!size)) return; + + char s[128]; + unsigned int len = 0; + if (feature->value == 0) + s[len++] = '-'; + hb_tag_to_string (feature->tag, s + len); + len += 4; + while (len && s[len - 1] == ' ') + len--; + if (feature->start != 0 || feature->end != (unsigned int) -1) + { + s[len++] = '['; + if (feature->start) + len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%u", feature->start)); + if (feature->end != feature->start + 1) { + s[len++] = ':'; + if (feature->end != (unsigned int) -1) + len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%u", feature->end)); + } + s[len++] = ']'; + } + if (feature->value > 1) + { + s[len++] = '='; + len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%u", feature->value)); + } + assert (len < ARRAY_LENGTH (s)); + len = MIN (len, size - 1); + memcpy (buf, s, len); + buf[len] = '\0'; +} + +/* hb_variation_t */ + +static bool +parse_variation_value (const char **pp, const char *end, hb_variation_t *variation) +{ + parse_char (pp, end, '='); /* Optional. */ + return parse_float (pp, end, &variation->value); +} + +static bool +parse_one_variation (const char **pp, const char *end, hb_variation_t *variation) +{ + return parse_tag (pp, end, &variation->tag) && + parse_variation_value (pp, end, variation) && + parse_space (pp, end) && + *pp == end; +} + +/** + * hb_variation_from_string: + * + * Since: 1.4.2 + */ +hb_bool_t +hb_variation_from_string (const char *str, int len, + hb_variation_t *variation) +{ + hb_variation_t var; + + if (len < 0) + len = strlen (str); + + if (likely (parse_one_variation (&str, str + len, &var))) + { + if (variation) + *variation = var; + return true; + } + + if (variation) + memset (variation, 0, sizeof (*variation)); + return false; +} + +/** + * hb_variation_to_string: + * + * Since: 1.4.2 + */ +void +hb_variation_to_string (hb_variation_t *variation, + char *buf, unsigned int size) +{ + if (unlikely (!size)) return; + + char s[128]; + unsigned int len = 0; + hb_tag_to_string (variation->tag, s + len); + len += 4; + while (len && s[len - 1] == ' ') + len--; + s[len++] = '='; + len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%g", variation->value)); + + assert (len < ARRAY_LENGTH (s)); + len = MIN (len, size - 1); + memcpy (buf, s, len); + buf[len] = '\0'; +}
diff --git a/third_party/harfbuzz-ng/src/hb-common.h b/third_party/harfbuzz-ng/src/hb-common.h index 2cbee76a..634cb96a 100644 --- a/third_party/harfbuzz-ng/src/hb-common.h +++ b/third_party/harfbuzz-ng/src/hb-common.h
@@ -362,6 +362,42 @@ typedef void (*hb_destroy_func_t) (void *user_data); +/* Font features and variations. */ + +typedef struct hb_feature_t { + hb_tag_t tag; + uint32_t value; + unsigned int start; + unsigned int end; +} hb_feature_t; + +HB_EXTERN hb_bool_t +hb_feature_from_string (const char *str, int len, + hb_feature_t *feature); + +HB_EXTERN void +hb_feature_to_string (hb_feature_t *feature, + char *buf, unsigned int size); + +/** + * hb_variation_t: + * + * Since: 1.4.2 + */ +typedef struct hb_variation_t { + hb_tag_t tag; + float value; +} hb_variation_t; + +HB_EXTERN hb_bool_t +hb_variation_from_string (const char *str, int len, + hb_variation_t *variation); + +HB_EXTERN void +hb_variation_to_string (hb_variation_t *variation, + char *buf, unsigned int size); + + HB_END_DECLS #endif /* HB_COMMON_H */
diff --git a/third_party/harfbuzz-ng/src/hb-face-private.hh b/third_party/harfbuzz-ng/src/hb-face-private.hh index c4266ff..43e7b1c 100644 --- a/third_party/harfbuzz-ng/src/hb-face-private.hh +++ b/third_party/harfbuzz-ng/src/hb-face-private.hh
@@ -50,12 +50,16 @@ void *user_data; hb_destroy_func_t destroy; - unsigned int index; - mutable unsigned int upem; - mutable unsigned int num_glyphs; + unsigned int index; /* Face index in a collection, zero-based. */ + mutable unsigned int upem; /* Units-per-EM. */ + mutable unsigned int num_glyphs; /* Number of glyphs. */ - struct hb_shaper_data_t shaper_data; + struct hb_shaper_data_t shaper_data; /* Various shaper data. */ + /* Various non-shaping data. */ + /* ... */ + + /* Cache */ struct plan_node_t { hb_shape_plan_t *shape_plan; plan_node_t *next;
diff --git a/third_party/harfbuzz-ng/src/hb-face.cc b/third_party/harfbuzz-ng/src/hb-face.cc index 6b563bc..1ba97070 100644 --- a/third_party/harfbuzz-ng/src/hb-face.cc +++ b/third_party/harfbuzz-ng/src/hb-face.cc
@@ -28,15 +28,11 @@ #include "hb-private.hh" -#include "hb-ot-layout-private.hh" - -#include "hb-font-private.hh" +#include "hb-face-private.hh" #include "hb-open-file-private.hh" #include "hb-ot-head-table.hh" #include "hb-ot-maxp-table.hh" -#include <string.h> - /* * hb_face_t
diff --git a/third_party/harfbuzz-ng/src/hb-font.cc b/third_party/harfbuzz-ng/src/hb-font.cc index 2935c4b4..ea45501 100644 --- a/third_party/harfbuzz-ng/src/hb-font.cc +++ b/third_party/harfbuzz-ng/src/hb-font.cc
@@ -28,14 +28,7 @@ #include "hb-private.hh" -#include "hb-ot-layout-private.hh" - #include "hb-font-private.hh" -#include "hb-open-file-private.hh" -#include "hb-ot-head-table.hh" -#include "hb-ot-maxp-table.hh" - -#include <string.h> /* @@ -1543,30 +1536,112 @@ if (y_ppem) *y_ppem = font->y_ppem; } +/* + * Variations + */ +static void +_hb_font_adopt_var_coords_normalized (hb_font_t *font, + int *coords, /* 2.14 normalized */ + unsigned int coords_length) +{ + free (font->coords); + + font->coords = coords; + font->num_coords = coords_length; +} + +/** + * hb_font_set_variations: + * + * Since: 1.4.2 + */ +void +hb_font_set_variations (hb_font_t *font, + const hb_variation_t *variations, + unsigned int variations_length) +{ + if (font->immutable) + return; + + if (!variations_length) + { + hb_font_set_var_coords_normalized (font, NULL, 0); + return; + } + + unsigned int coords_length = hb_ot_var_get_axis_count (font->face); + + int *normalized = coords_length ? (int *) calloc (coords_length, sizeof (int)) : NULL; + if (unlikely (coords_length && !normalized)) + return; + + hb_ot_var_normalize_variations (font->face, + variations, variations_length, + normalized, coords_length); + _hb_font_adopt_var_coords_normalized (font, normalized, coords_length); +} + +/** + * hb_font_set_var_coords_design: + * + * Since: 1.4.2 + */ +void +hb_font_set_var_coords_design (hb_font_t *font, + const float *coords, + unsigned int coords_length) +{ + if (font->immutable) + return; + + int *normalized = coords_length ? (int *) calloc (coords_length, sizeof (int)) : NULL; + if (unlikely (coords_length && !normalized)) + return; + + hb_ot_var_normalize_coords (font->face, coords_length, coords, normalized); + _hb_font_adopt_var_coords_normalized (font, normalized, coords_length); +} + +/** + * hb_font_set_var_coords_normalized: + * + * Since: 1.4.2 + */ void hb_font_set_var_coords_normalized (hb_font_t *font, - int *coords, /* XXX 2.14 normalized */ + const int *coords, /* 2.14 normalized */ unsigned int coords_length) { if (font->immutable) return; - /* Skip tail zero entries. */ - while (coords_length && !coords[coords_length - 1]) - coords_length--; - int *copy = coords_length ? (int *) calloc (coords_length, sizeof (coords[0])) : NULL; if (unlikely (coords_length && !copy)) return; - free (font->coords); - if (coords_length) memcpy (copy, coords, coords_length * sizeof (coords[0])); - font->coords = copy; - font->num_coords = coords_length; + _hb_font_adopt_var_coords_normalized (font, copy, coords_length); +} + +/** + * hb_font_set_var_coords_normalized: + * + * Return value is valid as long as variation coordinates of the font + * are not modified. + * + * Since: 1.4.2 + */ +const int * +hb_font_get_var_coords_normalized (hb_font_t *font, + unsigned int *length) +{ + if (length) + *length = font->num_coords; + + return font->coords; }
diff --git a/third_party/harfbuzz-ng/src/hb-font.h b/third_party/harfbuzz-ng/src/hb-font.h index 8813286..e2e5979 100644 --- a/third_party/harfbuzz-ng/src/hb-font.h +++ b/third_party/harfbuzz-ng/src/hb-font.h
@@ -603,12 +603,25 @@ unsigned int *x_ppem, unsigned int *y_ppem); +HB_EXTERN void +hb_font_set_variations (hb_font_t *font, + const hb_variation_t *variations, + unsigned int variations_length); + +HB_EXTERN void +hb_font_set_var_coords_design (hb_font_t *font, + const float *coords, + unsigned int coords_length); HB_EXTERN void hb_font_set_var_coords_normalized (hb_font_t *font, - int *coords, /* XXX 2.14 normalized */ + const int *coords, /* 2.14 normalized */ unsigned int coords_length); +HB_EXTERN const int * +hb_font_get_var_coords_normalized (hb_font_t *font, + unsigned int *length); + HB_END_DECLS #endif /* HB_FONT_H */
diff --git a/third_party/harfbuzz-ng/src/hb-ft.cc b/third_party/harfbuzz-ng/src/hb-ft.cc index f127066a..48d6a0e 100644 --- a/third_party/harfbuzz-ng/src/hb-ft.cc +++ b/third_party/harfbuzz-ng/src/hb-ft.cc
@@ -621,17 +621,22 @@ FT_MM_Var *mm_var = NULL; if (!FT_Get_MM_Var (ft_face, &mm_var)) { - FT_Fixed coords[mm_var->num_axis]; - int hbCoords[mm_var->num_axis]; - if (!FT_Get_Var_Blend_Coordinates (ft_face, mm_var->num_axis, coords)) + FT_Fixed *ft_coords = (FT_Fixed *) calloc (mm_var->num_axis, sizeof (FT_Fixed)); + int *coords = (int *) calloc (mm_var->num_axis, sizeof (int)); + if (coords && ft_coords) { - for (int i = 0; i < mm_var->num_axis; ++i) - hbCoords[i] = coords[i] >> 2; + if (!FT_Get_Var_Blend_Coordinates (ft_face, mm_var->num_axis, ft_coords)) + { + for (unsigned int i = 0; i < mm_var->num_axis; ++i) + coords[i] = ft_coords[i] >>= 2; - hb_font_set_var_coords_normalized (font, hbCoords, mm_var->num_axis); + hb_font_set_var_coords_normalized (font, coords, mm_var->num_axis); + } + free (coords); + free (ft_coords); } + free (mm_var); } - free (mm_var); #endif return font; @@ -736,6 +741,20 @@ FT_Set_Transform (ft_face, &matrix, NULL); } + unsigned int num_coords; + const int *coords = hb_font_get_var_coords_normalized (font, &num_coords); + if (num_coords) + { + FT_Fixed *ft_coords = (FT_Fixed *) calloc (num_coords, sizeof (FT_Fixed)); + if (ft_coords) + { + for (unsigned int i = 0; i < num_coords; i++) + ft_coords[i] = coords[i] << 2; + FT_Set_Var_Blend_Coordinates (ft_face, num_coords, ft_coords); + free (ft_coords); + } + } + ft_face->generic.data = blob; ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob;
diff --git a/third_party/harfbuzz-ng/src/hb-open-file-private.hh b/third_party/harfbuzz-ng/src/hb-open-file-private.hh index 5357ddc..f208419 100644 --- a/third_party/harfbuzz-ng/src/hb-open-file-private.hh +++ b/third_party/harfbuzz-ng/src/hb-open-file-private.hh
@@ -142,7 +142,7 @@ Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */ FixedVersion<>version; /* Version of the TTC Header (1.0), * 0x00010000u */ - ArrayOf<OffsetTo<OffsetTable, ULONG>, ULONG> + ArrayOf<LOffsetTo<OffsetTable>, ULONG> table; /* Array of offsets to the OffsetTable for each font * from the beginning of the file */ public:
diff --git a/third_party/harfbuzz-ng/src/hb-open-type-private.hh b/third_party/harfbuzz-ng/src/hb-open-type-private.hh index 2cc1fb2..d90d68c 100644 --- a/third_party/harfbuzz-ng/src/hb-open-type-private.hh +++ b/third_party/harfbuzz-ng/src/hb-open-type-private.hh
@@ -30,6 +30,7 @@ #define HB_OPEN_TYPE_PRIVATE_HH #include "hb-private.hh" +#include "hb-face-private.hh" namespace OT { @@ -829,6 +830,7 @@ } DEFINE_SIZE_STATIC (sizeof(OffsetType)); }; +template <typename Type> struct LOffsetTo : OffsetTo<Type, ULONG> {}; template <typename Base, typename OffsetType, typename Type> static inline const Type& operator + (const Base &base, const OffsetTo<Type, OffsetType> &offset) { return offset (base); } template <typename Base, typename OffsetType, typename Type> @@ -950,6 +952,7 @@ public: DEFINE_SIZE_ARRAY (sizeof (LenType), array); }; +template <typename Type> struct LArrayOf : ArrayOf<Type, ULONG> {}; /* Array of Offset's */ template <typename Type, typename OffsetType=USHORT> @@ -1061,6 +1064,104 @@ }; +/* Lazy struct and blob loaders. */ + +/* Logic is shared between hb_lazy_loader_t and hb_lazy_table_loader_t */ +template <typename T> +struct hb_lazy_loader_t +{ + inline void init (hb_face_t *face_) + { + face = face_; + instance = NULL; + } + + inline void fini (void) + { + if (instance && instance != &OT::Null(T)) + { + instance->fini(); + free (instance); + } + } + + inline const T* get (void) const + { + retry: + T *p = (T *) hb_atomic_ptr_get (&instance); + if (unlikely (!p)) + { + p = (T *) calloc (1, sizeof (T)); + if (unlikely (!p)) + p = const_cast<T *> (&OT::Null(T)); + else + p->init (face); + if (unlikely (!hb_atomic_ptr_cmpexch (const_cast<T **>(&instance), NULL, p))) + { + if (p != &OT::Null(T)) + p->fini (); + goto retry; + } + } + return p; + } + + inline const T* operator-> (void) const + { + return get (); + } + + private: + hb_face_t *face; + T *instance; +}; + +/* Logic is shared between hb_lazy_loader_t and hb_lazy_table_loader_t */ +template <typename T> +struct hb_lazy_table_loader_t +{ + inline void init (hb_face_t *face_) + { + face = face_; + instance = NULL; + blob = NULL; + } + + inline void fini (void) + { + hb_blob_destroy (blob); + } + + inline const T* get (void) const + { + retry: + T *p = (T *) hb_atomic_ptr_get (&instance); + if (unlikely (!p)) + { + hb_blob_t *blob_ = OT::Sanitizer<T>::sanitize (face->reference_table (T::tableTag)); + p = const_cast<T *>(OT::Sanitizer<T>::lock_instance (blob_)); + if (!hb_atomic_ptr_cmpexch (const_cast<T **>(&instance), NULL, p)) + { + hb_blob_destroy (blob_); + goto retry; + } + blob = blob_; + } + return p; + } + + inline const T* operator-> (void) const + { + return get(); + } + + private: + hb_face_t *face; + T *instance; + mutable hb_blob_t *blob; +}; + + } /* namespace OT */
diff --git a/third_party/harfbuzz-ng/src/hb-ot-cbdt-table.hh b/third_party/harfbuzz-ng/src/hb-ot-cbdt-table.hh index 52897ab..0a7fbf5 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-cbdt-table.hh +++ b/third_party/harfbuzz-ng/src/hb-ot-cbdt-table.hh
@@ -216,7 +216,7 @@ USHORT firstGlyphIndex; USHORT lastGlyphIndex; - OffsetTo<IndexSubtable, ULONG> offsetToSubtable; + LOffsetTo<IndexSubtable> offsetToSubtable; DEFINE_SIZE_STATIC(8); }; @@ -275,7 +275,7 @@ } protected: - OffsetTo<IndexSubtableArray, ULONG> indexSubtableArrayOffset; + LOffsetTo<IndexSubtableArray> indexSubtableArrayOffset; ULONG indexTablesSize; ULONG numberOfIndexSubtables; ULONG colorRef; @@ -348,8 +348,8 @@ } protected: - FixedVersion<>version; - ArrayOf<BitmapSizeTable, ULONG> sizeTables; + FixedVersion<> version; + LArrayOf<BitmapSizeTable> sizeTables; public: DEFINE_SIZE_ARRAY(8, sizeTables);
diff --git a/third_party/harfbuzz-ng/src/hb-ot-cmap-table.hh b/third_party/harfbuzz-ng/src/hb-ot-cmap-table.hh index d7a94a1e..3a53a1cb 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-cmap-table.hh +++ b/third_party/harfbuzz-ng/src/hb-ot-cmap-table.hh
@@ -380,9 +380,9 @@ } UINT24 varSelector; /* Variation selector. */ - OffsetTo<DefaultUVS, ULONG> + LOffsetTo<DefaultUVS> defaultUVS; /* Offset to Default UVS Table. May be 0. */ - OffsetTo<NonDefaultUVS, ULONG> + LOffsetTo<NonDefaultUVS> nonDefaultUVS; /* Offset to Non-Default UVS Table. May be 0. */ public: DEFINE_SIZE_STATIC (11); @@ -486,7 +486,7 @@ USHORT platformID; /* Platform ID. */ USHORT encodingID; /* Platform-specific encoding ID. */ - OffsetTo<CmapSubtable, ULONG> + LOffsetTo<CmapSubtable> subtable; /* Byte offset from beginning of table to the subtable for this encoding. */ public: DEFINE_SIZE_STATIC (8);
diff --git a/third_party/harfbuzz-ng/src/hb-ot-font.cc b/third_party/harfbuzz-ng/src/hb-ot-font.cc index 5be055d3..009db20a 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-font.cc +++ b/third_party/harfbuzz-ng/src/hb-ot-font.cc
@@ -37,6 +37,7 @@ #include "hb-ot-hhea-table.hh" #include "hb-ot-hmtx-table.hh" #include "hb-ot-os2-table.hh" +#include "hb-ot-var-hvar-table.hh" //#include "hb-ot-post-table.hh" @@ -50,12 +51,16 @@ unsigned short line_gap; bool has_font_extents; - const OT::_mtx *table; + const OT::hmtxvmtx *table; hb_blob_t *blob; + const OT::HVARVVAR *var; + hb_blob_t *var_blob; + inline void init (hb_face_t *face, hb_tag_t _hea_tag, hb_tag_t _mtx_tag, + hb_tag_t _var_tag, hb_tag_t os2_tag, unsigned int default_advance = 0) { @@ -91,7 +96,7 @@ this->has_font_extents = got_font_extents; - this->blob = OT::Sanitizer<OT::_mtx>::sanitize (face->reference_table (_mtx_tag)); + this->blob = OT::Sanitizer<OT::hmtxvmtx>::sanitize (face->reference_table (_mtx_tag)); /* Cap num_metrics() and num_advances() based on table length. */ unsigned int len = hb_blob_get_length (this->blob); @@ -107,15 +112,20 @@ hb_blob_destroy (this->blob); this->blob = hb_blob_get_empty (); } - this->table = OT::Sanitizer<OT::_mtx>::lock_instance (this->blob); + this->table = OT::Sanitizer<OT::hmtxvmtx>::lock_instance (this->blob); + + this->var_blob = OT::Sanitizer<OT::HVARVVAR>::sanitize (face->reference_table (_var_tag)); + this->var = OT::Sanitizer<OT::HVARVVAR>::lock_instance (this->var_blob); } inline void fini (void) { hb_blob_destroy (this->blob); + hb_blob_destroy (this->var_blob); } - inline unsigned int get_advance (hb_codepoint_t glyph) const + inline unsigned int get_advance (hb_codepoint_t glyph, + hb_font_t *font) const { if (unlikely (glyph >= this->num_metrics)) { @@ -128,10 +138,8 @@ return this->default_advance; } - if (glyph >= this->num_advances) - glyph = this->num_advances - 1; - - return this->table->longMetric[glyph].advance; + return this->table->longMetric[MIN (glyph, this->num_advances - 1)].advance + + this->var->get_advance_var (glyph, font->coords, font->num_coords); // TODO Optimize?! } }; @@ -421,55 +429,13 @@ } }; -template <typename T> -struct hb_lazy_loader_t -{ - inline void init (hb_face_t *face_) - { - face = face_; - instance = NULL; - } - - inline void fini (void) - { - if (instance && instance != &OT::Null(T)) - { - instance->fini(); - free (instance); - } - } - - inline const T* operator-> (void) const - { - retry: - T *p = (T *) hb_atomic_ptr_get (&instance); - if (unlikely (!p)) - { - p = (T *) calloc (1, sizeof (T)); - if (unlikely (!p)) - return &OT::Null(T); - p->init (face); - if (unlikely (!hb_atomic_ptr_cmpexch (const_cast<T **>(&instance), NULL, p))) - { - p->fini (); - goto retry; - } - } - return p; - } - - private: - hb_face_t *face; - T *instance; -}; - struct hb_ot_font_t { hb_ot_face_cmap_accelerator_t cmap; hb_ot_face_metrics_accelerator_t h_metrics; hb_ot_face_metrics_accelerator_t v_metrics; - hb_lazy_loader_t<hb_ot_face_glyf_accelerator_t> glyf; - hb_lazy_loader_t<hb_ot_face_cbdt_accelerator_t> cbdt; + OT::hb_lazy_loader_t<hb_ot_face_glyf_accelerator_t> glyf; + OT::hb_lazy_loader_t<hb_ot_face_cbdt_accelerator_t> cbdt; }; @@ -482,8 +448,8 @@ return NULL; ot_font->cmap.init (face); - ot_font->h_metrics.init (face, HB_OT_TAG_hhea, HB_OT_TAG_hmtx, HB_OT_TAG_os2); - ot_font->v_metrics.init (face, HB_OT_TAG_vhea, HB_OT_TAG_vmtx, HB_TAG_NONE, + ot_font->h_metrics.init (face, HB_OT_TAG_hhea, HB_OT_TAG_hmtx, HB_OT_TAG_HVAR, HB_OT_TAG_os2); + ot_font->v_metrics.init (face, HB_OT_TAG_vhea, HB_OT_TAG_vmtx, HB_OT_TAG_VVAR, HB_TAG_NONE, ot_font->h_metrics.ascender - ot_font->h_metrics.descender); /* TODO Can we do this lazily? */ ot_font->glyf.init (face); ot_font->cbdt.init (face); @@ -529,23 +495,23 @@ } static hb_position_t -hb_ot_get_glyph_h_advance (hb_font_t *font HB_UNUSED, +hb_ot_get_glyph_h_advance (hb_font_t *font, void *font_data, hb_codepoint_t glyph, void *user_data HB_UNUSED) { const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; - return font->em_scale_x (ot_font->h_metrics.get_advance (glyph)); + return font->em_scale_x (ot_font->h_metrics.get_advance (glyph, font)); } static hb_position_t -hb_ot_get_glyph_v_advance (hb_font_t *font HB_UNUSED, +hb_ot_get_glyph_v_advance (hb_font_t *font, void *font_data, hb_codepoint_t glyph, void *user_data HB_UNUSED) { const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; - return font->em_scale_y (-(int) ot_font->v_metrics.get_advance (glyph)); + return font->em_scale_y (-(int) ot_font->v_metrics.get_advance (glyph, font)); } static hb_bool_t @@ -559,6 +525,7 @@ bool ret = ot_font->glyf->get_extents (glyph, extents); if (!ret) ret = ot_font->cbdt->get_extents (glyph, extents); + // TODO Hook up side-bearings variations. extents->x_bearing = font->em_scale_x (extents->x_bearing); extents->y_bearing = font->em_scale_y (extents->y_bearing); extents->width = font->em_scale_x (extents->width); @@ -576,6 +543,7 @@ metrics->ascender = font->em_scale_y (ot_font->h_metrics.ascender); metrics->descender = font->em_scale_y (ot_font->h_metrics.descender); metrics->line_gap = font->em_scale_y (ot_font->h_metrics.line_gap); + // TODO Hook up variations. return ot_font->h_metrics.has_font_extents; } @@ -589,6 +557,7 @@ metrics->ascender = font->em_scale_x (ot_font->v_metrics.ascender); metrics->descender = font->em_scale_x (ot_font->v_metrics.descender); metrics->line_gap = font->em_scale_x (ot_font->v_metrics.line_gap); + // TODO Hook up variations. return ot_font->v_metrics.has_font_extents; }
diff --git a/third_party/harfbuzz-ng/src/hb-ot-hmtx-table.hh b/third_party/harfbuzz-ng/src/hb-ot-hmtx-table.hh index a9606b3..30aa625 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-hmtx-table.hh +++ b/third_party/harfbuzz-ng/src/hb-ot-hmtx-table.hh
@@ -50,10 +50,8 @@ DEFINE_SIZE_STATIC (4); }; -struct _mtx +struct hmtxvmtx { - static const hb_tag_t tableTag = HB_TAG('_','m','t','x'); - static const hb_tag_t hmtxTag = HB_OT_TAG_hmtx; static const hb_tag_t vmtxTag = HB_OT_TAG_vmtx; @@ -91,10 +89,10 @@ DEFINE_SIZE_ARRAY2 (0, longMetric, leadingBearingX); }; -struct hmtx : _mtx { +struct hmtx : hmtxvmtx { static const hb_tag_t tableTag = HB_OT_TAG_hmtx; }; -struct vmtx : _mtx { +struct vmtx : hmtxvmtx { static const hb_tag_t tableTag = HB_OT_TAG_vmtx; };
diff --git a/third_party/harfbuzz-ng/src/hb-ot-layout-common-private.hh b/third_party/harfbuzz-ng/src/hb-ot-layout-common-private.hh index 62ca7a3..180e5f08 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-layout-common-private.hh +++ b/third_party/harfbuzz-ng/src/hb-ot-layout-common-private.hh
@@ -1323,6 +1323,14 @@ this+regions); } + inline float get_delta (unsigned int index, + int *coords, unsigned int coord_count) const + { + unsigned int outer = index >> 16; + unsigned int inner = index & 0xFFFF; + return get_delta (outer, inner, coords, coord_count); + } + inline bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); @@ -1334,7 +1342,7 @@ protected: USHORT format; - OffsetTo<VarRegionList, ULONG> regions; + LOffsetTo<VarRegionList> regions; OffsetArrayOf<VarData, ULONG> dataSets; public: DEFINE_SIZE_ARRAY (8, dataSets); @@ -1433,8 +1441,8 @@ } protected: - USHORT featureIndex; - OffsetTo<Feature, ULONG> feature; + USHORT featureIndex; + LOffsetTo<Feature> feature; public: DEFINE_SIZE_STATIC (6); }; @@ -1481,9 +1489,9 @@ } protected: - OffsetTo<ConditionSet, ULONG> + LOffsetTo<ConditionSet> conditions; - OffsetTo<FeatureTableSubstitution, ULONG> + LOffsetTo<FeatureTableSubstitution> substitutions; public: DEFINE_SIZE_STATIC (8); @@ -1527,7 +1535,7 @@ protected: FixedVersion<> version; /* Version--0x00010000u */ - ArrayOf<FeatureVariationRecord, ULONG> + LArrayOf<FeatureVariationRecord> varRecords; public: DEFINE_SIZE_ARRAY (8, varRecords);
diff --git a/third_party/harfbuzz-ng/src/hb-ot-layout-gdef-table.hh b/third_party/harfbuzz-ng/src/hb-ot-layout-gdef-table.hh index b70cbb7a..552df0fd 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-layout-gdef-table.hh +++ b/third_party/harfbuzz-ng/src/hb-ot-layout-gdef-table.hh
@@ -295,7 +295,7 @@ protected: USHORT format; /* Format identifier--format = 1 */ - ArrayOf<OffsetTo<Coverage, ULONG> > + ArrayOf<LOffsetTo<Coverage> > coverage; /* Array of long offsets to mark set * coverage tables */ public: @@ -443,7 +443,7 @@ * definitions--from beginning of GDEF * header (may be NULL). Introduced * in version 0x00010002. */ - OffsetTo<VariationStore, ULONG> + LOffsetTo<VariationStore> varStore; /* Offset to the table of Item Variation * Store--from beginning of GDEF * header (may be NULL). Introduced
diff --git a/third_party/harfbuzz-ng/src/hb-ot-layout-gsubgpos-private.hh b/third_party/harfbuzz-ng/src/hb-ot-layout-gsubgpos-private.hh index fd75c54..b7a0122a 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-layout-gsubgpos-private.hh +++ b/third_party/harfbuzz-ng/src/hb-ot-layout-gsubgpos-private.hh
@@ -2313,7 +2313,7 @@ featureList; /* FeatureList table */ OffsetTo<LookupList> lookupList; /* LookupList table */ - OffsetTo<FeatureVariations, ULONG> + LOffsetTo<FeatureVariations> featureVars; /* Offset to Feature Variations table--from beginning of table * (may be NULL). Introduced
diff --git a/third_party/harfbuzz-ng/src/hb-ot-layout-private.hh b/third_party/harfbuzz-ng/src/hb-ot-layout-private.hh index a4272de..8c348be 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-layout-private.hh +++ b/third_party/harfbuzz-ng/src/hb-ot-layout-private.hh
@@ -34,6 +34,7 @@ #include "hb-font-private.hh" #include "hb-buffer-private.hh" #include "hb-set-private.hh" +#include "hb-open-type-private.hh" /* Private API corresponding to hb-ot-layout.h: */ @@ -125,6 +126,8 @@ struct GSUB; struct GPOS; struct MATH; + struct fvar; + struct avar; } struct hb_ot_layout_lookup_accelerator_t @@ -153,12 +156,15 @@ hb_blob_t *gdef_blob; hb_blob_t *gsub_blob; hb_blob_t *gpos_blob; - hb_blob_t *math_blob; const struct OT::GDEF *gdef; const struct OT::GSUB *gsub; const struct OT::GPOS *gpos; - const struct OT::MATH *math; + + /* TODO Move the following out of this struct. */ + OT::hb_lazy_table_loader_t<struct OT::MATH> math; + OT::hb_lazy_table_loader_t<struct OT::fvar> fvar; + OT::hb_lazy_table_loader_t<struct OT::avar> avar; unsigned int gsub_lookup_count; unsigned int gpos_lookup_count;
diff --git a/third_party/harfbuzz-ng/src/hb-ot-layout.cc b/third_party/harfbuzz-ng/src/hb-ot-layout.cc index 145ec76..d7ededd 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-layout.cc +++ b/third_party/harfbuzz-ng/src/hb-ot-layout.cc
@@ -34,13 +34,10 @@ #include "hb-ot-layout-gdef-table.hh" #include "hb-ot-layout-gsub-table.hh" #include "hb-ot-layout-gpos-table.hh" -#include "hb-ot-layout-jstf-table.hh" +#include "hb-ot-layout-jstf-table.hh" // Just so we compile it; unused otherwise. #include "hb-ot-map-private.hh" -#include <stdlib.h> -#include <string.h> - HB_SHAPER_DATA_ENSURE_DECLARE(ot, face) @@ -60,9 +57,9 @@ layout->gpos_blob = OT::Sanitizer<OT::GPOS>::sanitize (face->reference_table (HB_OT_TAG_GPOS)); layout->gpos = OT::Sanitizer<OT::GPOS>::lock_instance (layout->gpos_blob); - /* The MATH table is rarely used, so only try and load it in _get_math. */ - layout->math_blob = NULL; - layout->math = NULL; + layout->math.init (face); + layout->fvar.init (face); + layout->avar.init (face); { /* @@ -181,7 +178,10 @@ hb_blob_destroy (layout->gdef_blob); hb_blob_destroy (layout->gsub_blob); hb_blob_destroy (layout->gpos_blob); - hb_blob_destroy (layout->math_blob); + + layout->math.fini (); + layout->fvar.fini (); + layout->avar.fini (); free (layout); }
diff --git a/third_party/harfbuzz-ng/src/hb-ot-layout-math-table.hh b/third_party/harfbuzz-ng/src/hb-ot-math-table.hh similarity index 99% rename from third_party/harfbuzz-ng/src/hb-ot-layout-math-table.hh rename to third_party/harfbuzz-ng/src/hb-ot-math-table.hh index b52b121..191d79e9 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-layout-math-table.hh +++ b/third_party/harfbuzz-ng/src/hb-ot-math-table.hh
@@ -24,8 +24,8 @@ * Igalia Author(s): Frédéric Wang */ -#ifndef HB_OT_LAYOUT_MATH_TABLE_HH -#define HB_OT_LAYOUT_MATH_TABLE_HH +#ifndef HB_OT_MATH_TABLE_HH +#define HB_OT_MATH_TABLE_HH #include "hb-open-type-private.hh" #include "hb-ot-layout-common-private.hh" @@ -716,7 +716,7 @@ DEFINE_SIZE_STATIC (10); }; -} /* mathspace OT */ +} /* namespace OT */ -#endif /* HB_OT_LAYOUT_MATH_TABLE_HH */ +#endif /* HB_OT_MATH_TABLE_HH */
diff --git a/third_party/harfbuzz-ng/src/hb-ot-math.cc b/third_party/harfbuzz-ng/src/hb-ot-math.cc index 9ef21d29..2d7e679 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-math.cc +++ b/third_party/harfbuzz-ng/src/hb-ot-math.cc
@@ -26,7 +26,7 @@ #include "hb-open-type-private.hh" -#include "hb-ot-layout-math-table.hh" +#include "hb-ot-math-table.hh" HB_SHAPER_DATA_ENSURE_DECLARE(ot, face) @@ -34,25 +34,8 @@ _get_math (hb_face_t *face) { if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return OT::Null(OT::MATH); - hb_ot_layout_t * layout = hb_ot_layout_from_face (face); - -retry: - const OT::MATH *math = (const OT::MATH *) hb_atomic_ptr_get (&layout->math); - - if (unlikely (!math)) - { - hb_blob_t *blob = OT::Sanitizer<OT::MATH>::sanitize (face->reference_table (HB_OT_TAG_MATH)); - math = OT::Sanitizer<OT::MATH>::lock_instance (blob); - if (!hb_atomic_ptr_cmpexch (&layout->math, NULL, math)) - { - hb_blob_destroy (blob); - goto retry; - } - layout->math_blob = blob; - } - - return *math; + return *(layout->math.get ()); } /* @@ -64,10 +47,9 @@ * @face: #hb_face_t to test * * This function allows to verify the presence of an OpenType MATH table on the - * face. If so, such a table will be loaded into memory and sanitized. You can - * then safely call other functions for math layout and shaping. + * face. * - * Return value: #TRUE if face has a MATH table and #FALSE otherwise + * Return value: true if face has a MATH table, false otherwise * * Since: 1.3.3 **/ @@ -136,10 +118,10 @@ /** * hb_ot_math_is_glyph_extended_shape: - * @font: a #hb_font_t to test + * @face: a #hb_face_t to test * @glyph: a glyph index to test * - * Return value: #TRUE if the glyph is an extended shape and #FALSE otherwise + * Return value: true if the glyph is an extended shape, false otherwise * * Since: 1.3.3 **/
diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-hangul.cc b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-hangul.cc index eb95a28..af50565 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-hangul.cc +++ b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-hangul.cc
@@ -32,7 +32,7 @@ /* Same order as the feature array below */ enum { - NONE, + _JMO, LJMO, VJMO,
diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-use.cc b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-use.cc index 5b19d5d7..af68706 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-use.cc +++ b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-use.cc
@@ -572,28 +572,6 @@ */ case 0x1112Eu : *a = 0x11127u; *b= 0x11131u; return true; case 0x1112Fu : *a = 0x11127u; *b= 0x11132u; return true; - - /* - * Decompose split matras that don't have Unicode decompositions. - */ - - /* Limbu */ - case 0x1925u : *a = 0x1920u; *b= 0x1923u; return true; - case 0x1926u : *a = 0x1920u; *b= 0x1924u; return true; - - /* Balinese */ - case 0x1B3Cu : *a = 0x1B42u; *b= 0x1B3Cu; return true; - -#if 0 - /* Lepcha */ - case 0x1C29u : *a = no decomp, -> LEFT; return true; - - /* Javanese */ - case 0xA9C0u : *a = no decomp, -> RIGHT; return true; - - /* Sharada */ - case 0x111BFu : *a = no decomp, -> ABOVE; return true; -#endif } return (bool) c->unicode->decompose (ab, a, b);
diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape.cc b/third_party/harfbuzz-ng/src/hb-ot-shape.cc index ddd6662..6b38739 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-shape.cc +++ b/third_party/harfbuzz-ng/src/hb-ot-shape.cc
@@ -362,6 +362,18 @@ hb_buffer_t *buffer = c->buffer; + hb_mask_t pre_mask, post_mask; + if (HB_DIRECTION_IS_FORWARD (buffer->props.direction)) + { + pre_mask = c->plan->numr_mask | c->plan->frac_mask; + post_mask = c->plan->frac_mask | c->plan->dnom_mask; + } + else + { + pre_mask = c->plan->frac_mask | c->plan->dnom_mask; + post_mask = c->plan->numr_mask | c->plan->frac_mask; + } + /* TODO look in pre/post context text also. */ unsigned int count = buffer->len; hb_glyph_info_t *info = buffer->info; @@ -380,10 +392,10 @@ end++; for (unsigned int j = start; j < i; j++) - info[j].mask |= c->plan->numr_mask | c->plan->frac_mask; + info[j].mask |= pre_mask; info[i].mask |= c->plan->frac_mask; for (unsigned int j = i + 1; j < end; j++) - info[j].mask |= c->plan->frac_mask | c->plan->dnom_mask; + info[j].mask |= post_mask; i = end - 1; }
diff --git a/third_party/harfbuzz-ng/src/hb-ot-tag.cc b/third_party/harfbuzz-ng/src/hb-ot-tag.cc index 5f21ac09..9b0db50 100644 --- a/third_party/harfbuzz-ng/src/hb-ot-tag.cc +++ b/third_party/harfbuzz-ng/src/hb-ot-tag.cc
@@ -28,9 +28,6 @@ #include "hb-private.hh" -#include <string.h> - - /* hb_script_t */ @@ -201,6 +198,7 @@ {"alt", HB_TAG('A','L','T',' ')}, /* [Southern] Altai */ {"am", HB_TAG('A','M','H',' ')}, /* Amharic */ {"amf", HB_TAG('H','B','N',' ')}, /* Hammer-Banna */ + {"amw", HB_TAG('S','Y','R',' ')}, /* Western Neo-Aramaic */ {"an", HB_TAG('A','R','G',' ')}, /* Aragonese */ {"ang", HB_TAG('A','N','G',' ')}, /* Old English (ca. 450-1100) */ {"ar", HB_TAG('A','R','A',' ')}, /* Arabic [macrolanguage] */ @@ -239,6 +237,7 @@ {"bg", HB_TAG('B','G','R',' ')}, /* Bulgarian */ {"bgc", HB_TAG('B','G','C',' ')}, /* Haryanvi */ {"bgq", HB_TAG('B','G','Q',' ')}, /* Bagri */ + {"bgr", HB_TAG('Q','I','N',' ')}, /* Bawm Chin */ {"bhb", HB_TAG('B','H','I',' ')}, /* Bhili */ {"bhk", HB_TAG('B','I','K',' ')}, /* Albay Bicolano (retired code) */ {"bho", HB_TAG('B','H','O',' ')}, /* Bhojpuri */ @@ -270,8 +269,10 @@ {"ca", HB_TAG('C','A','T',' ')}, /* Catalan */ {"cak", HB_TAG('C','A','K',' ')}, /* Kaqchikel */ {"cbk", HB_TAG('C','B','K',' ')}, /* Chavacano */ + {"cbl", HB_TAG('Q','I','N',' ')}, /* Bualkhaw Chin */ {"ce", HB_TAG('C','H','E',' ')}, /* Chechen */ {"ceb", HB_TAG('C','E','B',' ')}, /* Cebuano */ + {"cfm", HB_TAG('H','A','L',' ')}, /* Halam/Falam Chin */ {"cgg", HB_TAG('C','G','G',' ')}, /* Chiga */ {"ch", HB_TAG('C','H','A',' ')}, /* Chamorro */ {"chk", HB_TAG('C','H','K','0')}, /* Chuukese */ @@ -279,8 +280,17 @@ {"chp", HB_TAG('C','H','P',' ')}, /* Chipewyan */ {"chr", HB_TAG('C','H','R',' ')}, /* Cherokee */ {"chy", HB_TAG('C','H','Y',' ')}, /* Cheyenne */ + {"cja", HB_TAG('C','J','A',' ')}, /* Western Cham */ + {"cjm", HB_TAG('C','J','M',' ')}, /* Eastern Cham */ + {"cka", HB_TAG('Q','I','N',' ')}, /* Khumi Awa Chin */ {"ckb", HB_TAG('K','U','R',' ')}, /* Central Kurdish (Sorani) */ {"ckt", HB_TAG('C','H','K',' ')}, /* Chukchi */ + {"cld", HB_TAG('S','Y','R',' ')}, /* Chaldean Neo-Aramaic */ + {"cmr", HB_TAG('Q','I','N',' ')}, /* Mro-Khimi Chin */ + {"cnb", HB_TAG('Q','I','N',' ')}, /* Chinbon Chin */ + {"cnh", HB_TAG('Q','I','N',' ')}, /* Hakha Chin */ + {"cnk", HB_TAG('Q','I','N',' ')}, /* Khumi Chin */ + {"cnw", HB_TAG('Q','I','N',' ')}, /* Ngawn Chin */ {"cop", HB_TAG('C','O','P',' ')}, /* Coptic */ {"cpp", HB_TAG('C','P','P',' ')}, /* Creoles */ {"cr", HB_TAG('C','R','E',' ')}, /* Cree */ @@ -293,6 +303,9 @@ {"crx", HB_TAG('C','R','R',' ')}, /* Carrier */ {"cs", HB_TAG('C','S','Y',' ')}, /* Czech */ {"csb", HB_TAG('C','S','B',' ')}, /* Kashubian */ + {"csh", HB_TAG('Q','I','N',' ')}, /* Asho Chin */ + {"csy", HB_TAG('Q','I','N',' ')}, /* Siyin Chin */ + {"ctd", HB_TAG('Q','I','N',' ')}, /* Tedim Chin */ {"ctg", HB_TAG('C','T','G',' ')}, /* Chittagonian */ {"cts", HB_TAG('B','I','K',' ')}, /* Northern Catanduanes Bikol */ {"cu", HB_TAG('C','S','L',' ')}, /* Church Slavic */ @@ -300,7 +313,9 @@ {"cv", HB_TAG('C','H','U',' ')}, /* Chuvash */ {"cwd", HB_TAG('D','C','R',' ')}, /* Woods Cree */ {"cy", HB_TAG('W','E','L',' ')}, /* Welsh */ + {"czt", HB_TAG('Q','I','N',' ')}, /* Zotung Chin */ {"da", HB_TAG('D','A','N',' ')}, /* Danish */ + {"dao", HB_TAG('Q','I','N',' ')}, /* Daai Chin */ {"dap", HB_TAG('N','I','S',' ')}, /* Nisi (India) */ {"dar", HB_TAG('D','A','R',' ')}, /* Dargwa */ {"dax", HB_TAG('D','A','X',' ')}, /* Dayi */ @@ -343,7 +358,7 @@ {"fi", HB_TAG('F','I','N',' ')}, /* Finnish */ {"fil", HB_TAG('P','I','L',' ')}, /* Filipino */ {"fj", HB_TAG('F','J','I',' ')}, /* Fijian */ - {"flm", HB_TAG('H','A','L',' ')}, /* Halam */ + {"flm", HB_TAG('H','A','L',' ')}, /* Halam/Falam Chin [retired ISO639 code] */ {"fo", HB_TAG('F','O','S',' ')}, /* Faroese */ {"fon", HB_TAG('F','O','N',' ')}, /* Fon */ {"fr", HB_TAG('F','R','A',' ')}, /* French */ @@ -390,6 +405,7 @@ {"he", HB_TAG('I','W','R',' ')}, /* Hebrew */ {"hi", HB_TAG('H','I','N',' ')}, /* Hindi */ {"hil", HB_TAG('H','I','L',' ')}, /* Hiligaynon */ + {"hlt", HB_TAG('Q','I','N',' ')}, /* Matu Chin */ {"hmn", HB_TAG('H','M','N',' ')}, /* Hmong */ {"hnd", HB_TAG('H','N','D',' ')}, /* [Southern] Hindko */ {"hne", HB_TAG('C','H','H',' ')}, /* Chattisgarhi */ @@ -553,6 +569,7 @@ {"mos", HB_TAG('M','O','S',' ')}, /* Mossi */ {"mpe", HB_TAG('M','A','J',' ')}, /* Majang */ {"mr", HB_TAG('M','A','R',' ')}, /* Marathi */ + {"mrh", HB_TAG('Q','I','N',' ')}, /* Mara Chin */ {"mrj", HB_TAG('H','M','A',' ')}, /* High Mari */ {"ms", HB_TAG('M','L','Y',' ')}, /* Malay [macrolanguage] */ {"msc", HB_TAG('M','N','K',' ')}, /* Sankaran Maninka */ @@ -617,6 +634,7 @@ {"pcc", HB_TAG('P','C','C',' ')}, /* Bouyei */ {"pcd", HB_TAG('P','C','D',' ')}, /* Picard */ {"pce", HB_TAG('P','L','G',' ')}, /* [Ruching] Palaung */ + {"pck", HB_TAG('Q','I','N',' ')}, /* Paite Chin */ {"pdc", HB_TAG('P','D','C',' ')}, /* Pennsylvania German */ {"pes", HB_TAG('F','A','R',' ')}, /* Iranian Persian */ {"phk", HB_TAG('P','H','K',' ')}, /* Phake */ @@ -674,6 +692,7 @@ {"se", HB_TAG('N','S','M',' ')}, /* Northern Sami */ {"seh", HB_TAG('S','N','A',' ')}, /* Sena */ {"sel", HB_TAG('S','E','L',' ')}, /* Selkup */ + {"sez", HB_TAG('Q','I','N',' ')}, /* Senthang Chin */ {"sg", HB_TAG('S','G','O',' ')}, /* Sango */ {"sga", HB_TAG('S','G','A',' ')}, /* Old Irish (to 900) */ {"sgs", HB_TAG('S','G','S',' ')}, /* Samogitian */ @@ -713,12 +732,15 @@ {"swh", HB_TAG('S','W','K',' ')}, /* Kiswahili/Swahili */ {"swv", HB_TAG('M','A','W',' ')}, /* Shekhawati */ {"sxu", HB_TAG('S','X','U',' ')}, /* Upper Saxon */ + {"syc", HB_TAG('S','Y','R',' ')}, /* Classical Syriac */ {"syl", HB_TAG('S','Y','L',' ')}, /* Sylheti */ {"syr", HB_TAG('S','Y','R',' ')}, /* Syriac [macrolanguage] */ {"szl", HB_TAG('S','Z','L',' ')}, /* Silesian */ {"ta", HB_TAG('T','A','M',' ')}, /* Tamil */ {"tab", HB_TAG('T','A','B',' ')}, /* Tabasaran */ + {"tcp", HB_TAG('Q','I','N',' ')}, /* Tawr Chin */ {"tcy", HB_TAG('T','U','L',' ')}, /* Tulu */ + {"tcz", HB_TAG('Q','I','N',' ')}, /* Thado Chin */ {"tdd", HB_TAG('T','D','D',' ')}, /* Tai Nüa */ {"te", HB_TAG('T','E','L',' ')}, /* Telugu */ {"tem", HB_TAG('T','M','N',' ')}, /* Temne */ @@ -786,11 +808,13 @@ {"yap", HB_TAG('Y','A','P',' ')}, /* Yapese */ {"yi", HB_TAG('J','I','I',' ')}, /* Yiddish [macrolanguage] */ {"yo", HB_TAG('Y','B','A',' ')}, /* Yoruba */ + {"yos", HB_TAG('Q','I','N',' ')}, /* Yos, deprecated by IANA in favor of Zou [zom] */ {"yso", HB_TAG('N','I','S',' ')}, /* Nisi (China) */ {"za", HB_TAG('Z','H','A',' ')}, /* Chuang/Zhuang [macrolanguage] */ {"zea", HB_TAG('Z','E','A',' ')}, /* Zeeuws */ {"zgh", HB_TAG('Z','G','H',' ')}, /* Standard Morrocan Tamazigh */ {"zne", HB_TAG('Z','N','D',' ')}, /* Zande */ + {"zom", HB_TAG('Q','I','N',' ')}, /* Zou */ {"zu", HB_TAG('Z','U','L',' ')}, /* Zulu */ {"zum", HB_TAG('L','R','C',' ')}, /* Kumzari */ {"zza", HB_TAG('Z','Z','A',' ')}, /* Zazaki */ @@ -907,6 +931,30 @@ return HB_TAG('A','P','P','H'); /* Phonetic transcription—Americanist conventions */ } + /* + * "Syre" is a BCP-47 script tag, meaning the Estrangela variant of the Syriac script. + * It can be applied to any language. + */ + if (strstr (lang_str, "-syre")) { + return HB_TAG('S','Y','R','E'); /* Estrangela Syriac */ + } + + /* + * "Syrj" is a BCP-47 script tag, meaning the Western variant of the Syriac script. + * It can be applied to any language. + */ + if (strstr (lang_str, "-syrj")) { + return HB_TAG('S','Y','R','J'); /* Western Syriac */ + } + + /* + * "Syrn" is a BCP-47 script tag, meaning the Eastern variant of the Syriac script. + * It can be applied to any language. + */ + if (strstr (lang_str, "-syrn")) { + return HB_TAG('S','Y','R','N'); /* Eastern Syriac */ + } + /* Find a language matching in the first component */ { const LangTag *lang_tag; @@ -962,6 +1010,22 @@ if (tag == HB_OT_TAG_DEFAULT_LANGUAGE) return NULL; + /* struct LangTag has only room for 3-letter language tags. */ + switch (tag) { + case HB_TAG('A','P','P','H'): /* Phonetic transcription—Americanist conventions */ + return hb_language_from_string ("und-fonnapa", -1); + case HB_TAG('I','P','P','H'): /* Phonetic transcription—IPA conventions */ + return hb_language_from_string ("und-fonipa", -1); + case HB_TAG('S','Y','R',' '): /* Syriac [macrolanguage] */ + return hb_language_from_string ("syr", -1); + case HB_TAG('S','Y','R','E'): /* Estrangela Syriac */ + return hb_language_from_string ("und-Syre", -1); + case HB_TAG('S','Y','R','J'): /* Western Syriac */ + return hb_language_from_string ("und-Syrj", -1); + case HB_TAG('S','Y','R','N'): /* Eastern Syriac */ + return hb_language_from_string ("und-Syrn", -1); + } + for (i = 0; i < ARRAY_LENGTH (ot_languages); i++) if (ot_languages[i].tag == tag) return hb_language_from_string (ot_languages[i].language, -1); @@ -976,14 +1040,6 @@ } } - /* struct LangTag has only room for 3-letter language tags. */ - switch (tag) { - case HB_TAG('A','P','P','H'): /* Phonetic transcription—Americanist conventions */ - return hb_language_from_string ("und-fonnapa", -1); - case HB_TAG('I','P','P','H'): /* Phonetic transcription—IPA conventions */ - return hb_language_from_string ("und-fonipa", -1); - } - /* Else return a custom language in the form of "x-hbotABCD" */ { unsigned char buf[11] = "x-hbot";
diff --git a/third_party/harfbuzz-ng/src/hb-ot-var-avar-table.hh b/third_party/harfbuzz-ng/src/hb-ot-var-avar-table.hh new file mode 100644 index 0000000..ace0f5f --- /dev/null +++ b/third_party/harfbuzz-ng/src/hb-ot-var-avar-table.hh
@@ -0,0 +1,144 @@ +/* + * Copyright © 2017 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_VAR_AVAR_TABLE_HH +#define HB_OT_VAR_AVAR_TABLE_HH + +#include "hb-open-type-private.hh" + +namespace OT { + + +struct AxisValueMap +{ + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this)); + } + + public: + F2DOT14 fromCoord; /* A normalized coordinate value obtained using + * default normalization. */ + F2DOT14 toCoord; /* The modified, normalized coordinate value. */ + + public: + DEFINE_SIZE_STATIC (4); +}; + +struct SegmentMaps : ArrayOf<AxisValueMap> +{ + inline int map (int value) const + { + /* The following special-cases are not part of OpenType, which requires + * that at least -1, 0, and +1 must be mapped. But we include these as + * part of a better error recovery scheme. */ + + if (!len) + return value; + + if (value <= array[0].fromCoord) + return value - array[0].fromCoord + array[0].toCoord; + + unsigned int i; + unsigned int count = len; + for (i = 1; i < count && value > array[i].fromCoord; i++) + ; + + if (value >= array[i].fromCoord) + return value - array[i].fromCoord + array[i].toCoord; + + if (unlikely (array[i-1].fromCoord == array[i].fromCoord)) + return array[i-1].toCoord; + + int denom = array[i].fromCoord - array[i-1].fromCoord; + return array[i-1].toCoord + + (array[i].toCoord - array[i-1].toCoord) * + (value - array[i-1].fromCoord + denom/2) / denom; + } + + DEFINE_SIZE_ARRAY (2, array); +}; + +/* + * avar — Axis Variations Table + */ + +#define HB_OT_TAG_avar HB_TAG('a','v','a','r') + +struct avar +{ + static const hb_tag_t tableTag = HB_OT_TAG_avar; + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + if (unlikely (!(version.sanitize (c) && + version.major == 1 && + c->check_struct (this)))) + return_trace (false); + + const SegmentMaps *map = &axisSegmentMapsZ; + unsigned int count = axisCount; + for (unsigned int i = 0; i < count; i++) + { + if (unlikely (!map->sanitize (c))) + return_trace (false); + map = &StructAfter<SegmentMaps> (*map); + } + + return_trace (true); + } + + inline void map_coords (int *coords, unsigned int coords_length) const + { + unsigned int count = MIN<unsigned int> (coords_length, axisCount); + + const SegmentMaps *map = &axisSegmentMapsZ; + for (unsigned int i = 0; i < count; i++) + { + coords[i] = map->map (coords[i]); + map = &StructAfter<SegmentMaps> (*map); + } + } + + protected: + FixedVersion<>version; /* Version of the avar table + * initially set to 0x00010000u */ + USHORT reserved; /* This field is permanently reserved. Set to 0. */ + USHORT axisCount; /* The number of variation axes in the font. This + * must be the same number as axisCount in the + * 'fvar' table. */ + SegmentMaps axisSegmentMapsZ; + + public: + DEFINE_SIZE_MIN (8); +}; + +} /* namespace OT */ + + +#endif /* HB_OT_VAR_AVAR_TABLE_HH */
diff --git a/third_party/harfbuzz-ng/src/hb-ot-var-fvar-table.hh b/third_party/harfbuzz-ng/src/hb-ot-var-fvar-table.hh new file mode 100644 index 0000000..9f6fb32 --- /dev/null +++ b/third_party/harfbuzz-ng/src/hb-ot-var-fvar-table.hh
@@ -0,0 +1,209 @@ +/* + * Copyright © 2017 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_VAR_FVAR_TABLE_HH +#define HB_OT_VAR_FVAR_TABLE_HH + +#include "hb-open-type-private.hh" + +namespace OT { + + +struct InstanceRecord +{ + inline bool sanitize (hb_sanitize_context_t *c, unsigned int axis_count) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && + c->check_array (coordinates, coordinates[0].static_size, axis_count)); + } + + protected: + USHORT subfamilyNameID;/* The name ID for entries in the 'name' table + * that provide subfamily names for this instance. */ + USHORT reserved; /* Reserved for future use — set to 0. */ + Fixed coordinates[VAR];/* The coordinates array for this instance. */ + //USHORT postScriptNameIDX;/*Optional. The name ID for entries in the 'name' + // * table that provide PostScript names for this + // * instance. */ + + public: + DEFINE_SIZE_ARRAY (4, coordinates); +}; + +struct AxisRecord +{ + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this)); + } + + public: + Tag axisTag; /* Tag identifying the design variation for the axis. */ + Fixed minValue; /* The minimum coordinate value for the axis. */ + Fixed defaultValue; /* The default coordinate value for the axis. */ + Fixed maxValue; /* The maximum coordinate value for the axis. */ + USHORT reserved; /* Reserved for future use — set to 0. */ + USHORT axisNameID; /* The name ID for entries in the 'name' table that + * provide a display name for this axis. */ + + public: + DEFINE_SIZE_STATIC (20); +}; + + +/* + * fvar — Font Variations Table + */ + +#define HB_OT_TAG_fvar HB_TAG('f','v','a','r') + +struct fvar +{ + static const hb_tag_t tableTag = HB_OT_TAG_fvar; + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (version.sanitize (c) && + likely (version.major == 1) && + c->check_struct (this) && + instanceSize >= axisCount * 4 + 4 && + axisSize <= 1024 && /* Arbitrary, just to simplify overflow checks. */ + instanceSize <= 1024 && /* Arbitrary, just to simplify overflow checks. */ + c->check_range (this, things) && + c->check_range (&StructAtOffset<char> (this, things), + axisCount * axisSize + instanceCount * instanceSize)); + } + + inline unsigned int get_axis_count (void) const + { return axisCount; } + + inline bool get_axis (unsigned int index, hb_ot_var_axis_t *info) const + { + if (unlikely (index >= axisCount)) + return false; + + if (info) + { + const AxisRecord &axis = get_axes ()[index]; + info->tag = axis.axisTag; + info->name_id = axis.axisNameID; + info->default_value = axis.defaultValue / 65536.; + /* Ensure order, to simplify client math. */ + info->min_value = MIN<float> (info->default_value, axis.minValue / 65536.); + info->max_value = MAX<float> (info->default_value, axis.maxValue / 65536.); + } + + return true; + } + + inline unsigned int get_axis_infos (unsigned int start_offset, + unsigned int *axes_count /* IN/OUT */, + hb_ot_var_axis_t *axes_array /* OUT */) const + { + if (axes_count) + { + unsigned int count = axisCount; + start_offset = MIN (start_offset, count); + + count -= start_offset; + axes_array += start_offset; + + count = MIN (count, *axes_count); + *axes_count = count; + + for (unsigned int i = 0; i < count; i++) + get_axis (start_offset + i, axes_array + i); + } + return axisCount; + } + + inline bool find_axis (hb_tag_t tag, unsigned int *index, hb_ot_var_axis_t *info) const + { + const AxisRecord *axes = get_axes (); + unsigned int count = get_axis_count (); + for (unsigned int i = 0; i < count; i++) + if (axes[i].axisTag == tag) + { + if (index) + *index = i; + return get_axis (i, info); + } + if (index) + *index = HB_OT_VAR_NO_AXIS_INDEX; + return false; + } + + inline int normalize_axis_value (unsigned int axis_index, float v) const + { + hb_ot_var_axis_t axis; + if (!get_axis (axis_index, &axis)) + return 0; + + v = MAX (MIN (v, axis.max_value), axis.min_value); /* Clamp. */ + + if (v == axis.default_value) + return 0; + else if (v < axis.default_value) + v = (v - axis.default_value) / (axis.default_value - axis.min_value); + else + v = (v - axis.default_value) / (axis.max_value - axis.default_value); + return (int) (v * 16384. + (v >= 0. ? .5 : -.5)); + } + + protected: + inline const AxisRecord * get_axes (void) const + { return &StructAtOffset<AxisRecord> (this, things); } + + inline const InstanceRecord * get_instances (void) const + { return &StructAtOffset<InstanceRecord> (get_axes () + axisCount, 0); } + + protected: + FixedVersion<>version; /* Version of the fvar table + * initially set to 0x00010000u */ + Offset<> things; /* Offset in bytes from the beginning of the table + * to the start of the AxisRecord array. */ + USHORT reserved; /* This field is permanently reserved. Set to 2. */ + USHORT axisCount; /* The number of variation axes in the font (the + * number of records in the axes array). */ + USHORT axisSize; /* The size in bytes of each VariationAxisRecord — + * set to 20 (0x0014) for this version. */ + USHORT instanceCount; /* The number of named instances defined in the font + * (the number of records in the instances array). */ + USHORT instanceSize; /* The size in bytes of each InstanceRecord — set + * to either axisCount * sizeof(Fixed) + 4, or to + * axisCount * sizeof(Fixed) + 6. */ + + public: + DEFINE_SIZE_STATIC (16); +}; + +} /* namespace OT */ + + +#endif /* HB_OT_VAR_FVAR_TABLE_HH */
diff --git a/third_party/harfbuzz-ng/src/hb-ot-var-hvar-table.hh b/third_party/harfbuzz-ng/src/hb-ot-var-hvar-table.hh new file mode 100644 index 0000000..3a2a8203 --- /dev/null +++ b/third_party/harfbuzz-ng/src/hb-ot-var-hvar-table.hh
@@ -0,0 +1,165 @@ +/* + * Copyright © 2017 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_VAR_HVAR_TABLE_HH +#define HB_OT_VAR_HVAR_TABLE_HH + +#include "hb-ot-layout-common-private.hh" + + +namespace OT { + + +struct DeltaSetIndexMap +{ + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && + c->check_array (mapData, get_width (), mapCount)); + } + + unsigned int map (unsigned int v) const /* Returns 16.16 outer.inner. */ + { + /* If count is zero, pass value unchanged. This takes + * care of direct mapping for advance map. */ + if (!mapCount) + return v; + + if (v >= mapCount) + v = mapCount - 1; + + unsigned int u = 0; + { /* Fetch it. */ + unsigned int w = get_width (); + const BYTE *p = mapData + w * v; + for (; w; w--) + u = (u << 8) + *p++; + } + + { /* Repack it. */ + unsigned int n = get_inner_bitcount (); + unsigned int outer = u >> n; + unsigned int inner = u & ((1 << n) - 1); + u = (outer<<16) | inner; + } + + return u; + } + + protected: + inline unsigned int get_width (void) const + { return ((format >> 4) & 3) + 1; } + + inline unsigned int get_inner_bitcount (void) const + { return (format & 0xF) + 1; } + + protected: + USHORT format; /* A packed field that describes the compressed + * representation of delta-set indices. */ + USHORT mapCount; /* The number of mapping entries. */ + BYTE mapData[VAR]; /* The delta-set index mapping data. */ + + public: + DEFINE_SIZE_ARRAY (4, mapData); +}; + + +/* + * HVAR -- The Horizontal Metrics Variations Table + * VVAR -- The Vertical Metrics Variations Table + */ + +#define HB_OT_TAG_HVAR HB_TAG('H','V','A','R') +#define HB_OT_TAG_VVAR HB_TAG('V','V','A','R') + +struct HVARVVAR +{ + static const hb_tag_t HVARTag = HB_OT_TAG_HVAR; + static const hb_tag_t VVARTag = HB_OT_TAG_VVAR; + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (version.sanitize (c) && + likely (version.major == 1) && + varStore.sanitize (c, this) && + advMap.sanitize (c, this) && + lsbMap.sanitize (c, this) && + rsbMap.sanitize (c, this)); + } + + inline float get_advance_var (hb_codepoint_t glyph, + int *coords, unsigned int coord_count) const + { + unsigned int varidx = (this+advMap).map (glyph); + return (this+varStore).get_delta (varidx, coords, coord_count); + } + + inline bool has_sidebearing_deltas (void) const + { return lsbMap && rsbMap; } + + protected: + FixedVersion<>version; /* Version of the metrics variation table + * initially set to 0x00010000u */ + LOffsetTo<VariationStore> + varStore; /* Offset to item variation store table. */ + LOffsetTo<DeltaSetIndexMap> + advMap; /* Offset to advance var-idx mapping. */ + LOffsetTo<DeltaSetIndexMap> + lsbMap; /* Offset to lsb/tsb var-idx mapping. */ + LOffsetTo<DeltaSetIndexMap> + rsbMap; /* Offset to rsb/bsb var-idx mapping. */ + + public: + DEFINE_SIZE_STATIC (20); +}; + +struct HVAR : HVARVVAR { + static const hb_tag_t tableTag = HB_OT_TAG_HVAR; +}; +struct VVAR : HVARVVAR { + static const hb_tag_t tableTag = HB_OT_TAG_VVAR; + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (static_cast<const HVARVVAR *> (this)->sanitize (c) && + vorgMap.sanitize (c, this)); + } + + protected: + LOffsetTo<DeltaSetIndexMap> + vorgMap; /* Offset to vertical-origin var-idx mapping. */ + + public: + DEFINE_SIZE_STATIC (24); +}; + +} /* namespace OT */ + + +#endif /* HB_OT_VAR_HVAR_TABLE_HH */
diff --git a/third_party/harfbuzz-ng/src/hb-ot-var.cc b/third_party/harfbuzz-ng/src/hb-ot-var.cc new file mode 100644 index 0000000..d4d16df --- /dev/null +++ b/third_party/harfbuzz-ng/src/hb-ot-var.cc
@@ -0,0 +1,160 @@ +/* + * Copyright © 2017 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#include "hb-open-type-private.hh" + +#include "hb-ot-layout-private.hh" +#include "hb-ot-var-avar-table.hh" +#include "hb-ot-var-fvar-table.hh" +#include "hb-ot-var.h" + +HB_SHAPER_DATA_ENSURE_DECLARE(ot, face) + +/* + * fvar/avar + */ + +static inline const OT::fvar& +_get_fvar (hb_face_t *face) +{ + if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return OT::Null(OT::fvar); + hb_ot_layout_t * layout = hb_ot_layout_from_face (face); + return *(layout->fvar.get ()); +} +static inline const OT::avar& +_get_avar (hb_face_t *face) +{ + if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return OT::Null(OT::avar); + hb_ot_layout_t * layout = hb_ot_layout_from_face (face); + return *(layout->avar.get ()); +} + +/** + * hb_ot_var_has_data: + * @face: #hb_face_t to test + * + * This function allows to verify the presence of OpenType variation data on the face. + * Alternatively, use hb_ot_var_get_axis_count(). + * + * Return value: true if face has a `fvar' table and false otherwise + * + * Since: 1.4.2 + **/ +hb_bool_t +hb_ot_var_has_data (hb_face_t *face) +{ + return &_get_fvar (face) != &OT::Null(OT::fvar); +} + +/** + * hb_ot_var_get_axis_count: + * + * Since: 1.4.2 + **/ +unsigned int +hb_ot_var_get_axis_count (hb_face_t *face) +{ + const OT::fvar &fvar = _get_fvar (face); + return fvar.get_axis_count (); +} + +/** + * hb_ot_var_get_axes: + * + * Since: 1.4.2 + **/ +unsigned int +hb_ot_var_get_axes (hb_face_t *face, + unsigned int start_offset, + unsigned int *axes_count /* IN/OUT */, + hb_ot_var_axis_t *axes_array /* OUT */) +{ + const OT::fvar &fvar = _get_fvar (face); + return fvar.get_axis_infos (start_offset, axes_count, axes_array); +} + +/** + * hb_ot_var_find_axis: + * + * Since: 1.4.2 + **/ +hb_bool_t +hb_ot_var_find_axis (hb_face_t *face, + hb_tag_t axis_tag, + unsigned int *axis_index, + hb_ot_var_axis_t *axis_info) +{ + const OT::fvar &fvar = _get_fvar (face); + return fvar.find_axis (axis_tag, axis_index, axis_info); +} + + +/** + * hb_ot_var_normalize_variations: + * + * Since: 1.4.2 + **/ +void +hb_ot_var_normalize_variations (hb_face_t *face, + const hb_variation_t *variations, /* IN */ + unsigned int variations_length, + int *coords, /* OUT */ + unsigned int coords_length) +{ + for (unsigned int i = 0; i < coords_length; i++) + coords[i] = 0; + + const OT::fvar &fvar = _get_fvar (face); + for (unsigned int i = 0; i < variations_length; i++) + { + unsigned int axis_index; + if (hb_ot_var_find_axis (face, variations[i].tag, &axis_index, NULL) && + axis_index < coords_length) + coords[axis_index] = fvar.normalize_axis_value (axis_index, variations[i].value); + } + + const OT::avar &avar = _get_avar (face); + avar.map_coords (coords, coords_length); +} + +/** + * hb_ot_var_normalize_coords: + * + * Since: 1.4.2 + **/ +void +hb_ot_var_normalize_coords (hb_face_t *face, + unsigned int coords_length, + const float *design_coords, /* IN */ + int *normalized_coords /* OUT */) +{ + const OT::fvar &fvar = _get_fvar (face); + for (unsigned int i = 0; i < coords_length; i++) + normalized_coords[i] = fvar.normalize_axis_value (i, design_coords[i]); + + const OT::avar &avar = _get_avar (face); + avar.map_coords (normalized_coords, coords_length); +}
diff --git a/third_party/harfbuzz-ng/src/hb-ot-var.h b/third_party/harfbuzz-ng/src/hb-ot-var.h new file mode 100644 index 0000000..a2c0c5f2 --- /dev/null +++ b/third_party/harfbuzz-ng/src/hb-ot-var.h
@@ -0,0 +1,105 @@ +/* + * Copyright © 2017 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_H_IN +#error "Include <hb-ot.h> instead." +#endif + +#ifndef HB_OT_VAR_H +#define HB_OT_VAR_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +#define HB_OT_TAG_VAR_AXIS_ITALIC HB_TAG('i','t','a','l') +#define HB_OT_TAG_VAR_AXIS_OPTICAL_SIZE HB_TAG('o','p','s','z') +#define HB_OT_TAG_VAR_AXIS_SLANT HB_TAG('s','l','n','t') +#define HB_OT_TAG_VAR_AXIS_WIDTH HB_TAG('w','d','t','h') +#define HB_OT_TAG_VAR_AXIS_WEIGHT HB_TAG('w','g','h','t') + + +/* + * fvar / avar + */ + +/** + * hb_ot_var_axis_t: + * + * Since: 1.4.2 + */ +typedef struct hb_ot_var_axis_t { + hb_tag_t tag; + unsigned int name_id; + float min_value; + float default_value; + float max_value; +} hb_ot_var_axis_t; + +HB_EXTERN hb_bool_t +hb_ot_var_has_data (hb_face_t *face); + +/** + * HB_OT_VAR_NO_AXIS_INDEX: + * + * Since: 1.4.2 + */ +#define HB_OT_VAR_NO_AXIS_INDEX 0xFFFFFFFFu + +HB_EXTERN unsigned int +hb_ot_var_get_axis_count (hb_face_t *face); + +HB_EXTERN unsigned int +hb_ot_var_get_axes (hb_face_t *face, + unsigned int start_offset, + unsigned int *axes_count /* IN/OUT */, + hb_ot_var_axis_t *axes_array /* OUT */); + +HB_EXTERN hb_bool_t +hb_ot_var_find_axis (hb_face_t *face, + hb_tag_t axis_tag, + unsigned int *axis_index, + hb_ot_var_axis_t *axis_info); + + +HB_EXTERN void +hb_ot_var_normalize_variations (hb_face_t *face, + const hb_variation_t *variations, /* IN */ + unsigned int variations_length, + int *coords, /* OUT */ + unsigned int coords_length); + +HB_EXTERN void +hb_ot_var_normalize_coords (hb_face_t *face, + unsigned int coords_length, + const float *design_coords, /* IN */ + int *normalized_coords /* OUT */); + + +HB_END_DECLS + +#endif /* HB_OT_VAR_H */
diff --git a/third_party/harfbuzz-ng/src/hb-ot.h b/third_party/harfbuzz-ng/src/hb-ot.h index 113e37b0..2120a3e 100644 --- a/third_party/harfbuzz-ng/src/hb-ot.h +++ b/third_party/harfbuzz-ng/src/hb-ot.h
@@ -35,6 +35,7 @@ #include "hb-ot-math.h" #include "hb-ot-tag.h" #include "hb-ot-shape.h" +#include "hb-ot-var.h" HB_BEGIN_DECLS
diff --git a/third_party/harfbuzz-ng/src/hb-set.cc b/third_party/harfbuzz-ng/src/hb-set.cc index cb7fcdb..f3fe1ba4 100644 --- a/third_party/harfbuzz-ng/src/hb-set.cc +++ b/third_party/harfbuzz-ng/src/hb-set.cc
@@ -105,7 +105,7 @@ * @set: a set. * @key: * @data: - * @destroy (closure data): + * @destroy: * @replace: * * Return value:
diff --git a/third_party/harfbuzz-ng/src/hb-shape.cc b/third_party/harfbuzz-ng/src/hb-shape.cc index 706f144..f080a15e 100644 --- a/third_party/harfbuzz-ng/src/hb-shape.cc +++ b/third_party/harfbuzz-ng/src/hb-shape.cc
@@ -45,254 +45,6 @@ * contains the output glyphs and their positions. **/ -static bool -parse_space (const char **pp, const char *end) -{ - while (*pp < end && ISSPACE (**pp)) - (*pp)++; - return true; -} - -static bool -parse_char (const char **pp, const char *end, char c) -{ - parse_space (pp, end); - - if (*pp == end || **pp != c) - return false; - - (*pp)++; - return true; -} - -static bool -parse_uint (const char **pp, const char *end, unsigned int *pv) -{ - char buf[32]; - unsigned int len = MIN (ARRAY_LENGTH (buf) - 1, (unsigned int) (end - *pp)); - strncpy (buf, *pp, len); - buf[len] = '\0'; - - char *p = buf; - char *pend = p; - unsigned int v; - - /* Intentionally use strtol instead of strtoul, such that - * -1 turns into "big number"... */ - errno = 0; - v = strtol (p, &pend, 0); - if (errno || p == pend) - return false; - - *pv = v; - *pp += pend - p; - return true; -} - -static bool -parse_bool (const char **pp, const char *end, unsigned int *pv) -{ - parse_space (pp, end); - - const char *p = *pp; - while (*pp < end && ISALPHA(**pp)) - (*pp)++; - - /* CSS allows on/off as aliases 1/0. */ - if (*pp - p == 2 || 0 == strncmp (p, "on", 2)) - *pv = 1; - else if (*pp - p == 3 || 0 == strncmp (p, "off", 2)) - *pv = 0; - else - return false; - - return true; -} - -static bool -parse_feature_value_prefix (const char **pp, const char *end, hb_feature_t *feature) -{ - if (parse_char (pp, end, '-')) - feature->value = 0; - else { - parse_char (pp, end, '+'); - feature->value = 1; - } - - return true; -} - -static bool -parse_feature_tag (const char **pp, const char *end, hb_feature_t *feature) -{ - parse_space (pp, end); - - char quote = 0; - - if (*pp < end && (**pp == '\'' || **pp == '"')) - { - quote = **pp; - (*pp)++; - } - - const char *p = *pp; - while (*pp < end && ISALNUM(**pp)) - (*pp)++; - - if (p == *pp || *pp - p > 4) - return false; - - feature->tag = hb_tag_from_string (p, *pp - p); - - if (quote) - { - /* CSS expects exactly four bytes. And we only allow quotations for - * CSS compatibility. So, enforce the length. */ - if (*pp - p != 4) - return false; - if (*pp == end || **pp != quote) - return false; - (*pp)++; - } - - return true; -} - -static bool -parse_feature_indices (const char **pp, const char *end, hb_feature_t *feature) -{ - parse_space (pp, end); - - bool has_start; - - feature->start = 0; - feature->end = (unsigned int) -1; - - if (!parse_char (pp, end, '[')) - return true; - - has_start = parse_uint (pp, end, &feature->start); - - if (parse_char (pp, end, ':')) { - parse_uint (pp, end, &feature->end); - } else { - if (has_start) - feature->end = feature->start + 1; - } - - return parse_char (pp, end, ']'); -} - -static bool -parse_feature_value_postfix (const char **pp, const char *end, hb_feature_t *feature) -{ - bool had_equal = parse_char (pp, end, '='); - bool had_value = parse_uint (pp, end, &feature->value) || - parse_bool (pp, end, &feature->value); - /* CSS doesn't use equal-sign between tag and value. - * If there was an equal-sign, then there *must* be a value. - * A value without an eqaul-sign is ok, but not required. */ - return !had_equal || had_value; -} - - -static bool -parse_one_feature (const char **pp, const char *end, hb_feature_t *feature) -{ - return parse_feature_value_prefix (pp, end, feature) && - parse_feature_tag (pp, end, feature) && - parse_feature_indices (pp, end, feature) && - parse_feature_value_postfix (pp, end, feature) && - parse_space (pp, end) && - *pp == end; -} - -/** - * hb_feature_from_string: - * @str: (array length=len) (element-type uint8_t): a string to parse - * @len: length of @str, or -1 if string is %NULL terminated - * @feature: (out): the #hb_feature_t to initialize with the parsed values - * - * Parses a string into a #hb_feature_t. - * - * TODO: document the syntax here. - * - * Return value: - * %true if @str is successfully parsed, %false otherwise. - * - * Since: 0.9.5 - **/ -hb_bool_t -hb_feature_from_string (const char *str, int len, - hb_feature_t *feature) -{ - hb_feature_t feat; - - if (len < 0) - len = strlen (str); - - if (likely (parse_one_feature (&str, str + len, &feat))) - { - if (feature) - *feature = feat; - return true; - } - - if (feature) - memset (feature, 0, sizeof (*feature)); - return false; -} - -/** - * hb_feature_to_string: - * @feature: an #hb_feature_t to convert - * @buf: (array length=size) (out): output string - * @size: the allocated size of @buf - * - * Converts a #hb_feature_t into a %NULL-terminated string in the format - * understood by hb_feature_from_string(). The client in responsible for - * allocating big enough size for @buf, 128 bytes is more than enough. - * - * Since: 0.9.5 - **/ -void -hb_feature_to_string (hb_feature_t *feature, - char *buf, unsigned int size) -{ - if (unlikely (!size)) return; - - char s[128]; - unsigned int len = 0; - if (feature->value == 0) - s[len++] = '-'; - hb_tag_to_string (feature->tag, s + len); - len += 4; - while (len && s[len - 1] == ' ') - len--; - if (feature->start != 0 || feature->end != (unsigned int) -1) - { - s[len++] = '['; - if (feature->start) - len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%u", feature->start)); - if (feature->end != feature->start + 1) { - s[len++] = ':'; - if (feature->end != (unsigned int) -1) - len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%u", feature->end)); - } - s[len++] = ']'; - } - if (feature->value > 1) - { - s[len++] = '='; - len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%u", feature->value)); - } - assert (len < ARRAY_LENGTH (s)); - len = MIN (len, size - 1); - memcpy (buf, s, len); - buf[len] = '\0'; -} - - static const char **static_shaper_list; #ifdef HB_USE_ATEXIT @@ -362,7 +114,7 @@ * shapers will be used in the given order, otherwise the default shapers list * will be used. * - * Return value: %FALSE if all shapers failed, %TRUE otherwise + * Return value: false if all shapers failed, true otherwise * * Since: 0.9.2 **/
diff --git a/third_party/harfbuzz-ng/src/hb-shape.h b/third_party/harfbuzz-ng/src/hb-shape.h index 53bb845..39507ff74 100644 --- a/third_party/harfbuzz-ng/src/hb-shape.h +++ b/third_party/harfbuzz-ng/src/hb-shape.h
@@ -40,22 +40,6 @@ HB_BEGIN_DECLS -typedef struct hb_feature_t { - hb_tag_t tag; - uint32_t value; - unsigned int start; - unsigned int end; -} hb_feature_t; - -HB_EXTERN hb_bool_t -hb_feature_from_string (const char *str, int len, - hb_feature_t *feature); - -HB_EXTERN void -hb_feature_to_string (hb_feature_t *feature, - char *buf, unsigned int size); - - HB_EXTERN void hb_shape (hb_font_t *font, hb_buffer_t *buffer,
diff --git a/third_party/harfbuzz-ng/src/hb-version.h b/third_party/harfbuzz-ng/src/hb-version.h index 0cbe9470..df83a8af 100644 --- a/third_party/harfbuzz-ng/src/hb-version.h +++ b/third_party/harfbuzz-ng/src/hb-version.h
@@ -38,9 +38,9 @@ #define HB_VERSION_MAJOR 1 #define HB_VERSION_MINOR 4 -#define HB_VERSION_MICRO 1 +#define HB_VERSION_MICRO 2 -#define HB_VERSION_STRING "1.4.1" +#define HB_VERSION_STRING "1.4.2" #define HB_VERSION_ATLEAST(major,minor,micro) \ ((major)*10000+(minor)*100+(micro) <= \
diff --git a/third_party/wayland-protocols/BUILD.gn b/third_party/wayland-protocols/BUILD.gn index d8a513d..df484b9 100644 --- a/third_party/wayland-protocols/BUILD.gn +++ b/third_party/wayland-protocols/BUILD.gn
@@ -10,7 +10,10 @@ sources = [ "include/protocol/xdg-shell-unstable-v5-client-protocol.h", "include/protocol/xdg-shell-unstable-v5-server-protocol.h", - "protocol/xdg-shell-protocol.c", + "include/protocol/xdg-shell-unstable-v6-client-protocol.h", + "include/protocol/xdg-shell-unstable-v6-server-protocol.h", + "protocol/xdg-shell-v5-protocol.c", + "protocol/xdg-shell-v6-protocol.c", ] deps = [
diff --git a/third_party/wayland-protocols/README.chromium b/third_party/wayland-protocols/README.chromium index 32a9ba6d..48968e7 100644 --- a/third_party/wayland-protocols/README.chromium +++ b/third_party/wayland-protocols/README.chromium
@@ -16,9 +16,12 @@ - Checkout the latest release tag: git checkout 1.7 - Change the DEPS entry to the newly checked out commit. - Update generated files: - wayland-scanner code < src/unstable/xdg-shell/xdg-shell-unstable-v5.xml > protocol/xdg-shell-protocol.c + wayland-scanner code < src/unstable/xdg-shell/xdg-shell-unstable-v5.xml > protocol/xdg-shell-v5-protocol.c wayland-scanner server-header < src/unstable/xdg-shell/xdg-shell-unstable-v5.xml > include/protocol/xdg-shell-unstable-v5-server-protocol.h wayland-scanner client-header < src/unstable/xdg-shell/xdg-shell-unstable-v5.xml > include/protocol/xdg-shell-unstable-v5-client-protocol.h + wayland-scanner code < src/unstable/xdg-shell/xdg-shell-unstable-v6.xml > protocol/xdg-shell-v6-protocol.c + wayland-scanner server-header < src/unstable/xdg-shell/xdg-shell-unstable-v6.xml > include/protocol/xdg-shell-unstable-v6-server-protocol.h + wayland-scanner client-header < src/unstable/xdg-shell/xdg-shell-unstable-v6.xml > include/protocol/xdg-shell-unstable-v6-client-protocol.h wayland-scanner code < src/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml > protocol/linux-dmabuf-protocol.c wayland-scanner server-header < src/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml > include/protocol/linux-dmabuf-unstable-v1-server-protocol.h wayland-scanner client-header < src/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml > include/protocol/linux-dmabuf-unstable-v1-client-protocol.h
diff --git a/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-client-protocol.h b/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-client-protocol.h new file mode 100644 index 0000000..a3ea1a62 --- /dev/null +++ b/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-client-protocol.h
@@ -0,0 +1,1715 @@ +/* Generated by wayland-scanner 1.11.0 */ + +#ifndef XDG_SHELL_UNSTABLE_V6_CLIENT_PROTOCOL_H +#define XDG_SHELL_UNSTABLE_V6_CLIENT_PROTOCOL_H + +#include <stdint.h> +#include <stddef.h> +#include "wayland-client.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @page page_xdg_shell_unstable_v6 The xdg_shell_unstable_v6 protocol + * @section page_ifaces_xdg_shell_unstable_v6 Interfaces + * - @subpage page_iface_zxdg_shell_v6 - create desktop-style surfaces + * - @subpage page_iface_zxdg_positioner_v6 - child surface positioner + * - @subpage page_iface_zxdg_surface_v6 - desktop user interface surface base interface + * - @subpage page_iface_zxdg_toplevel_v6 - toplevel surface + * - @subpage page_iface_zxdg_popup_v6 - short-lived, popup surfaces for menus + * @section page_copyright_xdg_shell_unstable_v6 Copyright + * <pre> + * + * Copyright © 2008-2013 Kristian Høgsberg + * Copyright © 2013 Rafael Antognolli + * Copyright © 2013 Jasper St. Pierre + * Copyright © 2010-2013 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * </pre> + */ +struct wl_output; +struct wl_seat; +struct wl_surface; +struct zxdg_popup_v6; +struct zxdg_positioner_v6; +struct zxdg_shell_v6; +struct zxdg_surface_v6; +struct zxdg_toplevel_v6; + +/** + * @page page_iface_zxdg_shell_v6 zxdg_shell_v6 + * @section page_iface_zxdg_shell_v6_desc Description + * + * xdg_shell allows clients to turn a wl_surface into a "real window" + * which can be dragged, resized, stacked, and moved around by the + * user. Everything about this interface is suited towards traditional + * desktop environments. + * @section page_iface_zxdg_shell_v6_api API + * See @ref iface_zxdg_shell_v6. + */ +/** + * @defgroup iface_zxdg_shell_v6 The zxdg_shell_v6 interface + * + * xdg_shell allows clients to turn a wl_surface into a "real window" + * which can be dragged, resized, stacked, and moved around by the + * user. Everything about this interface is suited towards traditional + * desktop environments. + */ +extern const struct wl_interface zxdg_shell_v6_interface; +/** + * @page page_iface_zxdg_positioner_v6 zxdg_positioner_v6 + * @section page_iface_zxdg_positioner_v6_desc Description + * + * The xdg_positioner provides a collection of rules for the placement of a + * child surface relative to a parent surface. Rules can be defined to ensure + * the child surface remains within the visible area's borders, and to + * specify how the child surface changes its position, such as sliding along + * an axis, or flipping around a rectangle. + * + * See the various requests for details about possible rules. + * + * At the time of the request, the compositor makes a copy of the rules + * specified by the xdg_positioner. Thus, after the request is complete the + * xdg_positioner object can be destroyed or reused; further changes to the + * object will have no effect on previous usages. + * + * For an xdg_positioner object to be considered complete, it must have a + * non-zero size set by set_size, and a non-zero anchor rectangle set by + * set_anchor_rect. Passing an incomplete xdg_positioner object when + * positioning a surface raises an error. + * @section page_iface_zxdg_positioner_v6_api API + * See @ref iface_zxdg_positioner_v6. + */ +/** + * @defgroup iface_zxdg_positioner_v6 The zxdg_positioner_v6 interface + * + * The xdg_positioner provides a collection of rules for the placement of a + * child surface relative to a parent surface. Rules can be defined to ensure + * the child surface remains within the visible area's borders, and to + * specify how the child surface changes its position, such as sliding along + * an axis, or flipping around a rectangle. + * + * See the various requests for details about possible rules. + * + * At the time of the request, the compositor makes a copy of the rules + * specified by the xdg_positioner. Thus, after the request is complete the + * xdg_positioner object can be destroyed or reused; further changes to the + * object will have no effect on previous usages. + * + * For an xdg_positioner object to be considered complete, it must have a + * non-zero size set by set_size, and a non-zero anchor rectangle set by + * set_anchor_rect. Passing an incomplete xdg_positioner object when + * positioning a surface raises an error. + */ +extern const struct wl_interface zxdg_positioner_v6_interface; +/** + * @page page_iface_zxdg_surface_v6 zxdg_surface_v6 + * @section page_iface_zxdg_surface_v6_desc Description + * + * An interface that may be implemented by a wl_surface, for + * implementations that provide a desktop-style user interface. + * + * It provides a base set of functionality required to construct user + * interface elements requiring management by the compositor, such as + * toplevel windows, menus, etc. The types of functionality are split into + * xdg_surface roles. + * + * Creating an xdg_surface does not set the role for a wl_surface. In order + * to map an xdg_surface, the client must create a role-specific object + * using, e.g., get_toplevel, get_popup. The wl_surface for any given + * xdg_surface can have at most one role, and may not be assigned any role + * not based on xdg_surface. + * + * A role must be assigned before any other requests are made to the + * xdg_surface object. + * + * The client must call wl_surface.commit on the corresponding wl_surface + * for the xdg_surface state to take effect. + * + * Creating an xdg_surface from a wl_surface which has a buffer attached or + * committed is a client error, and any attempts by a client to attach or + * manipulate a buffer prior to the first xdg_surface.configure call must + * also be treated as errors. + * + * For a surface to be mapped by the compositor, the following conditions + * must be met: (1) the client has assigned a xdg_surface based role to the + * surface, (2) the client has set and committed the xdg_surface state and + * the role dependent state to the surface and (3) the client has committed a + * buffer to the surface. + * @section page_iface_zxdg_surface_v6_api API + * See @ref iface_zxdg_surface_v6. + */ +/** + * @defgroup iface_zxdg_surface_v6 The zxdg_surface_v6 interface + * + * An interface that may be implemented by a wl_surface, for + * implementations that provide a desktop-style user interface. + * + * It provides a base set of functionality required to construct user + * interface elements requiring management by the compositor, such as + * toplevel windows, menus, etc. The types of functionality are split into + * xdg_surface roles. + * + * Creating an xdg_surface does not set the role for a wl_surface. In order + * to map an xdg_surface, the client must create a role-specific object + * using, e.g., get_toplevel, get_popup. The wl_surface for any given + * xdg_surface can have at most one role, and may not be assigned any role + * not based on xdg_surface. + * + * A role must be assigned before any other requests are made to the + * xdg_surface object. + * + * The client must call wl_surface.commit on the corresponding wl_surface + * for the xdg_surface state to take effect. + * + * Creating an xdg_surface from a wl_surface which has a buffer attached or + * committed is a client error, and any attempts by a client to attach or + * manipulate a buffer prior to the first xdg_surface.configure call must + * also be treated as errors. + * + * For a surface to be mapped by the compositor, the following conditions + * must be met: (1) the client has assigned a xdg_surface based role to the + * surface, (2) the client has set and committed the xdg_surface state and + * the role dependent state to the surface and (3) the client has committed a + * buffer to the surface. + */ +extern const struct wl_interface zxdg_surface_v6_interface; +/** + * @page page_iface_zxdg_toplevel_v6 zxdg_toplevel_v6 + * @section page_iface_zxdg_toplevel_v6_desc Description + * + * This interface defines an xdg_surface role which allows a surface to, + * among other things, set window-like properties such as maximize, + * fullscreen, and minimize, set application-specific metadata like title and + * id, and well as trigger user interactive operations such as interactive + * resize and move. + * @section page_iface_zxdg_toplevel_v6_api API + * See @ref iface_zxdg_toplevel_v6. + */ +/** + * @defgroup iface_zxdg_toplevel_v6 The zxdg_toplevel_v6 interface + * + * This interface defines an xdg_surface role which allows a surface to, + * among other things, set window-like properties such as maximize, + * fullscreen, and minimize, set application-specific metadata like title and + * id, and well as trigger user interactive operations such as interactive + * resize and move. + */ +extern const struct wl_interface zxdg_toplevel_v6_interface; +/** + * @page page_iface_zxdg_popup_v6 zxdg_popup_v6 + * @section page_iface_zxdg_popup_v6_desc Description + * + * A popup surface is a short-lived, temporary surface. It can be used to + * implement for example menus, popovers, tooltips and other similar user + * interface concepts. + * + * A popup can be made to take an explicit grab. See xdg_popup.grab for + * details. + * + * When the popup is dismissed, a popup_done event will be sent out, and at + * the same time the surface will be unmapped. See the xdg_popup.popup_done + * event for details. + * + * Explicitly destroying the xdg_popup object will also dismiss the popup and + * unmap the surface. Clients that want to dismiss the popup when another + * surface of their own is clicked should dismiss the popup using the destroy + * request. + * + * The parent surface must have either the xdg_toplevel or xdg_popup surface + * role. + * + * A newly created xdg_popup will be stacked on top of all previously created + * xdg_popup surfaces associated with the same xdg_toplevel. + * + * The parent of an xdg_popup must be mapped (see the xdg_surface + * description) before the xdg_popup itself. + * + * The x and y arguments passed when creating the popup object specify + * where the top left of the popup should be placed, relative to the + * local surface coordinates of the parent surface. See + * xdg_surface.get_popup. + * + * The client must call wl_surface.commit on the corresponding wl_surface + * for the xdg_popup state to take effect. + * @section page_iface_zxdg_popup_v6_api API + * See @ref iface_zxdg_popup_v6. + */ +/** + * @defgroup iface_zxdg_popup_v6 The zxdg_popup_v6 interface + * + * A popup surface is a short-lived, temporary surface. It can be used to + * implement for example menus, popovers, tooltips and other similar user + * interface concepts. + * + * A popup can be made to take an explicit grab. See xdg_popup.grab for + * details. + * + * When the popup is dismissed, a popup_done event will be sent out, and at + * the same time the surface will be unmapped. See the xdg_popup.popup_done + * event for details. + * + * Explicitly destroying the xdg_popup object will also dismiss the popup and + * unmap the surface. Clients that want to dismiss the popup when another + * surface of their own is clicked should dismiss the popup using the destroy + * request. + * + * The parent surface must have either the xdg_toplevel or xdg_popup surface + * role. + * + * A newly created xdg_popup will be stacked on top of all previously created + * xdg_popup surfaces associated with the same xdg_toplevel. + * + * The parent of an xdg_popup must be mapped (see the xdg_surface + * description) before the xdg_popup itself. + * + * The x and y arguments passed when creating the popup object specify + * where the top left of the popup should be placed, relative to the + * local surface coordinates of the parent surface. See + * xdg_surface.get_popup. + * + * The client must call wl_surface.commit on the corresponding wl_surface + * for the xdg_popup state to take effect. + */ +extern const struct wl_interface zxdg_popup_v6_interface; + +#ifndef ZXDG_SHELL_V6_ERROR_ENUM +#define ZXDG_SHELL_V6_ERROR_ENUM +enum zxdg_shell_v6_error { + /** + * given wl_surface has another role + */ + ZXDG_SHELL_V6_ERROR_ROLE = 0, + /** + * xdg_shell was destroyed before children + */ + ZXDG_SHELL_V6_ERROR_DEFUNCT_SURFACES = 1, + /** + * the client tried to map or destroy a non-topmost popup + */ + ZXDG_SHELL_V6_ERROR_NOT_THE_TOPMOST_POPUP = 2, + /** + * the client specified an invalid popup parent surface + */ + ZXDG_SHELL_V6_ERROR_INVALID_POPUP_PARENT = 3, + /** + * the client provided an invalid surface state + */ + ZXDG_SHELL_V6_ERROR_INVALID_SURFACE_STATE = 4, + /** + * the client provided an invalid positioner + */ + ZXDG_SHELL_V6_ERROR_INVALID_POSITIONER = 5, +}; +#endif /* ZXDG_SHELL_V6_ERROR_ENUM */ + +/** + * @ingroup iface_zxdg_shell_v6 + * @struct zxdg_shell_v6_listener + */ +struct zxdg_shell_v6_listener { + /** + * check if the client is alive + * + * The ping event asks the client if it's still alive. Pass the + * serial specified in the event back to the compositor by sending + * a "pong" request back with the specified serial. See + * xdg_shell.ping. + * + * Compositors can use this to determine if the client is still + * alive. It's unspecified what will happen if the client doesn't + * respond to the ping request, or in what timeframe. Clients + * should try to respond in a reasonable amount of time. + * + * A compositor is free to ping in any way it wants, but a client + * must always respond to any xdg_shell object it created. + * @param serial pass this to the pong request + */ + void (*ping)(void *data, + struct zxdg_shell_v6 *zxdg_shell_v6, + uint32_t serial); +}; + +/** + * @ingroup zxdg_shell_v6_iface + */ +static inline int +zxdg_shell_v6_add_listener(struct zxdg_shell_v6 *zxdg_shell_v6, + const struct zxdg_shell_v6_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zxdg_shell_v6, + (void (**)(void)) listener, data); +} + +#define ZXDG_SHELL_V6_DESTROY 0 +#define ZXDG_SHELL_V6_CREATE_POSITIONER 1 +#define ZXDG_SHELL_V6_GET_XDG_SURFACE 2 +#define ZXDG_SHELL_V6_PONG 3 + +/** + * @ingroup iface_zxdg_shell_v6 + */ +#define ZXDG_SHELL_V6_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_shell_v6 + */ +#define ZXDG_SHELL_V6_CREATE_POSITIONER_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_shell_v6 + */ +#define ZXDG_SHELL_V6_GET_XDG_SURFACE_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_shell_v6 + */ +#define ZXDG_SHELL_V6_PONG_SINCE_VERSION 1 + +/** @ingroup iface_zxdg_shell_v6 */ +static inline void +zxdg_shell_v6_set_user_data(struct zxdg_shell_v6 *zxdg_shell_v6, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zxdg_shell_v6, user_data); +} + +/** @ingroup iface_zxdg_shell_v6 */ +static inline void * +zxdg_shell_v6_get_user_data(struct zxdg_shell_v6 *zxdg_shell_v6) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zxdg_shell_v6); +} + +static inline uint32_t +zxdg_shell_v6_get_version(struct zxdg_shell_v6 *zxdg_shell_v6) +{ + return wl_proxy_get_version((struct wl_proxy *) zxdg_shell_v6); +} + +/** + * @ingroup iface_zxdg_shell_v6 + * + * Destroy this xdg_shell object. + * + * Destroying a bound xdg_shell object while there are surfaces + * still alive created by this xdg_shell object instance is illegal + * and will result in a protocol error. + */ +static inline void +zxdg_shell_v6_destroy(struct zxdg_shell_v6 *zxdg_shell_v6) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_shell_v6, + ZXDG_SHELL_V6_DESTROY); + + wl_proxy_destroy((struct wl_proxy *) zxdg_shell_v6); +} + +/** + * @ingroup iface_zxdg_shell_v6 + * + * Create a positioner object. A positioner object is used to position + * surfaces relative to some parent surface. See the interface description + * and xdg_surface.get_popup for details. + */ +static inline struct zxdg_positioner_v6 * +zxdg_shell_v6_create_positioner(struct zxdg_shell_v6 *zxdg_shell_v6) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_shell_v6, + ZXDG_SHELL_V6_CREATE_POSITIONER, &zxdg_positioner_v6_interface, NULL); + + return (struct zxdg_positioner_v6 *) id; +} + +/** + * @ingroup iface_zxdg_shell_v6 + * + * This creates an xdg_surface for the given surface. While xdg_surface + * itself is not a role, the corresponding surface may only be assigned + * a role extending xdg_surface, such as xdg_toplevel or xdg_popup. + * + * This creates an xdg_surface for the given surface. An xdg_surface is + * used as basis to define a role to a given surface, such as xdg_toplevel + * or xdg_popup. It also manages functionality shared between xdg_surface + * based surface roles. + * + * See the documentation of xdg_surface for more details about what an + * xdg_surface is and how it is used. + */ +static inline struct zxdg_surface_v6 * +zxdg_shell_v6_get_xdg_surface(struct zxdg_shell_v6 *zxdg_shell_v6, struct wl_surface *surface) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_shell_v6, + ZXDG_SHELL_V6_GET_XDG_SURFACE, &zxdg_surface_v6_interface, NULL, surface); + + return (struct zxdg_surface_v6 *) id; +} + +/** + * @ingroup iface_zxdg_shell_v6 + * + * A client must respond to a ping event with a pong request or + * the client may be deemed unresponsive. See xdg_shell.ping. + */ +static inline void +zxdg_shell_v6_pong(struct zxdg_shell_v6 *zxdg_shell_v6, uint32_t serial) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_shell_v6, + ZXDG_SHELL_V6_PONG, serial); +} + +#ifndef ZXDG_POSITIONER_V6_ERROR_ENUM +#define ZXDG_POSITIONER_V6_ERROR_ENUM +enum zxdg_positioner_v6_error { + /** + * invalid input provided + */ + ZXDG_POSITIONER_V6_ERROR_INVALID_INPUT = 0, +}; +#endif /* ZXDG_POSITIONER_V6_ERROR_ENUM */ + +#ifndef ZXDG_POSITIONER_V6_ANCHOR_ENUM +#define ZXDG_POSITIONER_V6_ANCHOR_ENUM +enum zxdg_positioner_v6_anchor { + /** + * the center of the anchor rectangle + */ + ZXDG_POSITIONER_V6_ANCHOR_NONE = 0, + /** + * the top edge of the anchor rectangle + */ + ZXDG_POSITIONER_V6_ANCHOR_TOP = 1, + /** + * the bottom edge of the anchor rectangle + */ + ZXDG_POSITIONER_V6_ANCHOR_BOTTOM = 2, + /** + * the left edge of the anchor rectangle + */ + ZXDG_POSITIONER_V6_ANCHOR_LEFT = 4, + /** + * the right edge of the anchor rectangle + */ + ZXDG_POSITIONER_V6_ANCHOR_RIGHT = 8, +}; +#endif /* ZXDG_POSITIONER_V6_ANCHOR_ENUM */ + +#ifndef ZXDG_POSITIONER_V6_GRAVITY_ENUM +#define ZXDG_POSITIONER_V6_GRAVITY_ENUM +enum zxdg_positioner_v6_gravity { + /** + * center over the anchor edge + */ + ZXDG_POSITIONER_V6_GRAVITY_NONE = 0, + /** + * position above the anchor edge + */ + ZXDG_POSITIONER_V6_GRAVITY_TOP = 1, + /** + * position below the anchor edge + */ + ZXDG_POSITIONER_V6_GRAVITY_BOTTOM = 2, + /** + * position to the left of the anchor edge + */ + ZXDG_POSITIONER_V6_GRAVITY_LEFT = 4, + /** + * position to the right of the anchor edge + */ + ZXDG_POSITIONER_V6_GRAVITY_RIGHT = 8, +}; +#endif /* ZXDG_POSITIONER_V6_GRAVITY_ENUM */ + +#ifndef ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM +#define ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM +/** + * @ingroup iface_zxdg_positioner_v6 + * vertically resize the surface + * + * Resize the surface vertically so that it is completely unconstrained. + */ +enum zxdg_positioner_v6_constraint_adjustment { + ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_NONE = 0, + ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_X = 1, + ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_Y = 2, + ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_X = 4, + ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_Y = 8, + ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_X = 16, + ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_Y = 32, +}; +#endif /* ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM */ + +#define ZXDG_POSITIONER_V6_DESTROY 0 +#define ZXDG_POSITIONER_V6_SET_SIZE 1 +#define ZXDG_POSITIONER_V6_SET_ANCHOR_RECT 2 +#define ZXDG_POSITIONER_V6_SET_ANCHOR 3 +#define ZXDG_POSITIONER_V6_SET_GRAVITY 4 +#define ZXDG_POSITIONER_V6_SET_CONSTRAINT_ADJUSTMENT 5 +#define ZXDG_POSITIONER_V6_SET_OFFSET 6 + +/** + * @ingroup iface_zxdg_positioner_v6 + */ +#define ZXDG_POSITIONER_V6_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_positioner_v6 + */ +#define ZXDG_POSITIONER_V6_SET_SIZE_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_positioner_v6 + */ +#define ZXDG_POSITIONER_V6_SET_ANCHOR_RECT_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_positioner_v6 + */ +#define ZXDG_POSITIONER_V6_SET_ANCHOR_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_positioner_v6 + */ +#define ZXDG_POSITIONER_V6_SET_GRAVITY_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_positioner_v6 + */ +#define ZXDG_POSITIONER_V6_SET_CONSTRAINT_ADJUSTMENT_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_positioner_v6 + */ +#define ZXDG_POSITIONER_V6_SET_OFFSET_SINCE_VERSION 1 + +/** @ingroup iface_zxdg_positioner_v6 */ +static inline void +zxdg_positioner_v6_set_user_data(struct zxdg_positioner_v6 *zxdg_positioner_v6, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zxdg_positioner_v6, user_data); +} + +/** @ingroup iface_zxdg_positioner_v6 */ +static inline void * +zxdg_positioner_v6_get_user_data(struct zxdg_positioner_v6 *zxdg_positioner_v6) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zxdg_positioner_v6); +} + +static inline uint32_t +zxdg_positioner_v6_get_version(struct zxdg_positioner_v6 *zxdg_positioner_v6) +{ + return wl_proxy_get_version((struct wl_proxy *) zxdg_positioner_v6); +} + +/** + * @ingroup iface_zxdg_positioner_v6 + * + * Notify the compositor that the xdg_positioner will no longer be used. + */ +static inline void +zxdg_positioner_v6_destroy(struct zxdg_positioner_v6 *zxdg_positioner_v6) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, + ZXDG_POSITIONER_V6_DESTROY); + + wl_proxy_destroy((struct wl_proxy *) zxdg_positioner_v6); +} + +/** + * @ingroup iface_zxdg_positioner_v6 + * + * Set the size of the surface that is to be positioned with the positioner + * object. The size is in surface-local coordinates and corresponds to the + * window geometry. See xdg_surface.set_window_geometry. + * + * If a zero or negative size is set the invalid_input error is raised. + */ +static inline void +zxdg_positioner_v6_set_size(struct zxdg_positioner_v6 *zxdg_positioner_v6, int32_t width, int32_t height) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, + ZXDG_POSITIONER_V6_SET_SIZE, width, height); +} + +/** + * @ingroup iface_zxdg_positioner_v6 + * + * Specify the anchor rectangle within the parent surface that the child + * surface will be placed relative to. The rectangle is relative to the + * window geometry as defined by xdg_surface.set_window_geometry of the + * parent surface. The rectangle must be at least 1x1 large. + * + * When the xdg_positioner object is used to position a child surface, the + * anchor rectangle may not extend outside the window geometry of the + * positioned child's parent surface. + * + * If a zero or negative size is set the invalid_input error is raised. + */ +static inline void +zxdg_positioner_v6_set_anchor_rect(struct zxdg_positioner_v6 *zxdg_positioner_v6, int32_t x, int32_t y, int32_t width, int32_t height) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, + ZXDG_POSITIONER_V6_SET_ANCHOR_RECT, x, y, width, height); +} + +/** + * @ingroup iface_zxdg_positioner_v6 + * + * Defines a set of edges for the anchor rectangle. These are used to + * derive an anchor point that the child surface will be positioned + * relative to. If two orthogonal edges are specified (e.g. 'top' and + * 'left'), then the anchor point will be the intersection of the edges + * (e.g. the top left position of the rectangle); otherwise, the derived + * anchor point will be centered on the specified edge, or in the center of + * the anchor rectangle if no edge is specified. + * + * If two parallel anchor edges are specified (e.g. 'left' and 'right'), + * the invalid_input error is raised. + */ +static inline void +zxdg_positioner_v6_set_anchor(struct zxdg_positioner_v6 *zxdg_positioner_v6, uint32_t anchor) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, + ZXDG_POSITIONER_V6_SET_ANCHOR, anchor); +} + +/** + * @ingroup iface_zxdg_positioner_v6 + * + * Defines in what direction a surface should be positioned, relative to + * the anchor point of the parent surface. If two orthogonal gravities are + * specified (e.g. 'bottom' and 'right'), then the child surface will be + * placed in the specified direction; otherwise, the child surface will be + * centered over the anchor point on any axis that had no gravity + * specified. + * + * If two parallel gravities are specified (e.g. 'left' and 'right'), the + * invalid_input error is raised. + */ +static inline void +zxdg_positioner_v6_set_gravity(struct zxdg_positioner_v6 *zxdg_positioner_v6, uint32_t gravity) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, + ZXDG_POSITIONER_V6_SET_GRAVITY, gravity); +} + +/** + * @ingroup iface_zxdg_positioner_v6 + * + * Specify how the window should be positioned if the originally intended + * position caused the surface to be constrained, meaning at least + * partially outside positioning boundaries set by the compositor. The + * adjustment is set by constructing a bitmask describing the adjustment to + * be made when the surface is constrained on that axis. + * + * If no bit for one axis is set, the compositor will assume that the child + * surface should not change its position on that axis when constrained. + * + * If more than one bit for one axis is set, the order of how adjustments + * are applied is specified in the corresponding adjustment descriptions. + * + * The default adjustment is none. + */ +static inline void +zxdg_positioner_v6_set_constraint_adjustment(struct zxdg_positioner_v6 *zxdg_positioner_v6, uint32_t constraint_adjustment) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, + ZXDG_POSITIONER_V6_SET_CONSTRAINT_ADJUSTMENT, constraint_adjustment); +} + +/** + * @ingroup iface_zxdg_positioner_v6 + * + * Specify the surface position offset relative to the position of the + * anchor on the anchor rectangle and the anchor on the surface. For + * example if the anchor of the anchor rectangle is at (x, y), the surface + * has the gravity bottom|right, and the offset is (ox, oy), the calculated + * surface position will be (x + ox, y + oy). The offset position of the + * surface is the one used for constraint testing. See + * set_constraint_adjustment. + * + * An example use case is placing a popup menu on top of a user interface + * element, while aligning the user interface element of the parent surface + * with some user interface element placed somewhere in the popup surface. + */ +static inline void +zxdg_positioner_v6_set_offset(struct zxdg_positioner_v6 *zxdg_positioner_v6, int32_t x, int32_t y) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, + ZXDG_POSITIONER_V6_SET_OFFSET, x, y); +} + +#ifndef ZXDG_SURFACE_V6_ERROR_ENUM +#define ZXDG_SURFACE_V6_ERROR_ENUM +enum zxdg_surface_v6_error { + ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED = 1, + ZXDG_SURFACE_V6_ERROR_ALREADY_CONSTRUCTED = 2, + ZXDG_SURFACE_V6_ERROR_UNCONFIGURED_BUFFER = 3, +}; +#endif /* ZXDG_SURFACE_V6_ERROR_ENUM */ + +/** + * @ingroup iface_zxdg_surface_v6 + * @struct zxdg_surface_v6_listener + */ +struct zxdg_surface_v6_listener { + /** + * suggest a surface change + * + * The configure event marks the end of a configure sequence. A + * configure sequence is a set of one or more events configuring + * the state of the xdg_surface, including the final + * xdg_surface.configure event. + * + * Where applicable, xdg_surface surface roles will during a + * configure sequence extend this event as a latched state sent as + * events before the xdg_surface.configure event. Such events + * should be considered to make up a set of atomically applied + * configuration states, where the xdg_surface.configure commits + * the accumulated state. + * + * Clients should arrange their surface for the new states, and + * then send an ack_configure request with the serial sent in this + * configure event at some point before committing the new surface. + * + * If the client receives multiple configure events before it can + * respond to one, it is free to discard all but the last event it + * received. + * @param serial serial of the configure event + */ + void (*configure)(void *data, + struct zxdg_surface_v6 *zxdg_surface_v6, + uint32_t serial); +}; + +/** + * @ingroup zxdg_surface_v6_iface + */ +static inline int +zxdg_surface_v6_add_listener(struct zxdg_surface_v6 *zxdg_surface_v6, + const struct zxdg_surface_v6_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zxdg_surface_v6, + (void (**)(void)) listener, data); +} + +#define ZXDG_SURFACE_V6_DESTROY 0 +#define ZXDG_SURFACE_V6_GET_TOPLEVEL 1 +#define ZXDG_SURFACE_V6_GET_POPUP 2 +#define ZXDG_SURFACE_V6_SET_WINDOW_GEOMETRY 3 +#define ZXDG_SURFACE_V6_ACK_CONFIGURE 4 + +/** + * @ingroup iface_zxdg_surface_v6 + */ +#define ZXDG_SURFACE_V6_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_surface_v6 + */ +#define ZXDG_SURFACE_V6_GET_TOPLEVEL_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_surface_v6 + */ +#define ZXDG_SURFACE_V6_GET_POPUP_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_surface_v6 + */ +#define ZXDG_SURFACE_V6_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_surface_v6 + */ +#define ZXDG_SURFACE_V6_ACK_CONFIGURE_SINCE_VERSION 1 + +/** @ingroup iface_zxdg_surface_v6 */ +static inline void +zxdg_surface_v6_set_user_data(struct zxdg_surface_v6 *zxdg_surface_v6, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zxdg_surface_v6, user_data); +} + +/** @ingroup iface_zxdg_surface_v6 */ +static inline void * +zxdg_surface_v6_get_user_data(struct zxdg_surface_v6 *zxdg_surface_v6) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zxdg_surface_v6); +} + +static inline uint32_t +zxdg_surface_v6_get_version(struct zxdg_surface_v6 *zxdg_surface_v6) +{ + return wl_proxy_get_version((struct wl_proxy *) zxdg_surface_v6); +} + +/** + * @ingroup iface_zxdg_surface_v6 + * + * Destroy the xdg_surface object. An xdg_surface must only be destroyed + * after its role object has been destroyed. + */ +static inline void +zxdg_surface_v6_destroy(struct zxdg_surface_v6 *zxdg_surface_v6) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_surface_v6, + ZXDG_SURFACE_V6_DESTROY); + + wl_proxy_destroy((struct wl_proxy *) zxdg_surface_v6); +} + +/** + * @ingroup iface_zxdg_surface_v6 + * + * This creates an xdg_toplevel object for the given xdg_surface and gives + * the associated wl_surface the xdg_toplevel role. + * + * See the documentation of xdg_toplevel for more details about what an + * xdg_toplevel is and how it is used. + */ +static inline struct zxdg_toplevel_v6 * +zxdg_surface_v6_get_toplevel(struct zxdg_surface_v6 *zxdg_surface_v6) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_surface_v6, + ZXDG_SURFACE_V6_GET_TOPLEVEL, &zxdg_toplevel_v6_interface, NULL); + + return (struct zxdg_toplevel_v6 *) id; +} + +/** + * @ingroup iface_zxdg_surface_v6 + * + * This creates an xdg_popup object for the given xdg_surface and gives the + * associated wl_surface the xdg_popup role. + * + * See the documentation of xdg_popup for more details about what an + * xdg_popup is and how it is used. + */ +static inline struct zxdg_popup_v6 * +zxdg_surface_v6_get_popup(struct zxdg_surface_v6 *zxdg_surface_v6, struct zxdg_surface_v6 *parent, struct zxdg_positioner_v6 *positioner) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_surface_v6, + ZXDG_SURFACE_V6_GET_POPUP, &zxdg_popup_v6_interface, NULL, parent, positioner); + + return (struct zxdg_popup_v6 *) id; +} + +/** + * @ingroup iface_zxdg_surface_v6 + * + * The window geometry of a surface is its "visible bounds" from the + * user's perspective. Client-side decorations often have invisible + * portions like drop-shadows which should be ignored for the + * purposes of aligning, placing and constraining windows. + * + * The window geometry is double buffered, and will be applied at the + * time wl_surface.commit of the corresponding wl_surface is called. + * + * Once the window geometry of the surface is set, it is not possible to + * unset it, and it will remain the same until set_window_geometry is + * called again, even if a new subsurface or buffer is attached. + * + * If never set, the value is the full bounds of the surface, + * including any subsurfaces. This updates dynamically on every + * commit. This unset is meant for extremely simple clients. + * + * The arguments are given in the surface-local coordinate space of + * the wl_surface associated with this xdg_surface. + * + * The width and height must be greater than zero. Setting an invalid size + * will raise an error. When applied, the effective window geometry will be + * the set window geometry clamped to the bounding rectangle of the + * combined geometry of the surface of the xdg_surface and the associated + * subsurfaces. + */ +static inline void +zxdg_surface_v6_set_window_geometry(struct zxdg_surface_v6 *zxdg_surface_v6, int32_t x, int32_t y, int32_t width, int32_t height) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_surface_v6, + ZXDG_SURFACE_V6_SET_WINDOW_GEOMETRY, x, y, width, height); +} + +/** + * @ingroup iface_zxdg_surface_v6 + * + * When a configure event is received, if a client commits the + * surface in response to the configure event, then the client + * must make an ack_configure request sometime before the commit + * request, passing along the serial of the configure event. + * + * For instance, for toplevel surfaces the compositor might use this + * information to move a surface to the top left only when the client has + * drawn itself for the maximized or fullscreen state. + * + * If the client receives multiple configure events before it + * can respond to one, it only has to ack the last configure event. + * + * A client is not required to commit immediately after sending + * an ack_configure request - it may even ack_configure several times + * before its next surface commit. + * + * A client may send multiple ack_configure requests before committing, but + * only the last request sent before a commit indicates which configure + * event the client really is responding to. + */ +static inline void +zxdg_surface_v6_ack_configure(struct zxdg_surface_v6 *zxdg_surface_v6, uint32_t serial) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_surface_v6, + ZXDG_SURFACE_V6_ACK_CONFIGURE, serial); +} + +#ifndef ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM +#define ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM +/** + * @ingroup iface_zxdg_toplevel_v6 + * edge values for resizing + * + * These values are used to indicate which edge of a surface + * is being dragged in a resize operation. + */ +enum zxdg_toplevel_v6_resize_edge { + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_NONE = 0, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP = 1, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM = 2, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_LEFT = 4, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_LEFT = 5, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_LEFT = 6, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_RIGHT = 8, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_RIGHT = 9, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_RIGHT = 10, +}; +#endif /* ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM */ + +#ifndef ZXDG_TOPLEVEL_V6_STATE_ENUM +#define ZXDG_TOPLEVEL_V6_STATE_ENUM +/** + * @ingroup iface_zxdg_toplevel_v6 + * the surface is now activated + * + * Client window decorations should be painted as if the window is + * active. Do not assume this means that the window actually has + * keyboard or pointer focus. + */ +enum zxdg_toplevel_v6_state { + /** + * the surface is maximized + */ + ZXDG_TOPLEVEL_V6_STATE_MAXIMIZED = 1, + /** + * the surface is fullscreen + */ + ZXDG_TOPLEVEL_V6_STATE_FULLSCREEN = 2, + /** + * the surface is being resized + */ + ZXDG_TOPLEVEL_V6_STATE_RESIZING = 3, + /** + * the surface is now activated + */ + ZXDG_TOPLEVEL_V6_STATE_ACTIVATED = 4, +}; +#endif /* ZXDG_TOPLEVEL_V6_STATE_ENUM */ + +/** + * @ingroup iface_zxdg_toplevel_v6 + * @struct zxdg_toplevel_v6_listener + */ +struct zxdg_toplevel_v6_listener { + /** + * suggest a surface change + * + * This configure event asks the client to resize its toplevel + * surface or to change its state. The configured state should not + * be applied immediately. See xdg_surface.configure for details. + * + * The width and height arguments specify a hint to the window + * about how its surface should be resized in window geometry + * coordinates. See set_window_geometry. + * + * If the width or height arguments are zero, it means the client + * should decide its own window dimension. This may happen when the + * compositor need to configure the state of the surface but + * doesn't have any information about any previous or expected + * dimension. + * + * The states listed in the event specify how the width/height + * arguments should be interpreted, and possibly how it should be + * drawn. + * + * Clients must send an ack_configure in response to this event. + * See xdg_surface.configure and xdg_surface.ack_configure for + * details. + */ + void (*configure)(void *data, + struct zxdg_toplevel_v6 *zxdg_toplevel_v6, + int32_t width, + int32_t height, + struct wl_array *states); + /** + * surface wants to be closed + * + * The close event is sent by the compositor when the user wants + * the surface to be closed. This should be equivalent to the user + * clicking the close button in client-side decorations, if your + * application has any... + * + * This is only a request that the user intends to close your + * window. The client may choose to ignore this request, or show a + * dialog to ask the user to save their data... + */ + void (*close)(void *data, + struct zxdg_toplevel_v6 *zxdg_toplevel_v6); +}; + +/** + * @ingroup zxdg_toplevel_v6_iface + */ +static inline int +zxdg_toplevel_v6_add_listener(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, + const struct zxdg_toplevel_v6_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zxdg_toplevel_v6, + (void (**)(void)) listener, data); +} + +#define ZXDG_TOPLEVEL_V6_DESTROY 0 +#define ZXDG_TOPLEVEL_V6_SET_PARENT 1 +#define ZXDG_TOPLEVEL_V6_SET_TITLE 2 +#define ZXDG_TOPLEVEL_V6_SET_APP_ID 3 +#define ZXDG_TOPLEVEL_V6_SHOW_WINDOW_MENU 4 +#define ZXDG_TOPLEVEL_V6_MOVE 5 +#define ZXDG_TOPLEVEL_V6_RESIZE 6 +#define ZXDG_TOPLEVEL_V6_SET_MAX_SIZE 7 +#define ZXDG_TOPLEVEL_V6_SET_MIN_SIZE 8 +#define ZXDG_TOPLEVEL_V6_SET_MAXIMIZED 9 +#define ZXDG_TOPLEVEL_V6_UNSET_MAXIMIZED 10 +#define ZXDG_TOPLEVEL_V6_SET_FULLSCREEN 11 +#define ZXDG_TOPLEVEL_V6_UNSET_FULLSCREEN 12 +#define ZXDG_TOPLEVEL_V6_SET_MINIMIZED 13 + +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_SET_PARENT_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_SET_TITLE_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_SET_APP_ID_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_SHOW_WINDOW_MENU_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_MOVE_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_RESIZE_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_SET_MAX_SIZE_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_SET_MIN_SIZE_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_SET_MAXIMIZED_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_UNSET_MAXIMIZED_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_SET_FULLSCREEN_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_UNSET_FULLSCREEN_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_SET_MINIMIZED_SINCE_VERSION 1 + +/** @ingroup iface_zxdg_toplevel_v6 */ +static inline void +zxdg_toplevel_v6_set_user_data(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zxdg_toplevel_v6, user_data); +} + +/** @ingroup iface_zxdg_toplevel_v6 */ +static inline void * +zxdg_toplevel_v6_get_user_data(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zxdg_toplevel_v6); +} + +static inline uint32_t +zxdg_toplevel_v6_get_version(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) +{ + return wl_proxy_get_version((struct wl_proxy *) zxdg_toplevel_v6); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + * + * Unmap and destroy the window. The window will be effectively + * hidden from the user's point of view, and all state like + * maximization, fullscreen, and so on, will be lost. + */ +static inline void +zxdg_toplevel_v6_destroy(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, + ZXDG_TOPLEVEL_V6_DESTROY); + + wl_proxy_destroy((struct wl_proxy *) zxdg_toplevel_v6); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + * + * Set the "parent" of this surface. This window should be stacked + * above a parent. The parent surface must be mapped as long as this + * surface is mapped. + * + * Parent windows should be set on dialogs, toolboxes, or other + * "auxiliary" surfaces, so that the parent is raised when the dialog + * is raised. + */ +static inline void +zxdg_toplevel_v6_set_parent(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct zxdg_toplevel_v6 *parent) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, + ZXDG_TOPLEVEL_V6_SET_PARENT, parent); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + * + * Set a short title for the surface. + * + * This string may be used to identify the surface in a task bar, + * window list, or other user interface elements provided by the + * compositor. + * + * The string must be encoded in UTF-8. + */ +static inline void +zxdg_toplevel_v6_set_title(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, const char *title) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, + ZXDG_TOPLEVEL_V6_SET_TITLE, title); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + * + * Set an application identifier for the surface. + * + * The app ID identifies the general class of applications to which + * the surface belongs. The compositor can use this to group multiple + * surfaces together, or to determine how to launch a new application. + * + * For D-Bus activatable applications, the app ID is used as the D-Bus + * service name. + * + * The compositor shell will try to group application surfaces together + * by their app ID. As a best practice, it is suggested to select app + * ID's that match the basename of the application's .desktop file. + * For example, "org.freedesktop.FooViewer" where the .desktop file is + * "org.freedesktop.FooViewer.desktop". + * + * See the desktop-entry specification [0] for more details on + * application identifiers and how they relate to well-known D-Bus + * names and .desktop files. + * + * [0] http://standards.freedesktop.org/desktop-entry-spec/ + */ +static inline void +zxdg_toplevel_v6_set_app_id(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, const char *app_id) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, + ZXDG_TOPLEVEL_V6_SET_APP_ID, app_id); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + * + * Clients implementing client-side decorations might want to show + * a context menu when right-clicking on the decorations, giving the + * user a menu that they can use to maximize or minimize the window. + * + * This request asks the compositor to pop up such a window menu at + * the given position, relative to the local surface coordinates of + * the parent surface. There are no guarantees as to what menu items + * the window menu contains. + * + * This request must be used in response to some sort of user action + * like a button press, key press, or touch down event. + */ +static inline void +zxdg_toplevel_v6_show_window_menu(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_seat *seat, uint32_t serial, int32_t x, int32_t y) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, + ZXDG_TOPLEVEL_V6_SHOW_WINDOW_MENU, seat, serial, x, y); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + * + * Start an interactive, user-driven move of the surface. + * + * This request must be used in response to some sort of user action + * like a button press, key press, or touch down event. The passed + * serial is used to determine the type of interactive move (touch, + * pointer, etc). + * + * The server may ignore move requests depending on the state of + * the surface (e.g. fullscreen or maximized), or if the passed serial + * is no longer valid. + * + * If triggered, the surface will lose the focus of the device + * (wl_pointer, wl_touch, etc) used for the move. It is up to the + * compositor to visually indicate that the move is taking place, such as + * updating a pointer cursor, during the move. There is no guarantee + * that the device focus will return when the move is completed. + */ +static inline void +zxdg_toplevel_v6_move(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_seat *seat, uint32_t serial) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, + ZXDG_TOPLEVEL_V6_MOVE, seat, serial); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + * + * Start a user-driven, interactive resize of the surface. + * + * This request must be used in response to some sort of user action + * like a button press, key press, or touch down event. The passed + * serial is used to determine the type of interactive resize (touch, + * pointer, etc). + * + * The server may ignore resize requests depending on the state of + * the surface (e.g. fullscreen or maximized). + * + * If triggered, the client will receive configure events with the + * "resize" state enum value and the expected sizes. See the "resize" + * enum value for more details about what is required. The client + * must also acknowledge configure events using "ack_configure". After + * the resize is completed, the client will receive another "configure" + * event without the resize state. + * + * If triggered, the surface also will lose the focus of the device + * (wl_pointer, wl_touch, etc) used for the resize. It is up to the + * compositor to visually indicate that the resize is taking place, + * such as updating a pointer cursor, during the resize. There is no + * guarantee that the device focus will return when the resize is + * completed. + * + * The edges parameter specifies how the surface should be resized, + * and is one of the values of the resize_edge enum. The compositor + * may use this information to update the surface position for + * example when dragging the top left corner. The compositor may also + * use this information to adapt its behavior, e.g. choose an + * appropriate cursor image. + */ +static inline void +zxdg_toplevel_v6_resize(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_seat *seat, uint32_t serial, uint32_t edges) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, + ZXDG_TOPLEVEL_V6_RESIZE, seat, serial, edges); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + * + * Set a maximum size for the window. + * + * The client can specify a maximum size so that the compositor does + * not try to configure the window beyond this size. + * + * The width and height arguments are in window geometry coordinates. + * See xdg_surface.set_window_geometry. + * + * Values set in this way are double-buffered. They will get applied + * on the next commit. + * + * The compositor can use this information to allow or disallow + * different states like maximize or fullscreen and draw accurate + * animations. + * + * Similarly, a tiling window manager may use this information to + * place and resize client windows in a more effective way. + * + * The client should not rely on the compositor to obey the maximum + * size. The compositor may decide to ignore the values set by the + * client and request a larger size. + * + * If never set, or a value of zero in the request, means that the + * client has no expected maximum size in the given dimension. + * As a result, a client wishing to reset the maximum size + * to an unspecified state can use zero for width and height in the + * request. + * + * Requesting a maximum size to be smaller than the minimum size of + * a surface is illegal and will result in a protocol error. + * + * The width and height must be greater than or equal to zero. Using + * strictly negative values for width and height will result in a + * protocol error. + */ +static inline void +zxdg_toplevel_v6_set_max_size(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, int32_t width, int32_t height) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, + ZXDG_TOPLEVEL_V6_SET_MAX_SIZE, width, height); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + * + * Set a minimum size for the window. + * + * The client can specify a minimum size so that the compositor does + * not try to configure the window below this size. + * + * The width and height arguments are in window geometry coordinates. + * See xdg_surface.set_window_geometry. + * + * Values set in this way are double-buffered. They will get applied + * on the next commit. + * + * The compositor can use this information to allow or disallow + * different states like maximize or fullscreen and draw accurate + * animations. + * + * Similarly, a tiling window manager may use this information to + * place and resize client windows in a more effective way. + * + * The client should not rely on the compositor to obey the minimum + * size. The compositor may decide to ignore the values set by the + * client and request a smaller size. + * + * If never set, or a value of zero in the request, means that the + * client has no expected minimum size in the given dimension. + * As a result, a client wishing to reset the minimum size + * to an unspecified state can use zero for width and height in the + * request. + * + * Requesting a minimum size to be larger than the maximum size of + * a surface is illegal and will result in a protocol error. + * + * The width and height must be greater than or equal to zero. Using + * strictly negative values for width and height will result in a + * protocol error. + */ +static inline void +zxdg_toplevel_v6_set_min_size(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, int32_t width, int32_t height) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, + ZXDG_TOPLEVEL_V6_SET_MIN_SIZE, width, height); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + * + * Maximize the surface. + * + * After requesting that the surface should be maximized, the compositor + * will respond by emitting a configure event with the "maximized" state + * and the required window geometry. The client should then update its + * content, drawing it in a maximized state, i.e. without shadow or other + * decoration outside of the window geometry. The client must also + * acknowledge the configure when committing the new content (see + * ack_configure). + * + * It is up to the compositor to decide how and where to maximize the + * surface, for example which output and what region of the screen should + * be used. + * + * If the surface was already maximized, the compositor will still emit + * a configure event with the "maximized" state. + */ +static inline void +zxdg_toplevel_v6_set_maximized(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, + ZXDG_TOPLEVEL_V6_SET_MAXIMIZED); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + * + * Unmaximize the surface. + * + * After requesting that the surface should be unmaximized, the compositor + * will respond by emitting a configure event without the "maximized" + * state. If available, the compositor will include the window geometry + * dimensions the window had prior to being maximized in the configure + * request. The client must then update its content, drawing it in a + * regular state, i.e. potentially with shadow, etc. The client must also + * acknowledge the configure when committing the new content (see + * ack_configure). + * + * It is up to the compositor to position the surface after it was + * unmaximized; usually the position the surface had before maximizing, if + * applicable. + * + * If the surface was already not maximized, the compositor will still + * emit a configure event without the "maximized" state. + */ +static inline void +zxdg_toplevel_v6_unset_maximized(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, + ZXDG_TOPLEVEL_V6_UNSET_MAXIMIZED); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + * + * Make the surface fullscreen. + * + * You can specify an output that you would prefer to be fullscreen. + * If this value is NULL, it's up to the compositor to choose which + * display will be used to map this surface. + * + * If the surface doesn't cover the whole output, the compositor will + * position the surface in the center of the output and compensate with + * black borders filling the rest of the output. + */ +static inline void +zxdg_toplevel_v6_set_fullscreen(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_output *output) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, + ZXDG_TOPLEVEL_V6_SET_FULLSCREEN, output); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +static inline void +zxdg_toplevel_v6_unset_fullscreen(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, + ZXDG_TOPLEVEL_V6_UNSET_FULLSCREEN); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + * + * Request that the compositor minimize your surface. There is no + * way to know if the surface is currently minimized, nor is there + * any way to unset minimization on this surface. + * + * If you are looking to throttle redrawing when minimized, please + * instead use the wl_surface.frame event for this, as this will + * also work with live previews on windows in Alt-Tab, Expose or + * similar compositor features. + */ +static inline void +zxdg_toplevel_v6_set_minimized(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, + ZXDG_TOPLEVEL_V6_SET_MINIMIZED); +} + +#ifndef ZXDG_POPUP_V6_ERROR_ENUM +#define ZXDG_POPUP_V6_ERROR_ENUM +enum zxdg_popup_v6_error { + /** + * tried to grab after being mapped + */ + ZXDG_POPUP_V6_ERROR_INVALID_GRAB = 0, +}; +#endif /* ZXDG_POPUP_V6_ERROR_ENUM */ + +/** + * @ingroup iface_zxdg_popup_v6 + * @struct zxdg_popup_v6_listener + */ +struct zxdg_popup_v6_listener { + /** + * configure the popup surface + * + * This event asks the popup surface to configure itself given + * the configuration. The configured state should not be applied + * immediately. See xdg_surface.configure for details. + * + * The x and y arguments represent the position the popup was + * placed at given the xdg_positioner rule, relative to the upper + * left corner of the window geometry of the parent surface. + * @param x x position relative to parent surface window geometry + * @param y y position relative to parent surface window geometry + * @param width window geometry width + * @param height window geometry height + */ + void (*configure)(void *data, + struct zxdg_popup_v6 *zxdg_popup_v6, + int32_t x, + int32_t y, + int32_t width, + int32_t height); + /** + * popup interaction is done + * + * The popup_done event is sent out when a popup is dismissed by + * the compositor. The client should destroy the xdg_popup object + * at this point. + */ + void (*popup_done)(void *data, + struct zxdg_popup_v6 *zxdg_popup_v6); +}; + +/** + * @ingroup zxdg_popup_v6_iface + */ +static inline int +zxdg_popup_v6_add_listener(struct zxdg_popup_v6 *zxdg_popup_v6, + const struct zxdg_popup_v6_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zxdg_popup_v6, + (void (**)(void)) listener, data); +} + +#define ZXDG_POPUP_V6_DESTROY 0 +#define ZXDG_POPUP_V6_GRAB 1 + +/** + * @ingroup iface_zxdg_popup_v6 + */ +#define ZXDG_POPUP_V6_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_popup_v6 + */ +#define ZXDG_POPUP_V6_GRAB_SINCE_VERSION 1 + +/** @ingroup iface_zxdg_popup_v6 */ +static inline void +zxdg_popup_v6_set_user_data(struct zxdg_popup_v6 *zxdg_popup_v6, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zxdg_popup_v6, user_data); +} + +/** @ingroup iface_zxdg_popup_v6 */ +static inline void * +zxdg_popup_v6_get_user_data(struct zxdg_popup_v6 *zxdg_popup_v6) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zxdg_popup_v6); +} + +static inline uint32_t +zxdg_popup_v6_get_version(struct zxdg_popup_v6 *zxdg_popup_v6) +{ + return wl_proxy_get_version((struct wl_proxy *) zxdg_popup_v6); +} + +/** + * @ingroup iface_zxdg_popup_v6 + * + * This destroys the popup. Explicitly destroying the xdg_popup + * object will also dismiss the popup, and unmap the surface. + * + * If this xdg_popup is not the "topmost" popup, a protocol error + * will be sent. + */ +static inline void +zxdg_popup_v6_destroy(struct zxdg_popup_v6 *zxdg_popup_v6) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_popup_v6, + ZXDG_POPUP_V6_DESTROY); + + wl_proxy_destroy((struct wl_proxy *) zxdg_popup_v6); +} + +/** + * @ingroup iface_zxdg_popup_v6 + * + * This request makes the created popup take an explicit grab. An explicit + * grab will be dismissed when the user dismisses the popup, or when the + * client destroys the xdg_popup. This can be done by the user clicking + * outside the surface, using the keyboard, or even locking the screen + * through closing the lid or a timeout. + * + * If the compositor denies the grab, the popup will be immediately + * dismissed. + * + * This request must be used in response to some sort of user action like a + * button press, key press, or touch down event. The serial number of the + * event should be passed as 'serial'. + * + * The parent of a grabbing popup must either be an xdg_toplevel surface or + * another xdg_popup with an explicit grab. If the parent is another + * xdg_popup it means that the popups are nested, with this popup now being + * the topmost popup. + * + * Nested popups must be destroyed in the reverse order they were created + * in, e.g. the only popup you are allowed to destroy at all times is the + * topmost one. + * + * When compositors choose to dismiss a popup, they may dismiss every + * nested grabbing popup as well. When a compositor dismisses popups, it + * will follow the same dismissing order as required from the client. + * + * The parent of a grabbing popup must either be another xdg_popup with an + * active explicit grab, or an xdg_popup or xdg_toplevel, if there are no + * explicit grabs already taken. + * + * If the topmost grabbing popup is destroyed, the grab will be returned to + * the parent of the popup, if that parent previously had an explicit grab. + * + * If the parent is a grabbing popup which has already been dismissed, this + * popup will be immediately dismissed. If the parent is a popup that did + * not take an explicit grab, an error will be raised. + * + * During a popup grab, the client owning the grab will receive pointer + * and touch events for all their surfaces as normal (similar to an + * "owner-events" grab in X11 parlance), while the top most grabbing popup + * will always have keyboard focus. + */ +static inline void +zxdg_popup_v6_grab(struct zxdg_popup_v6 *zxdg_popup_v6, struct wl_seat *seat, uint32_t serial) +{ + wl_proxy_marshal((struct wl_proxy *) zxdg_popup_v6, + ZXDG_POPUP_V6_GRAB, seat, serial); +} + +#ifdef __cplusplus +} +#endif + +#endif
diff --git a/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-server-protocol.h b/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-server-protocol.h new file mode 100644 index 0000000..3d45d7c --- /dev/null +++ b/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-server-protocol.h
@@ -0,0 +1,1302 @@ +/* Generated by wayland-scanner 1.11.0 */ + +#ifndef XDG_SHELL_UNSTABLE_V6_SERVER_PROTOCOL_H +#define XDG_SHELL_UNSTABLE_V6_SERVER_PROTOCOL_H + +#include <stdint.h> +#include <stddef.h> +#include "wayland-server.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct wl_client; +struct wl_resource; + +/** + * @page page_xdg_shell_unstable_v6 The xdg_shell_unstable_v6 protocol + * @section page_ifaces_xdg_shell_unstable_v6 Interfaces + * - @subpage page_iface_zxdg_shell_v6 - create desktop-style surfaces + * - @subpage page_iface_zxdg_positioner_v6 - child surface positioner + * - @subpage page_iface_zxdg_surface_v6 - desktop user interface surface base interface + * - @subpage page_iface_zxdg_toplevel_v6 - toplevel surface + * - @subpage page_iface_zxdg_popup_v6 - short-lived, popup surfaces for menus + * @section page_copyright_xdg_shell_unstable_v6 Copyright + * <pre> + * + * Copyright © 2008-2013 Kristian Høgsberg + * Copyright © 2013 Rafael Antognolli + * Copyright © 2013 Jasper St. Pierre + * Copyright © 2010-2013 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * </pre> + */ +struct wl_output; +struct wl_seat; +struct wl_surface; +struct zxdg_popup_v6; +struct zxdg_positioner_v6; +struct zxdg_shell_v6; +struct zxdg_surface_v6; +struct zxdg_toplevel_v6; + +/** + * @page page_iface_zxdg_shell_v6 zxdg_shell_v6 + * @section page_iface_zxdg_shell_v6_desc Description + * + * xdg_shell allows clients to turn a wl_surface into a "real window" + * which can be dragged, resized, stacked, and moved around by the + * user. Everything about this interface is suited towards traditional + * desktop environments. + * @section page_iface_zxdg_shell_v6_api API + * See @ref iface_zxdg_shell_v6. + */ +/** + * @defgroup iface_zxdg_shell_v6 The zxdg_shell_v6 interface + * + * xdg_shell allows clients to turn a wl_surface into a "real window" + * which can be dragged, resized, stacked, and moved around by the + * user. Everything about this interface is suited towards traditional + * desktop environments. + */ +extern const struct wl_interface zxdg_shell_v6_interface; +/** + * @page page_iface_zxdg_positioner_v6 zxdg_positioner_v6 + * @section page_iface_zxdg_positioner_v6_desc Description + * + * The xdg_positioner provides a collection of rules for the placement of a + * child surface relative to a parent surface. Rules can be defined to ensure + * the child surface remains within the visible area's borders, and to + * specify how the child surface changes its position, such as sliding along + * an axis, or flipping around a rectangle. + * + * See the various requests for details about possible rules. + * + * At the time of the request, the compositor makes a copy of the rules + * specified by the xdg_positioner. Thus, after the request is complete the + * xdg_positioner object can be destroyed or reused; further changes to the + * object will have no effect on previous usages. + * + * For an xdg_positioner object to be considered complete, it must have a + * non-zero size set by set_size, and a non-zero anchor rectangle set by + * set_anchor_rect. Passing an incomplete xdg_positioner object when + * positioning a surface raises an error. + * @section page_iface_zxdg_positioner_v6_api API + * See @ref iface_zxdg_positioner_v6. + */ +/** + * @defgroup iface_zxdg_positioner_v6 The zxdg_positioner_v6 interface + * + * The xdg_positioner provides a collection of rules for the placement of a + * child surface relative to a parent surface. Rules can be defined to ensure + * the child surface remains within the visible area's borders, and to + * specify how the child surface changes its position, such as sliding along + * an axis, or flipping around a rectangle. + * + * See the various requests for details about possible rules. + * + * At the time of the request, the compositor makes a copy of the rules + * specified by the xdg_positioner. Thus, after the request is complete the + * xdg_positioner object can be destroyed or reused; further changes to the + * object will have no effect on previous usages. + * + * For an xdg_positioner object to be considered complete, it must have a + * non-zero size set by set_size, and a non-zero anchor rectangle set by + * set_anchor_rect. Passing an incomplete xdg_positioner object when + * positioning a surface raises an error. + */ +extern const struct wl_interface zxdg_positioner_v6_interface; +/** + * @page page_iface_zxdg_surface_v6 zxdg_surface_v6 + * @section page_iface_zxdg_surface_v6_desc Description + * + * An interface that may be implemented by a wl_surface, for + * implementations that provide a desktop-style user interface. + * + * It provides a base set of functionality required to construct user + * interface elements requiring management by the compositor, such as + * toplevel windows, menus, etc. The types of functionality are split into + * xdg_surface roles. + * + * Creating an xdg_surface does not set the role for a wl_surface. In order + * to map an xdg_surface, the client must create a role-specific object + * using, e.g., get_toplevel, get_popup. The wl_surface for any given + * xdg_surface can have at most one role, and may not be assigned any role + * not based on xdg_surface. + * + * A role must be assigned before any other requests are made to the + * xdg_surface object. + * + * The client must call wl_surface.commit on the corresponding wl_surface + * for the xdg_surface state to take effect. + * + * Creating an xdg_surface from a wl_surface which has a buffer attached or + * committed is a client error, and any attempts by a client to attach or + * manipulate a buffer prior to the first xdg_surface.configure call must + * also be treated as errors. + * + * For a surface to be mapped by the compositor, the following conditions + * must be met: (1) the client has assigned a xdg_surface based role to the + * surface, (2) the client has set and committed the xdg_surface state and + * the role dependent state to the surface and (3) the client has committed a + * buffer to the surface. + * @section page_iface_zxdg_surface_v6_api API + * See @ref iface_zxdg_surface_v6. + */ +/** + * @defgroup iface_zxdg_surface_v6 The zxdg_surface_v6 interface + * + * An interface that may be implemented by a wl_surface, for + * implementations that provide a desktop-style user interface. + * + * It provides a base set of functionality required to construct user + * interface elements requiring management by the compositor, such as + * toplevel windows, menus, etc. The types of functionality are split into + * xdg_surface roles. + * + * Creating an xdg_surface does not set the role for a wl_surface. In order + * to map an xdg_surface, the client must create a role-specific object + * using, e.g., get_toplevel, get_popup. The wl_surface for any given + * xdg_surface can have at most one role, and may not be assigned any role + * not based on xdg_surface. + * + * A role must be assigned before any other requests are made to the + * xdg_surface object. + * + * The client must call wl_surface.commit on the corresponding wl_surface + * for the xdg_surface state to take effect. + * + * Creating an xdg_surface from a wl_surface which has a buffer attached or + * committed is a client error, and any attempts by a client to attach or + * manipulate a buffer prior to the first xdg_surface.configure call must + * also be treated as errors. + * + * For a surface to be mapped by the compositor, the following conditions + * must be met: (1) the client has assigned a xdg_surface based role to the + * surface, (2) the client has set and committed the xdg_surface state and + * the role dependent state to the surface and (3) the client has committed a + * buffer to the surface. + */ +extern const struct wl_interface zxdg_surface_v6_interface; +/** + * @page page_iface_zxdg_toplevel_v6 zxdg_toplevel_v6 + * @section page_iface_zxdg_toplevel_v6_desc Description + * + * This interface defines an xdg_surface role which allows a surface to, + * among other things, set window-like properties such as maximize, + * fullscreen, and minimize, set application-specific metadata like title and + * id, and well as trigger user interactive operations such as interactive + * resize and move. + * @section page_iface_zxdg_toplevel_v6_api API + * See @ref iface_zxdg_toplevel_v6. + */ +/** + * @defgroup iface_zxdg_toplevel_v6 The zxdg_toplevel_v6 interface + * + * This interface defines an xdg_surface role which allows a surface to, + * among other things, set window-like properties such as maximize, + * fullscreen, and minimize, set application-specific metadata like title and + * id, and well as trigger user interactive operations such as interactive + * resize and move. + */ +extern const struct wl_interface zxdg_toplevel_v6_interface; +/** + * @page page_iface_zxdg_popup_v6 zxdg_popup_v6 + * @section page_iface_zxdg_popup_v6_desc Description + * + * A popup surface is a short-lived, temporary surface. It can be used to + * implement for example menus, popovers, tooltips and other similar user + * interface concepts. + * + * A popup can be made to take an explicit grab. See xdg_popup.grab for + * details. + * + * When the popup is dismissed, a popup_done event will be sent out, and at + * the same time the surface will be unmapped. See the xdg_popup.popup_done + * event for details. + * + * Explicitly destroying the xdg_popup object will also dismiss the popup and + * unmap the surface. Clients that want to dismiss the popup when another + * surface of their own is clicked should dismiss the popup using the destroy + * request. + * + * The parent surface must have either the xdg_toplevel or xdg_popup surface + * role. + * + * A newly created xdg_popup will be stacked on top of all previously created + * xdg_popup surfaces associated with the same xdg_toplevel. + * + * The parent of an xdg_popup must be mapped (see the xdg_surface + * description) before the xdg_popup itself. + * + * The x and y arguments passed when creating the popup object specify + * where the top left of the popup should be placed, relative to the + * local surface coordinates of the parent surface. See + * xdg_surface.get_popup. + * + * The client must call wl_surface.commit on the corresponding wl_surface + * for the xdg_popup state to take effect. + * @section page_iface_zxdg_popup_v6_api API + * See @ref iface_zxdg_popup_v6. + */ +/** + * @defgroup iface_zxdg_popup_v6 The zxdg_popup_v6 interface + * + * A popup surface is a short-lived, temporary surface. It can be used to + * implement for example menus, popovers, tooltips and other similar user + * interface concepts. + * + * A popup can be made to take an explicit grab. See xdg_popup.grab for + * details. + * + * When the popup is dismissed, a popup_done event will be sent out, and at + * the same time the surface will be unmapped. See the xdg_popup.popup_done + * event for details. + * + * Explicitly destroying the xdg_popup object will also dismiss the popup and + * unmap the surface. Clients that want to dismiss the popup when another + * surface of their own is clicked should dismiss the popup using the destroy + * request. + * + * The parent surface must have either the xdg_toplevel or xdg_popup surface + * role. + * + * A newly created xdg_popup will be stacked on top of all previously created + * xdg_popup surfaces associated with the same xdg_toplevel. + * + * The parent of an xdg_popup must be mapped (see the xdg_surface + * description) before the xdg_popup itself. + * + * The x and y arguments passed when creating the popup object specify + * where the top left of the popup should be placed, relative to the + * local surface coordinates of the parent surface. See + * xdg_surface.get_popup. + * + * The client must call wl_surface.commit on the corresponding wl_surface + * for the xdg_popup state to take effect. + */ +extern const struct wl_interface zxdg_popup_v6_interface; + +#ifndef ZXDG_SHELL_V6_ERROR_ENUM +#define ZXDG_SHELL_V6_ERROR_ENUM +enum zxdg_shell_v6_error { + /** + * given wl_surface has another role + */ + ZXDG_SHELL_V6_ERROR_ROLE = 0, + /** + * xdg_shell was destroyed before children + */ + ZXDG_SHELL_V6_ERROR_DEFUNCT_SURFACES = 1, + /** + * the client tried to map or destroy a non-topmost popup + */ + ZXDG_SHELL_V6_ERROR_NOT_THE_TOPMOST_POPUP = 2, + /** + * the client specified an invalid popup parent surface + */ + ZXDG_SHELL_V6_ERROR_INVALID_POPUP_PARENT = 3, + /** + * the client provided an invalid surface state + */ + ZXDG_SHELL_V6_ERROR_INVALID_SURFACE_STATE = 4, + /** + * the client provided an invalid positioner + */ + ZXDG_SHELL_V6_ERROR_INVALID_POSITIONER = 5, +}; +#endif /* ZXDG_SHELL_V6_ERROR_ENUM */ + +/** + * @ingroup iface_zxdg_shell_v6 + * @struct zxdg_shell_v6_interface + */ +struct zxdg_shell_v6_interface { + /** + * destroy xdg_shell + * + * Destroy this xdg_shell object. + * + * Destroying a bound xdg_shell object while there are surfaces + * still alive created by this xdg_shell object instance is illegal + * and will result in a protocol error. + */ + void (*destroy)(struct wl_client *client, + struct wl_resource *resource); + /** + * create a positioner object + * + * Create a positioner object. A positioner object is used to + * position surfaces relative to some parent surface. See the + * interface description and xdg_surface.get_popup for details. + */ + void (*create_positioner)(struct wl_client *client, + struct wl_resource *resource, + uint32_t id); + /** + * create a shell surface from a surface + * + * This creates an xdg_surface for the given surface. While + * xdg_surface itself is not a role, the corresponding surface may + * only be assigned a role extending xdg_surface, such as + * xdg_toplevel or xdg_popup. + * + * This creates an xdg_surface for the given surface. An + * xdg_surface is used as basis to define a role to a given + * surface, such as xdg_toplevel or xdg_popup. It also manages + * functionality shared between xdg_surface based surface roles. + * + * See the documentation of xdg_surface for more details about what + * an xdg_surface is and how it is used. + */ + void (*get_xdg_surface)(struct wl_client *client, + struct wl_resource *resource, + uint32_t id, + struct wl_resource *surface); + /** + * respond to a ping event + * + * A client must respond to a ping event with a pong request or + * the client may be deemed unresponsive. See xdg_shell.ping. + * @param serial serial of the ping event + */ + void (*pong)(struct wl_client *client, + struct wl_resource *resource, + uint32_t serial); +}; + +#define ZXDG_SHELL_V6_PING 0 + +/** + * @ingroup iface_zxdg_shell_v6 + */ +#define ZXDG_SHELL_V6_PING_SINCE_VERSION 1 + +/** + * @ingroup iface_zxdg_shell_v6 + * Sends an ping event to the client owning the resource. + * @param resource_ The client's resource + * @param serial pass this to the pong request + */ +static inline void +zxdg_shell_v6_send_ping(struct wl_resource *resource_, uint32_t serial) +{ + wl_resource_post_event(resource_, ZXDG_SHELL_V6_PING, serial); +} + +#ifndef ZXDG_POSITIONER_V6_ERROR_ENUM +#define ZXDG_POSITIONER_V6_ERROR_ENUM +enum zxdg_positioner_v6_error { + /** + * invalid input provided + */ + ZXDG_POSITIONER_V6_ERROR_INVALID_INPUT = 0, +}; +#endif /* ZXDG_POSITIONER_V6_ERROR_ENUM */ + +#ifndef ZXDG_POSITIONER_V6_ANCHOR_ENUM +#define ZXDG_POSITIONER_V6_ANCHOR_ENUM +enum zxdg_positioner_v6_anchor { + /** + * the center of the anchor rectangle + */ + ZXDG_POSITIONER_V6_ANCHOR_NONE = 0, + /** + * the top edge of the anchor rectangle + */ + ZXDG_POSITIONER_V6_ANCHOR_TOP = 1, + /** + * the bottom edge of the anchor rectangle + */ + ZXDG_POSITIONER_V6_ANCHOR_BOTTOM = 2, + /** + * the left edge of the anchor rectangle + */ + ZXDG_POSITIONER_V6_ANCHOR_LEFT = 4, + /** + * the right edge of the anchor rectangle + */ + ZXDG_POSITIONER_V6_ANCHOR_RIGHT = 8, +}; +#endif /* ZXDG_POSITIONER_V6_ANCHOR_ENUM */ + +#ifndef ZXDG_POSITIONER_V6_GRAVITY_ENUM +#define ZXDG_POSITIONER_V6_GRAVITY_ENUM +enum zxdg_positioner_v6_gravity { + /** + * center over the anchor edge + */ + ZXDG_POSITIONER_V6_GRAVITY_NONE = 0, + /** + * position above the anchor edge + */ + ZXDG_POSITIONER_V6_GRAVITY_TOP = 1, + /** + * position below the anchor edge + */ + ZXDG_POSITIONER_V6_GRAVITY_BOTTOM = 2, + /** + * position to the left of the anchor edge + */ + ZXDG_POSITIONER_V6_GRAVITY_LEFT = 4, + /** + * position to the right of the anchor edge + */ + ZXDG_POSITIONER_V6_GRAVITY_RIGHT = 8, +}; +#endif /* ZXDG_POSITIONER_V6_GRAVITY_ENUM */ + +#ifndef ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM +#define ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM +/** + * @ingroup iface_zxdg_positioner_v6 + * vertically resize the surface + * + * Resize the surface vertically so that it is completely unconstrained. + */ +enum zxdg_positioner_v6_constraint_adjustment { + ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_NONE = 0, + ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_X = 1, + ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_Y = 2, + ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_X = 4, + ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_Y = 8, + ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_X = 16, + ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_Y = 32, +}; +#endif /* ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM */ + +/** + * @ingroup iface_zxdg_positioner_v6 + * @struct zxdg_positioner_v6_interface + */ +struct zxdg_positioner_v6_interface { + /** + * destroy the xdg_positioner object + * + * Notify the compositor that the xdg_positioner will no longer + * be used. + */ + void (*destroy)(struct wl_client *client, + struct wl_resource *resource); + /** + * set the size of the to-be positioned rectangle + * + * Set the size of the surface that is to be positioned with the + * positioner object. The size is in surface-local coordinates and + * corresponds to the window geometry. See + * xdg_surface.set_window_geometry. + * + * If a zero or negative size is set the invalid_input error is + * raised. + * @param width width of positioned rectangle + * @param height height of positioned rectangle + */ + void (*set_size)(struct wl_client *client, + struct wl_resource *resource, + int32_t width, + int32_t height); + /** + * set the anchor rectangle within the parent surface + * + * Specify the anchor rectangle within the parent surface that + * the child surface will be placed relative to. The rectangle is + * relative to the window geometry as defined by + * xdg_surface.set_window_geometry of the parent surface. The + * rectangle must be at least 1x1 large. + * + * When the xdg_positioner object is used to position a child + * surface, the anchor rectangle may not extend outside the window + * geometry of the positioned child's parent surface. + * + * If a zero or negative size is set the invalid_input error is + * raised. + * @param x x position of anchor rectangle + * @param y y position of anchor rectangle + * @param width width of anchor rectangle + * @param height height of anchor rectangle + */ + void (*set_anchor_rect)(struct wl_client *client, + struct wl_resource *resource, + int32_t x, + int32_t y, + int32_t width, + int32_t height); + /** + * set anchor rectangle anchor edges + * + * Defines a set of edges for the anchor rectangle. These are + * used to derive an anchor point that the child surface will be + * positioned relative to. If two orthogonal edges are specified + * (e.g. 'top' and 'left'), then the anchor point will be the + * intersection of the edges (e.g. the top left position of the + * rectangle); otherwise, the derived anchor point will be centered + * on the specified edge, or in the center of the anchor rectangle + * if no edge is specified. + * + * If two parallel anchor edges are specified (e.g. 'left' and + * 'right'), the invalid_input error is raised. + * @param anchor bit mask of anchor edges + */ + void (*set_anchor)(struct wl_client *client, + struct wl_resource *resource, + uint32_t anchor); + /** + * set child surface gravity + * + * Defines in what direction a surface should be positioned, + * relative to the anchor point of the parent surface. If two + * orthogonal gravities are specified (e.g. 'bottom' and 'right'), + * then the child surface will be placed in the specified + * direction; otherwise, the child surface will be centered over + * the anchor point on any axis that had no gravity specified. + * + * If two parallel gravities are specified (e.g. 'left' and + * 'right'), the invalid_input error is raised. + * @param gravity bit mask of gravity directions + */ + void (*set_gravity)(struct wl_client *client, + struct wl_resource *resource, + uint32_t gravity); + /** + * set the adjustment to be done when constrained + * + * Specify how the window should be positioned if the originally + * intended position caused the surface to be constrained, meaning + * at least partially outside positioning boundaries set by the + * compositor. The adjustment is set by constructing a bitmask + * describing the adjustment to be made when the surface is + * constrained on that axis. + * + * If no bit for one axis is set, the compositor will assume that + * the child surface should not change its position on that axis + * when constrained. + * + * If more than one bit for one axis is set, the order of how + * adjustments are applied is specified in the corresponding + * adjustment descriptions. + * + * The default adjustment is none. + * @param constraint_adjustment bit mask of constraint adjustments + */ + void (*set_constraint_adjustment)(struct wl_client *client, + struct wl_resource *resource, + uint32_t constraint_adjustment); + /** + * set surface position offset + * + * Specify the surface position offset relative to the position + * of the anchor on the anchor rectangle and the anchor on the + * surface. For example if the anchor of the anchor rectangle is at + * (x, y), the surface has the gravity bottom|right, and the offset + * is (ox, oy), the calculated surface position will be (x + ox, y + * + oy). The offset position of the surface is the one used for + * constraint testing. See set_constraint_adjustment. + * + * An example use case is placing a popup menu on top of a user + * interface element, while aligning the user interface element of + * the parent surface with some user interface element placed + * somewhere in the popup surface. + * @param x surface position x offset + * @param y surface position y offset + */ + void (*set_offset)(struct wl_client *client, + struct wl_resource *resource, + int32_t x, + int32_t y); +}; + + +#ifndef ZXDG_SURFACE_V6_ERROR_ENUM +#define ZXDG_SURFACE_V6_ERROR_ENUM +enum zxdg_surface_v6_error { + ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED = 1, + ZXDG_SURFACE_V6_ERROR_ALREADY_CONSTRUCTED = 2, + ZXDG_SURFACE_V6_ERROR_UNCONFIGURED_BUFFER = 3, +}; +#endif /* ZXDG_SURFACE_V6_ERROR_ENUM */ + +/** + * @ingroup iface_zxdg_surface_v6 + * @struct zxdg_surface_v6_interface + */ +struct zxdg_surface_v6_interface { + /** + * destroy the xdg_surface + * + * Destroy the xdg_surface object. An xdg_surface must only be + * destroyed after its role object has been destroyed. + */ + void (*destroy)(struct wl_client *client, + struct wl_resource *resource); + /** + * assign the xdg_toplevel surface role + * + * This creates an xdg_toplevel object for the given xdg_surface + * and gives the associated wl_surface the xdg_toplevel role. + * + * See the documentation of xdg_toplevel for more details about + * what an xdg_toplevel is and how it is used. + */ + void (*get_toplevel)(struct wl_client *client, + struct wl_resource *resource, + uint32_t id); + /** + * assign the xdg_popup surface role + * + * This creates an xdg_popup object for the given xdg_surface and + * gives the associated wl_surface the xdg_popup role. + * + * See the documentation of xdg_popup for more details about what + * an xdg_popup is and how it is used. + */ + void (*get_popup)(struct wl_client *client, + struct wl_resource *resource, + uint32_t id, + struct wl_resource *parent, + struct wl_resource *positioner); + /** + * set the new window geometry + * + * The window geometry of a surface is its "visible bounds" from + * the user's perspective. Client-side decorations often have + * invisible portions like drop-shadows which should be ignored for + * the purposes of aligning, placing and constraining windows. + * + * The window geometry is double buffered, and will be applied at + * the time wl_surface.commit of the corresponding wl_surface is + * called. + * + * Once the window geometry of the surface is set, it is not + * possible to unset it, and it will remain the same until + * set_window_geometry is called again, even if a new subsurface or + * buffer is attached. + * + * If never set, the value is the full bounds of the surface, + * including any subsurfaces. This updates dynamically on every + * commit. This unset is meant for extremely simple clients. + * + * The arguments are given in the surface-local coordinate space of + * the wl_surface associated with this xdg_surface. + * + * The width and height must be greater than zero. Setting an + * invalid size will raise an error. When applied, the effective + * window geometry will be the set window geometry clamped to the + * bounding rectangle of the combined geometry of the surface of + * the xdg_surface and the associated subsurfaces. + */ + void (*set_window_geometry)(struct wl_client *client, + struct wl_resource *resource, + int32_t x, + int32_t y, + int32_t width, + int32_t height); + /** + * ack a configure event + * + * When a configure event is received, if a client commits the + * surface in response to the configure event, then the client must + * make an ack_configure request sometime before the commit + * request, passing along the serial of the configure event. + * + * For instance, for toplevel surfaces the compositor might use + * this information to move a surface to the top left only when the + * client has drawn itself for the maximized or fullscreen state. + * + * If the client receives multiple configure events before it can + * respond to one, it only has to ack the last configure event. + * + * A client is not required to commit immediately after sending an + * ack_configure request - it may even ack_configure several times + * before its next surface commit. + * + * A client may send multiple ack_configure requests before + * committing, but only the last request sent before a commit + * indicates which configure event the client really is responding + * to. + * @param serial the serial from the configure event + */ + void (*ack_configure)(struct wl_client *client, + struct wl_resource *resource, + uint32_t serial); +}; + +#define ZXDG_SURFACE_V6_CONFIGURE 0 + +/** + * @ingroup iface_zxdg_surface_v6 + */ +#define ZXDG_SURFACE_V6_CONFIGURE_SINCE_VERSION 1 + +/** + * @ingroup iface_zxdg_surface_v6 + * Sends an configure event to the client owning the resource. + * @param resource_ The client's resource + * @param serial serial of the configure event + */ +static inline void +zxdg_surface_v6_send_configure(struct wl_resource *resource_, uint32_t serial) +{ + wl_resource_post_event(resource_, ZXDG_SURFACE_V6_CONFIGURE, serial); +} + +#ifndef ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM +#define ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM +/** + * @ingroup iface_zxdg_toplevel_v6 + * edge values for resizing + * + * These values are used to indicate which edge of a surface + * is being dragged in a resize operation. + */ +enum zxdg_toplevel_v6_resize_edge { + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_NONE = 0, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP = 1, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM = 2, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_LEFT = 4, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_LEFT = 5, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_LEFT = 6, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_RIGHT = 8, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_RIGHT = 9, + ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_RIGHT = 10, +}; +#endif /* ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM */ + +#ifndef ZXDG_TOPLEVEL_V6_STATE_ENUM +#define ZXDG_TOPLEVEL_V6_STATE_ENUM +/** + * @ingroup iface_zxdg_toplevel_v6 + * the surface is now activated + * + * Client window decorations should be painted as if the window is + * active. Do not assume this means that the window actually has + * keyboard or pointer focus. + */ +enum zxdg_toplevel_v6_state { + /** + * the surface is maximized + */ + ZXDG_TOPLEVEL_V6_STATE_MAXIMIZED = 1, + /** + * the surface is fullscreen + */ + ZXDG_TOPLEVEL_V6_STATE_FULLSCREEN = 2, + /** + * the surface is being resized + */ + ZXDG_TOPLEVEL_V6_STATE_RESIZING = 3, + /** + * the surface is now activated + */ + ZXDG_TOPLEVEL_V6_STATE_ACTIVATED = 4, +}; +#endif /* ZXDG_TOPLEVEL_V6_STATE_ENUM */ + +/** + * @ingroup iface_zxdg_toplevel_v6 + * @struct zxdg_toplevel_v6_interface + */ +struct zxdg_toplevel_v6_interface { + /** + * destroy the xdg_toplevel + * + * Unmap and destroy the window. The window will be effectively + * hidden from the user's point of view, and all state like + * maximization, fullscreen, and so on, will be lost. + */ + void (*destroy)(struct wl_client *client, + struct wl_resource *resource); + /** + * set the parent of this surface + * + * Set the "parent" of this surface. This window should be + * stacked above a parent. The parent surface must be mapped as + * long as this surface is mapped. + * + * Parent windows should be set on dialogs, toolboxes, or other + * "auxiliary" surfaces, so that the parent is raised when the + * dialog is raised. + */ + void (*set_parent)(struct wl_client *client, + struct wl_resource *resource, + struct wl_resource *parent); + /** + * set surface title + * + * Set a short title for the surface. + * + * This string may be used to identify the surface in a task bar, + * window list, or other user interface elements provided by the + * compositor. + * + * The string must be encoded in UTF-8. + */ + void (*set_title)(struct wl_client *client, + struct wl_resource *resource, + const char *title); + /** + * set application ID + * + * Set an application identifier for the surface. + * + * The app ID identifies the general class of applications to which + * the surface belongs. The compositor can use this to group + * multiple surfaces together, or to determine how to launch a new + * application. + * + * For D-Bus activatable applications, the app ID is used as the + * D-Bus service name. + * + * The compositor shell will try to group application surfaces + * together by their app ID. As a best practice, it is suggested to + * select app ID's that match the basename of the application's + * .desktop file. For example, "org.freedesktop.FooViewer" where + * the .desktop file is "org.freedesktop.FooViewer.desktop". + * + * See the desktop-entry specification [0] for more details on + * application identifiers and how they relate to well-known D-Bus + * names and .desktop files. + * + * [0] http://standards.freedesktop.org/desktop-entry-spec/ + */ + void (*set_app_id)(struct wl_client *client, + struct wl_resource *resource, + const char *app_id); + /** + * show the window menu + * + * Clients implementing client-side decorations might want to + * show a context menu when right-clicking on the decorations, + * giving the user a menu that they can use to maximize or minimize + * the window. + * + * This request asks the compositor to pop up such a window menu at + * the given position, relative to the local surface coordinates of + * the parent surface. There are no guarantees as to what menu + * items the window menu contains. + * + * This request must be used in response to some sort of user + * action like a button press, key press, or touch down event. + * @param seat the wl_seat of the user event + * @param serial the serial of the user event + * @param x the x position to pop up the window menu at + * @param y the y position to pop up the window menu at + */ + void (*show_window_menu)(struct wl_client *client, + struct wl_resource *resource, + struct wl_resource *seat, + uint32_t serial, + int32_t x, + int32_t y); + /** + * start an interactive move + * + * Start an interactive, user-driven move of the surface. + * + * This request must be used in response to some sort of user + * action like a button press, key press, or touch down event. The + * passed serial is used to determine the type of interactive move + * (touch, pointer, etc). + * + * The server may ignore move requests depending on the state of + * the surface (e.g. fullscreen or maximized), or if the passed + * serial is no longer valid. + * + * If triggered, the surface will lose the focus of the device + * (wl_pointer, wl_touch, etc) used for the move. It is up to the + * compositor to visually indicate that the move is taking place, + * such as updating a pointer cursor, during the move. There is no + * guarantee that the device focus will return when the move is + * completed. + * @param seat the wl_seat of the user event + * @param serial the serial of the user event + */ + void (*move)(struct wl_client *client, + struct wl_resource *resource, + struct wl_resource *seat, + uint32_t serial); + /** + * start an interactive resize + * + * Start a user-driven, interactive resize of the surface. + * + * This request must be used in response to some sort of user + * action like a button press, key press, or touch down event. The + * passed serial is used to determine the type of interactive + * resize (touch, pointer, etc). + * + * The server may ignore resize requests depending on the state of + * the surface (e.g. fullscreen or maximized). + * + * If triggered, the client will receive configure events with the + * "resize" state enum value and the expected sizes. See the + * "resize" enum value for more details about what is required. The + * client must also acknowledge configure events using + * "ack_configure". After the resize is completed, the client will + * receive another "configure" event without the resize state. + * + * If triggered, the surface also will lose the focus of the device + * (wl_pointer, wl_touch, etc) used for the resize. It is up to the + * compositor to visually indicate that the resize is taking place, + * such as updating a pointer cursor, during the resize. There is + * no guarantee that the device focus will return when the resize + * is completed. + * + * The edges parameter specifies how the surface should be resized, + * and is one of the values of the resize_edge enum. The compositor + * may use this information to update the surface position for + * example when dragging the top left corner. The compositor may + * also use this information to adapt its behavior, e.g. choose an + * appropriate cursor image. + * @param seat the wl_seat of the user event + * @param serial the serial of the user event + * @param edges which edge or corner is being dragged + */ + void (*resize)(struct wl_client *client, + struct wl_resource *resource, + struct wl_resource *seat, + uint32_t serial, + uint32_t edges); + /** + * set the maximum size + * + * Set a maximum size for the window. + * + * The client can specify a maximum size so that the compositor + * does not try to configure the window beyond this size. + * + * The width and height arguments are in window geometry + * coordinates. See xdg_surface.set_window_geometry. + * + * Values set in this way are double-buffered. They will get + * applied on the next commit. + * + * The compositor can use this information to allow or disallow + * different states like maximize or fullscreen and draw accurate + * animations. + * + * Similarly, a tiling window manager may use this information to + * place and resize client windows in a more effective way. + * + * The client should not rely on the compositor to obey the maximum + * size. The compositor may decide to ignore the values set by the + * client and request a larger size. + * + * If never set, or a value of zero in the request, means that the + * client has no expected maximum size in the given dimension. As a + * result, a client wishing to reset the maximum size to an + * unspecified state can use zero for width and height in the + * request. + * + * Requesting a maximum size to be smaller than the minimum size of + * a surface is illegal and will result in a protocol error. + * + * The width and height must be greater than or equal to zero. + * Using strictly negative values for width and height will result + * in a protocol error. + */ + void (*set_max_size)(struct wl_client *client, + struct wl_resource *resource, + int32_t width, + int32_t height); + /** + * set the minimum size + * + * Set a minimum size for the window. + * + * The client can specify a minimum size so that the compositor + * does not try to configure the window below this size. + * + * The width and height arguments are in window geometry + * coordinates. See xdg_surface.set_window_geometry. + * + * Values set in this way are double-buffered. They will get + * applied on the next commit. + * + * The compositor can use this information to allow or disallow + * different states like maximize or fullscreen and draw accurate + * animations. + * + * Similarly, a tiling window manager may use this information to + * place and resize client windows in a more effective way. + * + * The client should not rely on the compositor to obey the minimum + * size. The compositor may decide to ignore the values set by the + * client and request a smaller size. + * + * If never set, or a value of zero in the request, means that the + * client has no expected minimum size in the given dimension. As a + * result, a client wishing to reset the minimum size to an + * unspecified state can use zero for width and height in the + * request. + * + * Requesting a minimum size to be larger than the maximum size of + * a surface is illegal and will result in a protocol error. + * + * The width and height must be greater than or equal to zero. + * Using strictly negative values for width and height will result + * in a protocol error. + */ + void (*set_min_size)(struct wl_client *client, + struct wl_resource *resource, + int32_t width, + int32_t height); + /** + * maximize the window + * + * Maximize the surface. + * + * After requesting that the surface should be maximized, the + * compositor will respond by emitting a configure event with the + * "maximized" state and the required window geometry. The client + * should then update its content, drawing it in a maximized state, + * i.e. without shadow or other decoration outside of the window + * geometry. The client must also acknowledge the configure when + * committing the new content (see ack_configure). + * + * It is up to the compositor to decide how and where to maximize + * the surface, for example which output and what region of the + * screen should be used. + * + * If the surface was already maximized, the compositor will still + * emit a configure event with the "maximized" state. + */ + void (*set_maximized)(struct wl_client *client, + struct wl_resource *resource); + /** + * unmaximize the window + * + * Unmaximize the surface. + * + * After requesting that the surface should be unmaximized, the + * compositor will respond by emitting a configure event without + * the "maximized" state. If available, the compositor will include + * the window geometry dimensions the window had prior to being + * maximized in the configure request. The client must then update + * its content, drawing it in a regular state, i.e. potentially + * with shadow, etc. The client must also acknowledge the configure + * when committing the new content (see ack_configure). + * + * It is up to the compositor to position the surface after it was + * unmaximized; usually the position the surface had before + * maximizing, if applicable. + * + * If the surface was already not maximized, the compositor will + * still emit a configure event without the "maximized" state. + */ + void (*unset_maximized)(struct wl_client *client, + struct wl_resource *resource); + /** + * set the window as fullscreen on a monitor + * + * Make the surface fullscreen. + * + * You can specify an output that you would prefer to be + * fullscreen. If this value is NULL, it's up to the compositor to + * choose which display will be used to map this surface. + * + * If the surface doesn't cover the whole output, the compositor + * will position the surface in the center of the output and + * compensate with black borders filling the rest of the output. + */ + void (*set_fullscreen)(struct wl_client *client, + struct wl_resource *resource, + struct wl_resource *output); + /** + */ + void (*unset_fullscreen)(struct wl_client *client, + struct wl_resource *resource); + /** + * set the window as minimized + * + * Request that the compositor minimize your surface. There is no + * way to know if the surface is currently minimized, nor is there + * any way to unset minimization on this surface. + * + * If you are looking to throttle redrawing when minimized, please + * instead use the wl_surface.frame event for this, as this will + * also work with live previews on windows in Alt-Tab, Expose or + * similar compositor features. + */ + void (*set_minimized)(struct wl_client *client, + struct wl_resource *resource); +}; + +#define ZXDG_TOPLEVEL_V6_CONFIGURE 0 +#define ZXDG_TOPLEVEL_V6_CLOSE 1 + +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_CONFIGURE_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_toplevel_v6 + */ +#define ZXDG_TOPLEVEL_V6_CLOSE_SINCE_VERSION 1 + +/** + * @ingroup iface_zxdg_toplevel_v6 + * Sends an configure event to the client owning the resource. + * @param resource_ The client's resource + */ +static inline void +zxdg_toplevel_v6_send_configure(struct wl_resource *resource_, int32_t width, int32_t height, struct wl_array *states) +{ + wl_resource_post_event(resource_, ZXDG_TOPLEVEL_V6_CONFIGURE, width, height, states); +} + +/** + * @ingroup iface_zxdg_toplevel_v6 + * Sends an close event to the client owning the resource. + * @param resource_ The client's resource + */ +static inline void +zxdg_toplevel_v6_send_close(struct wl_resource *resource_) +{ + wl_resource_post_event(resource_, ZXDG_TOPLEVEL_V6_CLOSE); +} + +#ifndef ZXDG_POPUP_V6_ERROR_ENUM +#define ZXDG_POPUP_V6_ERROR_ENUM +enum zxdg_popup_v6_error { + /** + * tried to grab after being mapped + */ + ZXDG_POPUP_V6_ERROR_INVALID_GRAB = 0, +}; +#endif /* ZXDG_POPUP_V6_ERROR_ENUM */ + +/** + * @ingroup iface_zxdg_popup_v6 + * @struct zxdg_popup_v6_interface + */ +struct zxdg_popup_v6_interface { + /** + * remove xdg_popup interface + * + * This destroys the popup. Explicitly destroying the xdg_popup + * object will also dismiss the popup, and unmap the surface. + * + * If this xdg_popup is not the "topmost" popup, a protocol error + * will be sent. + */ + void (*destroy)(struct wl_client *client, + struct wl_resource *resource); + /** + * make the popup take an explicit grab + * + * This request makes the created popup take an explicit grab. An + * explicit grab will be dismissed when the user dismisses the + * popup, or when the client destroys the xdg_popup. This can be + * done by the user clicking outside the surface, using the + * keyboard, or even locking the screen through closing the lid or + * a timeout. + * + * If the compositor denies the grab, the popup will be immediately + * dismissed. + * + * This request must be used in response to some sort of user + * action like a button press, key press, or touch down event. The + * serial number of the event should be passed as 'serial'. + * + * The parent of a grabbing popup must either be an xdg_toplevel + * surface or another xdg_popup with an explicit grab. If the + * parent is another xdg_popup it means that the popups are nested, + * with this popup now being the topmost popup. + * + * Nested popups must be destroyed in the reverse order they were + * created in, e.g. the only popup you are allowed to destroy at + * all times is the topmost one. + * + * When compositors choose to dismiss a popup, they may dismiss + * every nested grabbing popup as well. When a compositor dismisses + * popups, it will follow the same dismissing order as required + * from the client. + * + * The parent of a grabbing popup must either be another xdg_popup + * with an active explicit grab, or an xdg_popup or xdg_toplevel, + * if there are no explicit grabs already taken. + * + * If the topmost grabbing popup is destroyed, the grab will be + * returned to the parent of the popup, if that parent previously + * had an explicit grab. + * + * If the parent is a grabbing popup which has already been + * dismissed, this popup will be immediately dismissed. If the + * parent is a popup that did not take an explicit grab, an error + * will be raised. + * + * During a popup grab, the client owning the grab will receive + * pointer and touch events for all their surfaces as normal + * (similar to an "owner-events" grab in X11 parlance), while the + * top most grabbing popup will always have keyboard focus. + * @param seat the wl_seat of the user event + * @param serial the serial of the user event + */ + void (*grab)(struct wl_client *client, + struct wl_resource *resource, + struct wl_resource *seat, + uint32_t serial); +}; + +#define ZXDG_POPUP_V6_CONFIGURE 0 +#define ZXDG_POPUP_V6_POPUP_DONE 1 + +/** + * @ingroup iface_zxdg_popup_v6 + */ +#define ZXDG_POPUP_V6_CONFIGURE_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_popup_v6 + */ +#define ZXDG_POPUP_V6_POPUP_DONE_SINCE_VERSION 1 + +/** + * @ingroup iface_zxdg_popup_v6 + * Sends an configure event to the client owning the resource. + * @param resource_ The client's resource + * @param x x position relative to parent surface window geometry + * @param y y position relative to parent surface window geometry + * @param width window geometry width + * @param height window geometry height + */ +static inline void +zxdg_popup_v6_send_configure(struct wl_resource *resource_, int32_t x, int32_t y, int32_t width, int32_t height) +{ + wl_resource_post_event(resource_, ZXDG_POPUP_V6_CONFIGURE, x, y, width, height); +} + +/** + * @ingroup iface_zxdg_popup_v6 + * Sends an popup_done event to the client owning the resource. + * @param resource_ The client's resource + */ +static inline void +zxdg_popup_v6_send_popup_done(struct wl_resource *resource_) +{ + wl_resource_post_event(resource_, ZXDG_POPUP_V6_POPUP_DONE); +} + +#ifdef __cplusplus +} +#endif + +#endif
diff --git a/third_party/wayland-protocols/protocol/xdg-shell-protocol.c b/third_party/wayland-protocols/protocol/xdg-shell-v5-protocol.c similarity index 100% rename from third_party/wayland-protocols/protocol/xdg-shell-protocol.c rename to third_party/wayland-protocols/protocol/xdg-shell-v5-protocol.c
diff --git a/third_party/wayland-protocols/protocol/xdg-shell-v6-protocol.c b/third_party/wayland-protocols/protocol/xdg-shell-v6-protocol.c new file mode 100644 index 0000000..d94fe6a4 --- /dev/null +++ b/third_party/wayland-protocols/protocol/xdg-shell-v6-protocol.c
@@ -0,0 +1,162 @@ +/* Generated by wayland-scanner 1.11.0 */ + +/* + * Copyright © 2008-2013 Kristian Høgsberg + * Copyright © 2013 Rafael Antognolli + * Copyright © 2013 Jasper St. Pierre + * Copyright © 2010-2013 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include <stdlib.h> +#include <stdint.h> +#include "wayland-util.h" + +extern const struct wl_interface wl_output_interface; +extern const struct wl_interface wl_seat_interface; +extern const struct wl_interface wl_surface_interface; +extern const struct wl_interface zxdg_popup_v6_interface; +extern const struct wl_interface zxdg_positioner_v6_interface; +extern const struct wl_interface zxdg_surface_v6_interface; +extern const struct wl_interface zxdg_toplevel_v6_interface; + +static const struct wl_interface *types[] = { + NULL, + NULL, + NULL, + NULL, + &zxdg_positioner_v6_interface, + &zxdg_surface_v6_interface, + &wl_surface_interface, + &zxdg_toplevel_v6_interface, + &zxdg_popup_v6_interface, + &zxdg_surface_v6_interface, + &zxdg_positioner_v6_interface, + &zxdg_toplevel_v6_interface, + &wl_seat_interface, + NULL, + NULL, + NULL, + &wl_seat_interface, + NULL, + &wl_seat_interface, + NULL, + NULL, + &wl_output_interface, + &wl_seat_interface, + NULL, +}; + +static const struct wl_message zxdg_shell_v6_requests[] = { + { "destroy", "", types + 0 }, + { "create_positioner", "n", types + 4 }, + { "get_xdg_surface", "no", types + 5 }, + { "pong", "u", types + 0 }, +}; + +static const struct wl_message zxdg_shell_v6_events[] = { + { "ping", "u", types + 0 }, +}; + +WL_EXPORT const struct wl_interface zxdg_shell_v6_interface = { + "zxdg_shell_v6", 1, + 4, zxdg_shell_v6_requests, + 1, zxdg_shell_v6_events, +}; + +static const struct wl_message zxdg_positioner_v6_requests[] = { + { "destroy", "", types + 0 }, + { "set_size", "ii", types + 0 }, + { "set_anchor_rect", "iiii", types + 0 }, + { "set_anchor", "u", types + 0 }, + { "set_gravity", "u", types + 0 }, + { "set_constraint_adjustment", "u", types + 0 }, + { "set_offset", "ii", types + 0 }, +}; + +WL_EXPORT const struct wl_interface zxdg_positioner_v6_interface = { + "zxdg_positioner_v6", 1, + 7, zxdg_positioner_v6_requests, + 0, NULL, +}; + +static const struct wl_message zxdg_surface_v6_requests[] = { + { "destroy", "", types + 0 }, + { "get_toplevel", "n", types + 7 }, + { "get_popup", "noo", types + 8 }, + { "set_window_geometry", "iiii", types + 0 }, + { "ack_configure", "u", types + 0 }, +}; + +static const struct wl_message zxdg_surface_v6_events[] = { + { "configure", "u", types + 0 }, +}; + +WL_EXPORT const struct wl_interface zxdg_surface_v6_interface = { + "zxdg_surface_v6", 1, + 5, zxdg_surface_v6_requests, + 1, zxdg_surface_v6_events, +}; + +static const struct wl_message zxdg_toplevel_v6_requests[] = { + { "destroy", "", types + 0 }, + { "set_parent", "?o", types + 11 }, + { "set_title", "s", types + 0 }, + { "set_app_id", "s", types + 0 }, + { "show_window_menu", "ouii", types + 12 }, + { "move", "ou", types + 16 }, + { "resize", "ouu", types + 18 }, + { "set_max_size", "ii", types + 0 }, + { "set_min_size", "ii", types + 0 }, + { "set_maximized", "", types + 0 }, + { "unset_maximized", "", types + 0 }, + { "set_fullscreen", "?o", types + 21 }, + { "unset_fullscreen", "", types + 0 }, + { "set_minimized", "", types + 0 }, +}; + +static const struct wl_message zxdg_toplevel_v6_events[] = { + { "configure", "iia", types + 0 }, + { "close", "", types + 0 }, +}; + +WL_EXPORT const struct wl_interface zxdg_toplevel_v6_interface = { + "zxdg_toplevel_v6", 1, + 14, zxdg_toplevel_v6_requests, + 2, zxdg_toplevel_v6_events, +}; + +static const struct wl_message zxdg_popup_v6_requests[] = { + { "destroy", "", types + 0 }, + { "grab", "ou", types + 22 }, +}; + +static const struct wl_message zxdg_popup_v6_events[] = { + { "configure", "iiii", types + 0 }, + { "popup_done", "", types + 0 }, +}; + +WL_EXPORT const struct wl_interface zxdg_popup_v6_interface = { + "zxdg_popup_v6", 1, + 2, zxdg_popup_v6_requests, + 2, zxdg_popup_v6_events, +}; +
diff --git a/tools/clang/OWNERS b/tools/clang/OWNERS index d0e3cf46..4c7cbe4f 100644 --- a/tools/clang/OWNERS +++ b/tools/clang/OWNERS
@@ -3,3 +3,5 @@ # Only for clang tooling. dcheng@chromium.org + +# COMPONENT: Tools
diff --git a/tools/clang/rewrite_to_chrome_style/OWNERS b/tools/clang/rewrite_to_chrome_style/OWNERS index cc9ab9f..b2ca427 100644 --- a/tools/clang/rewrite_to_chrome_style/OWNERS +++ b/tools/clang/rewrite_to_chrome_style/OWNERS
@@ -1,3 +1,5 @@ danakj@chromium.org dcheng@chromium.org lukasza@chromium.org + +# COMPONENT: Tools
diff --git a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp index c173373..025fbdcc 100644 --- a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp +++ b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
@@ -730,7 +730,6 @@ bool GetNameForDecl(const clang::FunctionDecl& decl, clang::ASTContext& context, - bool for_type_trait, std::string& name) { name = decl.getName().str(); name[0] = clang::toUppercase(name[0]); @@ -778,7 +777,6 @@ bool GetNameForDecl(const clang::EnumConstantDecl& decl, clang::ASTContext& context, - bool for_type_trait, std::string& name) { StringRef original_name = decl.getName(); @@ -806,7 +804,6 @@ bool GetNameForDecl(const clang::FieldDecl& decl, clang::ASTContext& context, - bool for_type_trait, std::string& name) { StringRef original_name = decl.getName(); bool member_prefix = original_name.startswith(kBlinkFieldPrefix); @@ -826,7 +823,6 @@ bool GetNameForDecl(const clang::VarDecl& decl, clang::ASTContext& context, - bool for_type_trait, std::string& name) { StringRef original_name = decl.getName(); @@ -854,6 +850,13 @@ return false; } + // This is a type trait that appears in consumers of WTF as well as inside + // WTF. We want it to be named in this_style_of_case accordingly. + if (IsKnownTraitName(original_name)) { + name = CamelCaseToUnderscoreCase(original_name); + return true; + } + // static class members match against VarDecls. Blink style dictates that // these should be prefixed with `s_`, so strip that off. Also check for `m_` // and strip that off too, for code that accidentally uses the wrong prefix. @@ -862,13 +865,6 @@ else if (original_name.startswith(kBlinkFieldPrefix)) original_name = original_name.substr(strlen(kBlinkFieldPrefix)); - // Type traits are written in_this_form rather than kInThisForm and not like - // members. - if (for_type_trait) { - name = CamelCaseToUnderscoreCase(original_name); - return true; - } - bool is_const = IsProbablyConst(decl, context); if (is_const) { // Don't try to rename constants that already conform to Chrome style. @@ -907,34 +903,31 @@ bool GetNameForDecl(const clang::FunctionTemplateDecl& decl, clang::ASTContext& context, - bool for_type_trait, std::string& name) { clang::FunctionDecl* templated_function = decl.getTemplatedDecl(); - return GetNameForDecl(*templated_function, context, for_type_trait, name); + return GetNameForDecl(*templated_function, context, name); } bool GetNameForDecl(const clang::NamedDecl& decl, clang::ASTContext& context, - bool for_type_trait, std::string& name) { if (auto* function = clang::dyn_cast<clang::FunctionDecl>(&decl)) - return GetNameForDecl(*function, context, for_type_trait, name); + return GetNameForDecl(*function, context, name); if (auto* var = clang::dyn_cast<clang::VarDecl>(&decl)) - return GetNameForDecl(*var, context, for_type_trait, name); + return GetNameForDecl(*var, context, name); if (auto* field = clang::dyn_cast<clang::FieldDecl>(&decl)) - return GetNameForDecl(*field, context, for_type_trait, name); + return GetNameForDecl(*field, context, name); if (auto* function_template = clang::dyn_cast<clang::FunctionTemplateDecl>(&decl)) - return GetNameForDecl(*function_template, context, for_type_trait, name); + return GetNameForDecl(*function_template, context, name); if (auto* enumc = clang::dyn_cast<clang::EnumConstantDecl>(&decl)) - return GetNameForDecl(*enumc, context, for_type_trait, name); + return GetNameForDecl(*enumc, context, name); return false; } bool GetNameForDecl(const clang::UsingDecl& decl, clang::ASTContext& context, - bool for_type_trait, std::string& name) { assert(decl.shadow_size() > 0); @@ -942,8 +935,7 @@ // functions, it can introduce multiple shadowed declarations. Just using the // first one is OK, since overloaded functions have the same name, by // definition. - return GetNameForDecl(*decl.shadow_begin()->getTargetDecl(), context, - for_type_trait, name); + return GetNameForDecl(*decl.shadow_begin()->getTargetDecl(), context, name); } template <typename Type> @@ -1148,7 +1140,7 @@ // Get the new name. std::string new_name; - if (!GetNameForDecl(*decl, *result.Context, for_type_traits_, new_name)) + if (!GetNameForDecl(*decl, *result.Context, new_name)) return; // If false, the name was not suitable for renaming. // Check if we are able to rewrite the decl (to avoid rewriting if the @@ -1161,11 +1153,6 @@ Base::AddReplacement(result, old_name, std::move(new_name)); } - - void set_for_type_traits(bool set) { for_type_traits_ = set; } - - protected: - bool for_type_traits_ = false; }; using FieldDeclRewriter = DeclRewriterBase<clang::FieldDecl, clang::NamedDecl>; @@ -1493,16 +1480,16 @@ // }; // matches |x|, |y|, and |VALUE|. auto field_decl_matcher = id("decl", fieldDecl(in_blink_namespace)); - auto is_type_trait_value = varDecl( - anyOf(hasName("value"), isKnownTraitName()), hasStaticStorageDuration(), - isPublic(), hasType(isConstQualified()), - hasType(type(anyOf(builtinType(), enumType()))), - unless(hasAncestor(recordDecl( - has(cxxMethodDecl(isUserProvided(), isInstanceMethod())))))); + auto is_type_trait_value = + varDecl(hasName("value"), hasStaticStorageDuration(), isPublic(), + hasType(isConstQualified()), + hasType(type(anyOf(builtinType(), enumType()))), + unless(hasAncestor(recordDecl( + has(cxxMethodDecl(isUserProvided(), isInstanceMethod())))))); auto var_decl_matcher = id("decl", varDecl(in_blink_namespace, unless(is_type_trait_value))); - auto type_trait_matcher = - id("decl", varDecl(is_type_trait_value, unless(hasName("value")))); + // For known trait names, rename every instance anywhere in the codebase. + auto type_trait_decl_matcher = id("decl", varDecl(isKnownTraitName())); auto enum_member_decl_matcher = id("decl", enumConstantDecl(in_blink_namespace)); @@ -1511,10 +1498,7 @@ VarDeclRewriter var_decl_rewriter(&replacements); match_finder.addMatcher(var_decl_matcher, &var_decl_rewriter); - - VarDeclRewriter type_trait_rewriter(&replacements); - type_trait_rewriter.set_for_type_traits(true); - match_finder.addMatcher(type_trait_matcher, &type_trait_rewriter); + match_finder.addMatcher(type_trait_decl_matcher, &var_decl_rewriter); EnumConstantDeclRewriter enum_member_decl_rewriter(&replacements); match_finder.addMatcher(enum_member_decl_matcher, &enum_member_decl_rewriter); @@ -1537,7 +1521,8 @@ // there's nothing interesting to rewrite in those either. unless(hasAncestor(functionDecl(isDefaulted()))))); auto decl_ref_matcher = id("expr", declRefExpr(to(var_decl_matcher))); - auto type_trait_ref_matcher = id("expr", declRefExpr(to(type_trait_matcher))); + auto type_trait_ref_matcher = + id("expr", declRefExpr(to(type_trait_decl_matcher))); auto enum_member_ref_matcher = id("expr", declRefExpr(to(enum_member_decl_matcher))); @@ -1546,10 +1531,7 @@ DeclRefRewriter decl_ref_rewriter(&replacements); match_finder.addMatcher(decl_ref_matcher, &decl_ref_rewriter); - - DeclRefRewriter type_trait_ref_rewriter(&replacements); - type_trait_ref_rewriter.set_for_type_traits(true); - match_finder.addMatcher(type_trait_ref_matcher, &type_trait_ref_rewriter); + match_finder.addMatcher(type_trait_ref_matcher, &decl_ref_rewriter); EnumConstantDeclRefRewriter enum_member_ref_rewriter(&replacements); match_finder.addMatcher(enum_member_ref_matcher, &enum_member_ref_rewriter);
diff --git a/tools/clang_format_merge_driver/OWNERS b/tools/clang_format_merge_driver/OWNERS index 092d09f..7011ca3 100644 --- a/tools/clang_format_merge_driver/OWNERS +++ b/tools/clang_format_merge_driver/OWNERS
@@ -1,2 +1,4 @@ dcheng@chromium.org thakis@chromium.org + +# COMPONENT: Tools
diff --git a/tools/gritsettings/resource_ids b/tools/gritsettings/resource_ids index d454de7..1aeb81a 100644 --- a/tools/gritsettings/resource_ids +++ b/tools/gritsettings/resource_ids
@@ -105,38 +105,38 @@ "structures": [11920], }, "chrome/browser/resources/options_test_resources.grd": { - "structures": [11950], + "structures": [11970], }, "chrome/browser/resources/password_manager_internals_resources.grd": { - "includes": [11960], + "includes": [11980], }, "chrome/browser/resources/quota_internals_resources.grd": { - "includes": [11970], + "includes": [11990], }, "chrome/browser/resources/settings/settings_resources.grd": { - "structures": [12000], + "structures": [12020], }, "chrome/browser/resources/sync_file_system_internals_resources.grd": { - "includes": [12500], + "includes": [12520], }, "chrome/browser/resources/task_scheduler_internals/resources.grd": { - "includes": [12530], + "includes": [12550], }, "chrome/browser/resources/translate_internals_resources.grd": { - "includes": [12540], + "includes": [12560], }, # END chrome/browser section. # START chrome/ miscellaneous section. "chrome/common/common_resources.grd": { - "includes": [12700], + "includes": [12720], }, "chrome/renderer/resources/renderer_resources.grd": { - "includes": [12710], - "structures": [12790], + "includes": [12730], + "structures": [12810], }, "chrome/test/data/webui_test_resources.grd": { - "includes": [12800], + "includes": [12820], }, # END chrome/ miscellaneous section.
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 988cba6..26765d7 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -7161,6 +7161,15 @@ </summary> </histogram> +<histogram name="Compositing.LayerTreeImpl.FindClosestMatchingLayerUs" + units="microseconds"> + <owner>paint-dev@chromium.org</owner> + <summary> + Time spent finding the closest matching layer to a given point, in + microseconds. Recorded each time we do hit testing on LayerTreeImpl. + </summary> +</histogram> + <histogram name="Compositing.NumActiveLayers"> <obsolete> Deprecated 04/2016, replaced by similar metrics under Compositing.Renderer @@ -30427,6 +30436,16 @@ </summary> </histogram> +<histogram name="Net.Certificate.VerificationSuccessAfterAIAFetchingNeeded" + enum="BooleanSuccess"> + <owner>estark@chromium.org</owner> + <summary> + Whether or not certificate verification was successful after attempting AIA + fetching on Android. Recorded once per certificate verification on Android + that resulted in an untrusted-root error without AIA fetching. + </summary> +</histogram> + <histogram name="Net.CertificatePinSuccess" enum="BooleanSuccess"> <obsolete> Renamed to Net.PublicKeyPinSuccess 28 Oct 2011. @@ -34171,6 +34190,15 @@ </summary> </histogram> +<histogram name="Net.QuicSession.InitialRttEsitmateSource" + enum="InitialRttEstimateSource"> + <owner>rch@chromium.org</owner> + <summary> + The source for the initial RTT estimate recorded when a QUIC session is + created. + </summary> +</histogram> + <histogram name="Net.QuicSession.LocallyTimedOutWithOpenStreams.TimeSinceLastReceived"> <owner>rch@chromium.org</owner> @@ -61475,6 +61503,15 @@ </summary> </histogram> +<histogram name="Settings.LegacyMachineIdGenerationSuccess" + enum="BooleanSuccess"> + <owner>proberge@chromium.org</owner> + <summary> + Whether generation of the RLZ deterministic machine-specific device id was + successful when creating the ProfilePrefStore. + </summary> +</histogram> + <histogram name="Settings.LoadCompletedTime" units="ms"> <owner>stevenjb@chromium.org</owner> <summary> @@ -85730,6 +85767,7 @@ label="Enable the creation of roaming copies for Chrome profiles."/> <int value="359" label="Set the roaming profile directory."/> <int value="360" label="Configure the New Tab page URL."/> + <int value="361" label="Maximum SSL version enabled"/> </enum> <enum name="EnterprisePolicyInvalidations" type="int"> @@ -93434,6 +93472,13 @@ <int value="3" label="InfoBar dismissed by clicking the 'X'"/> </enum> +<enum name="InitialRttEstimateSource" type="int"> + <int value="0" label="Default"/> + <int value="1" label="Cached"/> + <int value="2" label="2G"/> + <int value="3" label="3G"/> +</enum> + <enum name="InjectedAdType" type="int"> <int value="0" label="Invalid"/> <int value="1" label="IFrame"/>
diff --git a/ui/base/clipboard/OWNERS b/ui/base/clipboard/OWNERS index 859c2c6..c1468a7 100644 --- a/ui/base/clipboard/OWNERS +++ b/ui/base/clipboard/OWNERS
@@ -1 +1,4 @@ dcheng@chromium.org + +# TEAM: storage-dev@chromium.org +# COMPONENT: Blink>DataTransfer
diff --git a/ui/events/ipc/OWNERS b/ui/events/ipc/OWNERS index 053b5869..d7e6819 100644 --- a/ui/events/ipc/OWNERS +++ b/ui/events/ipc/OWNERS
@@ -13,3 +13,5 @@ per-file *_param_traits*.*=set noparent per-file *_param_traits*.*=file://ipc/SECURITY_OWNERS + +# COMPONENT: UI
diff --git a/ui/gfx/codec/OWNERS b/ui/gfx/codec/OWNERS index 44aa7e47..cc31a4f6 100644 --- a/ui/gfx/codec/OWNERS +++ b/ui/gfx/codec/OWNERS
@@ -1,2 +1,4 @@ erg@chromium.org dcheng@chromium.org + +# COMPONENT: UI>GFX
diff --git a/ui/views/animation/ink_drop_host_view.cc b/ui/views/animation/ink_drop_host_view.cc index 22dd4f1..4d56b36 100644 --- a/ui/views/animation/ink_drop_host_view.cc +++ b/ui/views/animation/ink_drop_host_view.cc
@@ -19,9 +19,6 @@ namespace views { namespace { -// Size used for the default SquareInkDropRipple. -const int kInkDropSize = 24; - // The scale factor to compute the large size of the default // SquareInkDropRipple. const float kLargeInkDropScale = 1.333f; @@ -32,8 +29,8 @@ } // namespace // static -const int InkDropHostView::kInkDropSmallCornerRadius = 2; -const int InkDropHostView::kInkDropLargeCornerRadius = 4; +constexpr int InkDropHostView::kInkDropSmallCornerRadius; +constexpr int InkDropHostView::kInkDropLargeCornerRadius; // An EventHandler that is guaranteed to be invoked and is not prone to // InkDropHostView descendents who do not call @@ -167,23 +164,21 @@ } std::unique_ptr<InkDropRipple> InkDropHostView::CreateDefaultInkDropRipple( - const gfx::Point& center_point) const { - const gfx::Size small_size(kInkDropSize, kInkDropSize); + const gfx::Point& center_point, + const gfx::Size& size) const { std::unique_ptr<InkDropRipple> ripple(new SquareInkDropRipple( - CalculateLargeInkDropSize(small_size), kInkDropLargeCornerRadius, - small_size, kInkDropSmallCornerRadius, center_point, - GetInkDropBaseColor(), ink_drop_visible_opacity())); + CalculateLargeInkDropSize(size), kInkDropLargeCornerRadius, size, + kInkDropSmallCornerRadius, center_point, GetInkDropBaseColor(), + ink_drop_visible_opacity())); return ripple; } std::unique_ptr<InkDropHighlight> -InkDropHostView::CreateDefaultInkDropHighlight( - const gfx::PointF& center_point) const { - const gfx::Size small_size(kInkDropSize, kInkDropSize); - std::unique_ptr<InkDropHighlight> highlight( - new InkDropHighlight(small_size, kInkDropSmallCornerRadius, center_point, - GetInkDropBaseColor())); - highlight->set_explode_size(CalculateLargeInkDropSize(small_size)); +InkDropHostView::CreateDefaultInkDropHighlight(const gfx::PointF& center_point, + const gfx::Size& size) const { + std::unique_ptr<InkDropHighlight> highlight(new InkDropHighlight( + size, kInkDropSmallCornerRadius, center_point, GetInkDropBaseColor())); + highlight->set_explode_size(CalculateLargeInkDropSize(size)); return highlight; }
diff --git a/ui/views/animation/ink_drop_host_view.h b/ui/views/animation/ink_drop_host_view.h index eb442da..9ca5955 100644 --- a/ui/views/animation/ink_drop_host_view.h +++ b/ui/views/animation/ink_drop_host_view.h
@@ -54,8 +54,11 @@ void SetInkDropMode(InkDropMode ink_drop_mode); protected: - static const int kInkDropSmallCornerRadius; - static const int kInkDropLargeCornerRadius; + static constexpr int kInkDropSmallCornerRadius = 2; + static constexpr int kInkDropLargeCornerRadius = 4; + + // Size used for the default SquareInkDropRipple. + static constexpr int kDefaultInkDropSize = 24; // Returns a large ink drop size based on the |small_size| that works well // with the SquareInkDropRipple animation durations. @@ -68,11 +71,15 @@ // Returns the default InkDropRipple centered on |center_point|. std::unique_ptr<InkDropRipple> CreateDefaultInkDropRipple( - const gfx::Point& center_point) const; + const gfx::Point& center_point, + const gfx::Size& size = gfx::Size(kDefaultInkDropSize, + kDefaultInkDropSize)) const; // Returns the default InkDropHighlight centered on |center_point|. std::unique_ptr<InkDropHighlight> CreateDefaultInkDropHighlight( - const gfx::PointF& center_point) const; + const gfx::PointF& center_point, + const gfx::Size& size = gfx::Size(kDefaultInkDropSize, + kDefaultInkDropSize)) const; // Returns the point of the |last_ripple_triggering_event_| if it was a // LocatedEvent, otherwise the center point of the local bounds is returned.
diff --git a/ui/views/examples/examples_main.cc b/ui/views/examples/examples_main.cc index 26b103f..55e11c1 100644 --- a/ui/views/examples/examples_main.cc +++ b/ui/views/examples/examples_main.cc
@@ -97,6 +97,7 @@ #if defined(USE_AURA) std::unique_ptr<aura::Env> env = aura::Env::CreateInstance(); aura::Env::GetInstance()->set_context_factory(context_factory.get()); + aura::Env::GetInstance()->set_context_factory_private(context_factory.get()); #endif ui::InitializeInputMethodForTesting(); ui::MaterialDesignController::Initialize();
diff --git a/ui/webui/resources/.clang-format b/ui/webui/resources/.clang-format deleted file mode 100644 index 2baaa8d..0000000 --- a/ui/webui/resources/.clang-format +++ /dev/null
@@ -1,8 +0,0 @@ -# Please keep this file the same as chrome/browser/resources/.clang-format. -BasedOnStyle: Chromium - -# Renaming quotes in <include> and <if> break things. -# For normal JS code, please prefer ' to ". -JavaScriptQuotes: Leave - -AllowShortFunctionsOnASingleLine: Empty
diff --git a/ui/webui/resources/cr_elements/cr_scrollable_behavior.js b/ui/webui/resources/cr_elements/cr_scrollable_behavior.js index 5589c18e..1858ccf 100644 --- a/ui/webui/resources/cr_elements/cr_scrollable_behavior.js +++ b/ui/webui/resources/cr_elements/cr_scrollable_behavior.js
@@ -113,7 +113,8 @@ 'can-scroll', scrollable.clientHeight < scrollable.scrollHeight); scrollable.classList.toggle('is-scrolled', scrollable.scrollTop > 0); scrollable.classList.toggle( - 'scrolled-to-bottom', scrollable.scrollTop + scrollable.clientHeight >= + 'scrolled-to-bottom', + scrollable.scrollTop + scrollable.clientHeight >= scrollable.scrollHeight); }, };
diff --git a/ui/webui/resources/cr_elements/network/cr_network_icon.html b/ui/webui/resources/cr_elements/network/cr_network_icon.html index 8e50825..27875ca5 100644 --- a/ui/webui/resources/cr_elements/network/cr_network_icon.html +++ b/ui/webui/resources/cr_elements/network/cr_network_icon.html
@@ -7,6 +7,7 @@ <template> <style> :host { + display: inline-flex; overflow: hidden; padding: 2px; position: relative; @@ -125,10 +126,10 @@ </style> <div id="icon" class$="[[getIconClass_(networkState, isListItem)]]"> </div> - <iron-icon id="technology" hidden ="[[!showTechnology_(networkState)]]" + <iron-icon id="technology" hidden="[[!showTechnology_(networkState)]]" icon="[[getTechnology_(networkState)]]"> </iron-icon> - <iron-icon id="secure" hidden ="[[!showSecure_(networkState)]]" + <iron-icon id="secure" hidden="[[!showSecure_(networkState)]]" icon="network:badge-secure"> </iron-icon> </template>
diff --git a/ui/webui/resources/html/action_link_css.html b/ui/webui/resources/html/action_link_css.html index 94ba00e..024fa7da 100644 --- a/ui/webui/resources/html/action_link_css.html +++ b/ui/webui/resources/html/action_link_css.html
@@ -7,6 +7,7 @@ <style> [is='action-link'] { @apply(--cr-actionable); + display: inline-block; text-decoration: none; }
diff --git a/ui/webui/resources/js/analytics.js b/ui/webui/resources/js/analytics.js index 6a467d37..a83fc807 100644 --- a/ui/webui/resources/js/analytics.js +++ b/ui/webui/resources/js/analytics.js
@@ -5,4 +5,4 @@ // This file serves as a proxy to bring the included js file from /third_party // into its correct location under the resources directory tree, whence it is // delivered via a chrome://resources URL. See ../webui_resources.grd. -<include src="../../../../third_party/analytics/google-analytics-bundle.js"> +<include src='../../../../third_party/analytics/google-analytics-bundle.js'>
diff --git a/ui/webui/resources/js/cr/ui/bubble.js b/ui/webui/resources/js/cr/ui/bubble.js index fe97030..167ebf3d 100644 --- a/ui/webui/resources/js/cr/ui/bubble.js +++ b/ui/webui/resources/js/cr/ui/bubble.js
@@ -191,9 +191,9 @@ left = Math.max(Math.min(left, max_left_pos), min_left_pos); var arrowTip = Math.min( Math.max( - arrow.width / 2, this.arrowAtRight_ ? - left + bubble.width - anchorMid : - anchorMid - left), + arrow.width / 2, + this.arrowAtRight_ ? left + bubble.width - anchorMid : + anchorMid - left), bubble.width - arrow.width / 2); // Work out the vertical placement, attempting to fit the bubble
diff --git a/ui/webui/resources/js/jstemplate_compiled.js b/ui/webui/resources/js/jstemplate_compiled.js index 6a79748..a394f3d 100644 --- a/ui/webui/resources/js/jstemplate_compiled.js +++ b/ui/webui/resources/js/jstemplate_compiled.js
@@ -5,4 +5,4 @@ // This file serves as a proxy to bring the included js file from /third_party // into its correct location under the resources directory tree, whence it is // delivered via a chrome://resources URL. See ../webui_resources.grd. -<include src="../../../../third_party/jstemplate/jstemplate_compiled.js"> +<include src='../../../../third_party/jstemplate/jstemplate_compiled.js'>