diff --git a/DEPS b/DEPS index 6107a6a..9ca8bebc 100644 --- a/DEPS +++ b/DEPS
@@ -79,11 +79,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': '9e8a594905316d14aeb55ab5ab5f50e03cb847c6', + 'skia_revision': '4be123fb6c04b366dc0b931c16340d29f2ce2f04', # 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': 'e1de5c822d8fe7db4a1d80d15e7ea4a771c5f32f', + 'v8_revision': 'd500271571b92cb18dcd7b15885b51e8f437d640', # 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. @@ -272,7 +272,7 @@ }, 'src/third_party/android_ndk': { - 'url': Var('chromium_git') + '/android_ndk.git' + '@' + 'e951c37287c7d8cd915bf8d4149fd4a06d808b55', + 'url': Var('chromium_git') + '/android_ndk.git' + '@' + '635bc380968a76f6948fee65f80a0b28db53ae81', 'condition': 'checkout_android', }, @@ -341,7 +341,7 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'd0de9616e5bb6e4bf96bd92f05f5730b63e75a9e', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '462839ea994291a5b12c97c8304d986960f7a36d', 'src/third_party/devtools-node-modules': Var('chromium_git') + '/external/github.com/ChromeDevTools/devtools-node-modules' + '@' + Var('devtools_node_modules_revision'), @@ -654,10 +654,10 @@ Var('chromium_git') + '/external/selenium/py.git' + '@' + '5fd78261a75fe08d27ca4835fb6c5ce4b42275bd', 'src/third_party/webgl/src': - Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + 'a182a9ad3078aca566d8355eabf2d9f56f70ee82', + Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '3c1cb0203b6cfc10389e85a350b2ea6ca29d01ce', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '12c8110e8c717b7f0f87615d3b99caac2a69fa6c', # commit position 21742 + Var('webrtc_git') + '/src.git' + '@' + '3f693b9e75fc83a5c5233f21f0fddfa276edfb07', # commit position 21742 'src/third_party/xdg-utils': { 'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d', @@ -680,7 +680,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@23d80a8f4bd2d2220e56209dfdf3cd01428708bf', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@644d1e63d9ad9fe855d4e3712c34be8589e24e29', 'condition': 'checkout_src_internal', },
diff --git a/android_webview/BUILD.gn b/android_webview/BUILD.gn index 8a1de6a..4c1c67dd 100644 --- a/android_webview/BUILD.gn +++ b/android_webview/BUILD.gn
@@ -11,6 +11,7 @@ import("//components/spellcheck/spellcheck_build_features.gni") import("//tools/grit/repack.gni") import("//tools/resources/generate_resource_whitelist.gni") +import("//tools/v8_context_snapshot/v8_context_snapshot.gni") declare_args() { # Package name of the system_webview_apk target. @@ -192,8 +193,12 @@ android_assets("monochrome_webview_assets") { deps = [ "//third_party/icu:icu_assets", - "//v8:v8_external_startup_data_assets", ] + if (use_v8_context_snapshot) { + deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ] + } else { + deps += [ "//v8:v8_external_startup_data_assets" ] + } if (android_64bit_target_cpu && build_apk_secondary_abi) { deps += [ ":v8_snapshot_secondary_abi_assets" ] } @@ -396,10 +401,16 @@ assert(android_64bit_target_cpu, "32-bit targets shouldn't have secondary abi") arch_suffix = "32" - renaming_sources = [ "$_secondary_abi_out_dir/snapshot_blob.bin" ] - renaming_destinations = [ "snapshot_blob_$arch_suffix.bin" ] + if (use_v8_context_snapshot) { + renaming_sources = [ "$_secondary_abi_out_dir/v8_context_snapshot.bin" ] + renaming_destinations = [ "v8_context_snapshot_$arch_suffix.bin" ] + } else { + renaming_sources = [ "$_secondary_abi_out_dir/snapshot_blob.bin" ] + renaming_destinations = [ "snapshot_blob_$arch_suffix.bin" ] + } disable_compression = true deps = [ + "//tools/v8_context_snapshot($android_secondary_abi_toolchain)", "//v8($android_secondary_abi_toolchain)", ] } @@ -764,7 +775,10 @@ ] } - configs += [ "//v8:external_startup_data" ] + configs += [ + "//tools/v8_context_snapshot:use_v8_context_snapshot", + "//v8:external_startup_data", + ] libs = [ "jnigraphics" ] } @@ -941,15 +955,23 @@ } # Separate target to allow for a dependency on GmsCore without pulling in all of -# android_webview_java. +# android_webview_java. It compiles the abstract class; implementations are +# compiled separately. android_library("android_webview_platform_services_java") { - java_files = - [ "java/src/org/chromium/android_webview/PlatformServiceBridge.java" ] + java_files = [ + "java/src/org/chromium/android_webview/PlatformServiceBridge.java", + "java/src/org/chromium/android_webview/PlatformServiceBridgeImpl.java", + ] deps = [ "//base:base_java", "//third_party/android_tools:android_support_annotations_java", ] + + # The appropriate .class file will be loaded via a dependency to a library + # like :platform_service_bridge_upstream_implementation_java below. We only include the + # .java file because other files in the target depend on it. + jar_excluded_patterns = [ "*/PlatformServiceBridgeImpl.class" ] } # This target compiles the implementation of PlatformServiceBridge for AOSP targets. @@ -1010,6 +1032,7 @@ android_manifest = system_webview_android_manifest android_manifest_dep = ":system_webview_manifest" deps = [ + ":platform_service_bridge_upstream_implementation_java", ":system_webview_resources", "//android_webview/glue", "//android_webview/support_library:support_lib_glue_java",
diff --git a/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java b/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java index 8fbdda4..63f862c 100644 --- a/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java +++ b/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java
@@ -8,17 +8,13 @@ import android.support.annotation.NonNull; import org.chromium.base.Callback; -import org.chromium.base.Log; -import org.chromium.base.StrictModeContext; import org.chromium.base.ThreadUtils; -import java.lang.reflect.InvocationTargetException; - /** * This class manages platform-specific services. (i.e. Google Services) The platform * should extend this class and use this base class to fetch their specialized version. */ -public class PlatformServiceBridge { +public abstract class PlatformServiceBridge { private static final String TAG = "PlatformServiceBrid-"; private static final String PLATFORM_SERVICE_BRIDGE = "com.android.webview.chromium.PlatformServiceBridgeGoogle"; @@ -31,27 +27,12 @@ @SuppressWarnings("unused") public static PlatformServiceBridge getInstance() { synchronized (sInstanceLock) { - if (sInstance != null) return sInstance; - - // Try to get a specialized service bridge. Starting with Android O, failed reflection - // may cause file reads. The reflection will go away soon: https://crbug.com/682070 - try (StrictModeContext unused = StrictModeContext.allowDiskReads()) { - Class<?> cls = Class.forName(PLATFORM_SERVICE_BRIDGE); - sInstance = (PlatformServiceBridge) cls.getDeclaredConstructor().newInstance(); - return sInstance; - } catch (ClassNotFoundException e) { - // This is not an error; it just means this device doesn't have specialized - // services. - } catch (IllegalAccessException | IllegalArgumentException | InstantiationException - | NoSuchMethodException e) { - Log.e(TAG, "Failed to get " + PLATFORM_SERVICE_BRIDGE + ": " + e); - } catch (InvocationTargetException e) { - Log.e(TAG, "Failed invocation to get " + PLATFORM_SERVICE_BRIDGE + ": ", - e.getCause()); + if (sInstance == null) { + // Load an instance of PlatformServiceBridgeImpl. Because this can change + // depending on the GN configuration, this may not be the PlatformServiceBridgeImpl + // defined upstream. + sInstance = new PlatformServiceBridgeImpl(); } - - // Otherwise, get the generic service bridge. - sInstance = new PlatformServiceBridge(); return sInstance; } }
diff --git a/android_webview/lib/aw_main_delegate.cc b/android_webview/lib/aw_main_delegate.cc index 69bcfc2..4c81cb72 100644 --- a/android_webview/lib/aw_main_delegate.cc +++ b/android_webview/lib/aw_main_delegate.cc
@@ -134,12 +134,19 @@ base::android::RegisterApkAssetWithFileDescriptorStore( content::kV8NativesDataDescriptor, gin::V8Initializer::GetNativesFilePath()); +#if defined(USE_V8_CONTEXT_SNAPSHOT) + gin::V8Initializer::V8SnapshotFileType file_type = + gin::V8Initializer::V8SnapshotFileType::kWithAdditionalContext; +#else + gin::V8Initializer::V8SnapshotFileType file_type = + gin::V8Initializer::V8SnapshotFileType::kDefault; +#endif base::android::RegisterApkAssetWithFileDescriptorStore( content::kV8Snapshot32DataDescriptor, - gin::V8Initializer::GetSnapshotFilePath(true)); + gin::V8Initializer::GetSnapshotFilePath(true, file_type)); base::android::RegisterApkAssetWithFileDescriptorStore( content::kV8Snapshot64DataDescriptor, - gin::V8Initializer::GetSnapshotFilePath(false)); + gin::V8Initializer::GetSnapshotFilePath(false, file_type)); } #endif // V8_USE_EXTERNAL_STARTUP_DATA
diff --git a/android_webview/support_library/boundary_interfaces/BUILD.gn b/android_webview/support_library/boundary_interfaces/BUILD.gn index 6f08b1d9..bc1fcb3a 100644 --- a/android_webview/support_library/boundary_interfaces/BUILD.gn +++ b/android_webview/support_library/boundary_interfaces/BUILD.gn
@@ -7,15 +7,17 @@ android_library("boundary_interface_java") { java_files = [ - "src/org/chromium/support_lib_boundary/BoundaryInterfaceReflectionUtil.java", "src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java", "src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java", "src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java", "src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java", "src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java", "src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java", + "src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java", ] + proguard_configs = [ "proguard.flags" ] + # We can't use ANY deps here, the support library should be able to build # these interfaces without any other chromium dependencies. deps = []
diff --git a/android_webview/support_library/boundary_interfaces/proguard.flags b/android_webview/support_library/boundary_interfaces/proguard.flags new file mode 100644 index 0000000..4a0d580a --- /dev/null +++ b/android_webview/support_library/boundary_interfaces/proguard.flags
@@ -0,0 +1,9 @@ +# Copyright 2018 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. + +# We need to avoid obfuscating the support library boundary interface because +# this API is shared with the Android Support Library. +# Note that we only 'keep' the package org.chromium.support_lib_boundary itself, +# any sub-packages of that package can still be obfuscated. +-keep public class org.chromium.support_lib_boundary.* { public *; }
diff --git a/android_webview/support_library/boundary_interfaces/src/org/chromium/support_lib_boundary/BoundaryInterfaceReflectionUtil.java b/android_webview/support_library/boundary_interfaces/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java similarity index 98% rename from android_webview/support_library/boundary_interfaces/src/org/chromium/support_lib_boundary/BoundaryInterfaceReflectionUtil.java rename to android_webview/support_library/boundary_interfaces/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java index caf7277..5a772c523 100644 --- a/android_webview/support_library/boundary_interfaces/src/org/chromium/support_lib_boundary/BoundaryInterfaceReflectionUtil.java +++ b/android_webview/support_library/boundary_interfaces/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java
@@ -1,7 +1,7 @@ // Copyright 2018 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. -package org.chromium.support_lib_boundary; +package org.chromium.support_lib_boundary.util; import android.annotation.TargetApi; import android.os.Build;
diff --git a/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibReflectionUtil.java b/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibReflectionUtil.java index 2bd2b47c..c121439 100644 --- a/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibReflectionUtil.java +++ b/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibReflectionUtil.java
@@ -4,19 +4,22 @@ package org.chromium.support_lib_glue; -import org.chromium.support_lib_boundary.BoundaryInterfaceReflectionUtil; +import org.chromium.base.annotations.UsedByReflection; +import org.chromium.support_lib_boundary.util.BoundaryInterfaceReflectionUtil; import java.lang.reflect.InvocationHandler; /** * Starting point for fetching WebView implementation. */ +@UsedByReflection("WebView Support Library") public class SupportLibReflectionUtil { /** * Entry point used by the WebView Support Library to gain access to the functionality in the * support library glue. * Changing the signature of this method will break existing WebView Support Library versions! */ + @UsedByReflection("WebView Support Library") public static InvocationHandler createWebViewProviderFactory() { final SupportLibWebViewChromiumFactory factory = new SupportLibWebViewChromiumFactory(); return BoundaryInterfaceReflectionUtil.createInvocationHandlerFor(factory);
diff --git a/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebViewChromium.java b/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebViewChromium.java index c7971e9..1211223c 100644 --- a/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebViewChromium.java +++ b/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebViewChromium.java
@@ -7,9 +7,9 @@ import com.android.webview.chromium.SharedWebViewChromium; import org.chromium.android_webview.AwContents; -import org.chromium.support_lib_boundary.BoundaryInterfaceReflectionUtil; import org.chromium.support_lib_boundary.VisualStateCallbackBoundaryInterface; import org.chromium.support_lib_boundary.WebViewProviderBoundaryInterface; +import org.chromium.support_lib_boundary.util.BoundaryInterfaceReflectionUtil; import java.lang.reflect.InvocationHandler;
diff --git a/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebViewChromiumFactory.java b/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebViewChromiumFactory.java index cfccc39b..2f81bbd 100644 --- a/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebViewChromiumFactory.java +++ b/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebViewChromiumFactory.java
@@ -14,9 +14,9 @@ import com.android.webview.chromium.WebViewChromiumAwInit; import com.android.webview.chromium.WebkitToSharedGlueConverter; -import org.chromium.support_lib_boundary.BoundaryInterfaceReflectionUtil; import org.chromium.support_lib_boundary.StaticsBoundaryInterface; import org.chromium.support_lib_boundary.WebViewProviderFactoryBoundaryInterface; +import org.chromium.support_lib_boundary.util.BoundaryInterfaceReflectionUtil; import java.lang.reflect.InvocationHandler; import java.util.List;
diff --git a/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebkitToCompatConverterAdapter.java b/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebkitToCompatConverterAdapter.java index 82b6750..4856e079 100644 --- a/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebkitToCompatConverterAdapter.java +++ b/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebkitToCompatConverterAdapter.java
@@ -8,8 +8,8 @@ import com.android.webview.chromium.WebkitToSharedGlueConverter; -import org.chromium.support_lib_boundary.BoundaryInterfaceReflectionUtil; import org.chromium.support_lib_boundary.WebkitToCompatConverterBoundaryInterface; +import org.chromium.support_lib_boundary.util.BoundaryInterfaceReflectionUtil; import java.lang.reflect.InvocationHandler;
diff --git a/android_webview/test/BUILD.gn b/android_webview/test/BUILD.gn index bfea1d8..e76323a 100644 --- a/android_webview/test/BUILD.gn +++ b/android_webview/test/BUILD.gn
@@ -5,6 +5,7 @@ import("//build/config/android/rules.gni") import("//device/vr/features/features.gni") import("//testing/test.gni") +import("//tools/v8_context_snapshot/v8_context_snapshot.gni") # Mark all targets as test only. testonly = true @@ -22,6 +23,7 @@ ":android_webview_apk_resources", "//android_webview:android_webview_java", "//android_webview:locale_pak_assets", + "//android_webview:platform_service_bridge_upstream_implementation_java", "//base:base_java", "//base:base_java_test_support", "//components/policy/android:policy_java_test_support", @@ -70,8 +72,8 @@ deps = [ "//android_webview:pak_file_assets", "//third_party/icu:icu_assets", - "//v8:v8_external_startup_data_assets", ] + sources = [ "shell/assets/asset_file.html", "shell/assets/asset_icon.png", @@ -91,6 +93,12 @@ "shell/assets/visual_state_waits_for_js_test.html", "shell/assets/webvr_not_functional_test.html", ] + + if (use_v8_context_snapshot) { + deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ] + } else { + deps += [ "//v8:v8_external_startup_data_assets" ] + } } shared_library("libstandalonelibwebviewchromium") {
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc index 2c4e543..c025675 100644 --- a/ash/root_window_controller.cc +++ b/ash/root_window_controller.cc
@@ -472,8 +472,6 @@ void RootWindowController::CloseChildWindows() { // NOTE: this may be called multiple times. - // TODO: Only call this once. The multiple calls cause complexity in the - // dependent Shelf and ShelfWidget code. // Deactivate keyboard container before closing child windows and shutting // down associated layout managers. @@ -508,7 +506,6 @@ while (!toplevel_windows.windows().empty()) delete toplevel_windows.Pop(); } - // And then remove the containers. while (!root->children().empty()) { aura::Window* child = root->children()[0]; @@ -518,8 +515,6 @@ root->RemoveChild(child); } - // Removing the containers destroys ShelfLayoutManager. ShelfWidget outlives - // ShelfLayoutManager because ShelfLayoutManager holds a pointer to it. shelf_->DestroyShelfWidget(); aura::client::SetDragDropClient(GetRootWindow(), nullptr);
diff --git a/ash/shelf/shelf.cc b/ash/shelf/shelf.cc index cc55443..2a252fc 100644 --- a/ash/shelf/shelf.cc +++ b/ash/shelf/shelf.cc
@@ -90,7 +90,6 @@ } void Shelf::ShutdownShelfWidget() { - // May be called multiple times during shutdown. if (shelf_widget_) shelf_widget_->Shutdown(); }
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc index dc3b623..a3ea8ae4 100644 --- a/ash/shelf/shelf_widget.cc +++ b/ash/shelf/shelf_widget.cc
@@ -73,8 +73,7 @@ default_last_focusable_child_ = default_last_focusable_child; } - // views::WidgetDelegate: - void DeleteDelegate() override { delete this; } + // views::WidgetDelegateView: views::Widget* GetWidget() override { return View::GetWidget(); } const views::Widget* GetWidget() const override { return View::GetWidget(); } @@ -107,8 +106,6 @@ focus_cycler_(nullptr), opaque_background_(ui::LAYER_SOLID_COLOR) { DCHECK(shelf_widget_); - set_owned_by_client(); // Deleted by DeleteDelegate(). - SetLayoutManager(std::make_unique<views::FillLayout>()); set_allow_deactivate_on_esc(true); opaque_background_.SetBounds(GetLocalBounds()); @@ -219,36 +216,12 @@ ShelfWidget::~ShelfWidget() { // Must call Shutdown() before destruction. - DCHECK(did_shutdown_); -} - -void ShelfWidget::Shutdown() { - if (did_shutdown_) - return; - - // Shutting down the status area widget may cause some widgets (e.g. bubbles) - // to close, so uninstall the ShelfLayoutManager event filters first. Don't - // reset the pointer until later because other widgets (e.g. app list) may - // access it later in shutdown. - if (shelf_layout_manager_) - shelf_layout_manager_->PrepareForShutdown(); - - if (status_area_widget_) { - background_animator_.RemoveObserver(status_area_widget_.get()); - Shell::Get()->focus_cycler()->RemoveWidget(status_area_widget_.get()); - status_area_widget_.reset(); - } - - // Don't need to update the shelf background during shutdown. + DCHECK(!status_area_widget_); background_animator_.RemoveObserver(delegate_view_); background_animator_.RemoveObserver(this); - - // Don't need to observe focus/activation during shutdown. Shell::Get()->focus_cycler()->RemoveWidget(this); SetFocusCycler(nullptr); RemoveObserver(this); - - did_shutdown_ = true; } void ShelfWidget::CreateStatusAreaWidget(aura::Window* status_container) { @@ -317,6 +290,23 @@ return delegate_view_->focus_cycler(); } +void ShelfWidget::Shutdown() { + // Shutting down the status area widget may cause some widgets (e.g. bubbles) + // to close, so uninstall the ShelfLayoutManager event filters first. Don't + // reset the pointer until later because other widgets (e.g. app list) may + // access it later in shutdown. + if (shelf_layout_manager_) + shelf_layout_manager_->PrepareForShutdown(); + + if (status_area_widget_) { + background_animator_.RemoveObserver(status_area_widget_.get()); + Shell::Get()->focus_cycler()->RemoveWidget(status_area_widget_.get()); + status_area_widget_.reset(); + } + + CloseNow(); +} + void ShelfWidget::UpdateIconPositionForPanel(aura::Window* panel) { ShelfID id = ShelfID::Deserialize(panel->GetProperty(kShelfIDKey)); if (id.IsNull())
diff --git a/ash/shelf/shelf_widget.h b/ash/shelf/shelf_widget.h index ce4a0367..695a549c 100644 --- a/ash/shelf/shelf_widget.h +++ b/ash/shelf/shelf_widget.h
@@ -143,8 +143,6 @@ ScopedSessionObserver scoped_session_observer_; - bool did_shutdown_ = false; - DISALLOW_COPY_AND_ASSIGN(ShelfWidget); };
diff --git a/ash/shell.cc b/ash/shell.cc index bf9a4eb..7d6e0fd 100644 --- a/ash/shell.cc +++ b/ash/shell.cc
@@ -723,6 +723,8 @@ toast_manager_.reset(); + for (aura::Window* root : GetAllRootWindows()) + Shelf::ForWindow(root)->ShutdownShelfWidget(); tray_bluetooth_helper_.reset(); // Accesses root window containers.
diff --git a/ash/window_manager_service.cc b/ash/window_manager_service.cc index bf264e1..6bc34a4 100644 --- a/ash/window_manager_service.cc +++ b/ash/window_manager_service.cc
@@ -139,12 +139,11 @@ window_manager_ = std::make_unique<WindowManager>( context()->connector(), ash_config_, show_primary_host_on_connect_); - std::unique_ptr<aura::WindowTreeClient> window_tree_client = - std::make_unique<aura::WindowTreeClient>( - context()->connector(), window_manager_.get(), window_manager_.get()); const bool automatically_create_display_roots = false; - window_tree_client->ConnectAsWindowManager( - automatically_create_display_roots); + std::unique_ptr<aura::WindowTreeClient> window_tree_client = + aura::WindowTreeClient::CreateForWindowManager( + context()->connector(), window_manager_.get(), window_manager_.get(), + automatically_create_display_roots); const bool init_network_handler = true; InitWindowManager(std::move(window_tree_client), init_network_handler);
diff --git a/ash/window_manager_unittest.cc b/ash/window_manager_unittest.cc index 00b1bbc9..61cbbd9 100644 --- a/ash/window_manager_unittest.cc +++ b/ash/window_manager_unittest.cc
@@ -105,16 +105,17 @@ // Connect to mus and create a new top level window. The request goes to // |ash|, but is async. - aura::WindowTreeClient client(connector(), &window_tree_delegate, nullptr, - nullptr, nullptr, false); - client.ConnectViaWindowTreeFactory(); - aura::test::EnvWindowTreeClientSetter env_window_tree_client_setter(&client); + std::unique_ptr<aura::WindowTreeClient> client = + aura::WindowTreeClient::CreateForWindowTreeFactory( + connector(), &window_tree_delegate, false); + aura::test::EnvWindowTreeClientSetter env_window_tree_client_setter( + client.get()); std::map<std::string, std::vector<uint8_t>> properties; properties[ui::mojom::WindowManager::kWindowType_InitProperty] = mojo::ConvertTo<std::vector<uint8_t>>( static_cast<int32_t>(ui::mojom::WindowType::WINDOW)); aura::WindowTreeHostMus window_tree_host_mus( - aura::CreateInitParamsForTopLevel(&client, std::move(properties))); + aura::CreateInitParamsForTopLevel(client.get(), std::move(properties))); window_tree_host_mus.InitHost(); aura::Window* child_window = new aura::Window(nullptr); child_window->Init(ui::LAYER_NOT_DRAWN); @@ -124,12 +125,13 @@ // |child_window|. This blocks until it succeeds. ui::mojom::WindowTreeClientPtr tree_client; auto tree_client_request = MakeRequest(&tree_client); - client.Embed(child_window, std::move(tree_client), 0u, base::Bind(&OnEmbed)); - aura::WindowTreeClient child_client(connector(), &window_tree_delegate, - nullptr, std::move(tree_client_request), - nullptr, false); + client->Embed(child_window, std::move(tree_client), 0u, base::Bind(&OnEmbed)); + std::unique_ptr<aura::WindowTreeClient> child_client = + aura::WindowTreeClient::CreateForEmbedding( + connector(), &window_tree_delegate, std::move(tree_client_request), + false); window_tree_delegate.WaitForEmbed(); - ASSERT_TRUE(!child_client.GetRoots().empty()); + ASSERT_TRUE(!child_client->GetRoots().empty()); window_tree_delegate.DestroyWindowTreeHost(); }
diff --git a/base/allocator/partition_allocator/partition_alloc_unittest.cc b/base/allocator/partition_allocator/partition_alloc_unittest.cc index 38d2a4a9..c00cdd0 100644 --- a/base/allocator/partition_allocator/partition_alloc_unittest.cc +++ b/base/allocator/partition_allocator/partition_alloc_unittest.cc
@@ -29,11 +29,6 @@ namespace { -template <typename T> -std::unique_ptr<T[]> WrapArrayUnique(T* ptr) { - return std::unique_ptr<T[]>(ptr); -} - constexpr size_t kTestMaxAllocation = base::kSystemPageSize; bool IsLargeMemoryDevice() { @@ -573,8 +568,7 @@ // The +1 is because we need to account for the fact that the current page // never gets thrown on the freelist. ++numToFillFreeListPage; - std::unique_ptr<PartitionPage* []> pages = - WrapArrayUnique(new PartitionPage*[numToFillFreeListPage]); + auto pages = std::make_unique<PartitionPage* []>(numToFillFreeListPage); size_t i; for (i = 0; i < numToFillFreeListPage; ++i) { @@ -616,8 +610,7 @@ --numPagesNeeded; EXPECT_GT(numPagesNeeded, 1u); - std::unique_ptr<PartitionPage* []> pages; - pages = WrapArrayUnique(new PartitionPage*[numPagesNeeded]); + auto pages = std::make_unique<PartitionPage* []>(numPagesNeeded); uintptr_t firstSuperPageBase = 0; size_t i; for (i = 0; i < numPagesNeeded; ++i) { @@ -1163,10 +1156,10 @@ // The -2 is because the first and last partition pages in a super page are // guard pages. size_t numPartitionPagesNeeded = kNumPartitionPagesPerSuperPage - 2; - std::unique_ptr<PartitionPage* []> firstSuperPagePages = - WrapArrayUnique(new PartitionPage*[numPartitionPagesNeeded]); - std::unique_ptr<PartitionPage* []> secondSuperPagePages = - WrapArrayUnique(new PartitionPage*[numPartitionPagesNeeded]); + auto firstSuperPagePages = + std::make_unique<PartitionPage* []>(numPartitionPagesNeeded); + auto secondSuperPagePages = + std::make_unique<PartitionPage* []>(numPartitionPagesNeeded); size_t i; for (i = 0; i < numPartitionPagesNeeded; ++i)
diff --git a/base/trace_event/memory_infra_background_whitelist.cc b/base/trace_event/memory_infra_background_whitelist.cc index 52e196b..24ce750 100644 --- a/base/trace_event/memory_infra_background_whitelist.cc +++ b/base/trace_event/memory_infra_background_whitelist.cc
@@ -40,7 +40,6 @@ "MemoryCache", "MojoHandleTable", "MojoLevelDB", - "OutOfProcessHeapProfilingDumpProvider", "PartitionAlloc", "ProcessMemoryMetrics", "Skia", @@ -55,17 +54,36 @@ }; // The names of dump providers whitelisted for summary tracing. +// TODO(ssid): Some dump providers do not create ownership edges on background +// dump. So, the effective size will not be correct. const char* const kDumpProviderSummaryWhitelist[] = { + "android::ResourceManagerImpl", "BlinkGC", "BlinkObjectCounters", + "ClientDiscardableSharedMemoryManager", + "DiscardableSharedMemoryManager", "gpu::BufferManager", "gpu::RenderbufferManager", "gpu::TextureManager", + "HistoryReport", + "IndexedDBBackingStore", + "JavaHeap", + "LevelDB", + "LeveldbValueStore", + "LocalStorage", "Malloc", + "MemoryCache", + "MojoHandleTable", + "MojoLevelDB", "PartitionAlloc", "ProcessMemoryMetrics", "SharedMemoryTracker", + "Skia", + "Sql", + "URLRequestContext", "V8Isolate", + "SyncDirectory", + "TabRestoreServiceHelper", nullptr // End of list marker. };
diff --git a/chrome/VERSION b/chrome/VERSION index 233e5aec..154e5261 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=67 MINOR=0 -BUILD=3360 +BUILD=3363 PATCH=0
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index fa8f770..efd4954c 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn
@@ -17,6 +17,7 @@ import("//third_party/icu/config.gni") import("//third_party/protobuf/proto_library.gni") import("//tools/resources/generate_resource_whitelist.gni") +import("//tools/v8_context_snapshot/v8_context_snapshot.gni") import("channel.gni") import("java_sources.gni") import("static_initializers.gni") @@ -697,8 +698,12 @@ deps = [ "//chrome/android/webapk/libs/runtime_library:runtime_library_assets", "//third_party/icu:icu_assets", - "//v8:v8_external_startup_data_assets", ] + if (use_v8_context_snapshot) { + deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ] + } else { + deps += [ "//v8:v8_external_startup_data_assets" ] + } } android_assets("chrome_public_pak_assets") { @@ -1115,6 +1120,7 @@ deps = [ ":monochrome_java", + "//android_webview:platform_service_bridge_upstream_implementation_java", "//base:base_java", "//chrome/android:app_hooks_java", "//chrome/android:chrome_java",
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browserservices/BrowserSessionContentUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/BrowserSessionContentUtils.java index 44f78d9..3c83cae6 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/browserservices/BrowserSessionContentUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/BrowserSessionContentUtils.java
@@ -93,7 +93,7 @@ CustomTabsConnection.getInstance().getClientPackageNameForSession(session); if (TextUtils.isEmpty(packageName)) return false; boolean valid = OriginVerifier.isValidOrigin( - packageName, referrer, CustomTabsService.RELATION_USE_AS_ORIGIN); + packageName, new Origin(referrer), CustomTabsService.RELATION_USE_AS_ORIGIN); // OriginVerifier should only be allowing https schemes. assert valid == UrlConstants.HTTPS_SCHEME.equals(referrer.getScheme());
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browserservices/Origin.java b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/Origin.java new file mode 100644 index 0000000..c871b4e9 --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/Origin.java
@@ -0,0 +1,55 @@ +// Copyright 2018 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. + +package org.chromium.chrome.browser.browserservices; + +import android.net.Uri; + +import org.chromium.net.GURLUtils; + +/** + * A class to canonically represent a web origin in Java. It requires the native library to be + * loaded as it uses {@link GURLUtils#getOrigin}. + */ +public class Origin { + private final String mOrigin; + + /** + * Constructs a canonical Origin from a String. + */ + public Origin(String uri) { + mOrigin = GURLUtils.getOrigin(uri); + } + + /** + * Constructs a canonical Origin from an Uri. + */ + public Origin(Uri uri) { + this(uri.toString()); + } + + /** + * Returns a Uri representing this Origin. + */ + public Uri uri() { + return Uri.parse(mOrigin); + } + + @Override + public int hashCode() { + return mOrigin.hashCode(); + } + + @Override + public String toString() { + return mOrigin; + } + + @Override + public boolean equals(Object other) { + if (this == other) return true; + if (other == null || getClass() != other.getClass()) return false; + return mOrigin.equals(((Origin) other).mOrigin); + } +}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browserservices/OriginVerifier.java b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/OriginVerifier.java index 7e8d2be..1d29dc0 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/browserservices/OriginVerifier.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/OriginVerifier.java
@@ -57,13 +57,13 @@ private static final String USE_AS_ORIGIN = "delegate_permission/common.use_as_origin"; private static final String HANDLE_ALL_URLS = "delegate_permission/common.handle_all_urls"; - private static Map<Pair<String, Integer>, Set<Uri>> sPackageToCachedOrigins; + private static Map<Pair<String, Integer>, Set<Origin>> sPackageToCachedOrigins; private final OriginVerificationListener mListener; private final String mPackageName; private final String mSignatureFingerprint; private final @Relation int mRelation; private long mNativeOriginVerifier = 0; - private Uri mOrigin; + private Origin mOrigin; /** Small helper class to post a result of origin verification. */ private class VerifiedCallback implements Runnable { @@ -79,9 +79,10 @@ } } - static Uri getPostMessageOriginFromVerifiedOrigin(String packageName, Uri verifiedOrigin) { + public static Uri getPostMessageUriFromVerifiedOrigin(String packageName, + Origin verifiedOrigin) { return Uri.parse(IntentHandler.ANDROID_APP_REFERRER_SCHEME + "://" - + verifiedOrigin.getHost() + "/" + packageName); + + verifiedOrigin.uri().getHost() + "/" + packageName); } /** Clears all known relations. */ @@ -98,15 +99,14 @@ * @param relation The Digital Asset Links relation verified. */ public static void addVerifiedOriginForPackage( - String packageName, Uri origin, @Relation int relation) { + String packageName, Origin origin, @Relation int relation) { ThreadUtils.assertOnUiThread(); if (sPackageToCachedOrigins == null) sPackageToCachedOrigins = new HashMap<>(); - Set<Uri> cachedOrigins = - sPackageToCachedOrigins.get(new Pair<String, Integer>(packageName, relation)); + Set<Origin> cachedOrigins = + sPackageToCachedOrigins.get(new Pair<>(packageName, relation)); if (cachedOrigins == null) { - cachedOrigins = new HashSet<Uri>(); - sPackageToCachedOrigins.put( - new Pair<String, Integer>(packageName, relation), cachedOrigins); + cachedOrigins = new HashSet<>(); + sPackageToCachedOrigins.put(new Pair<>(packageName, relation), cachedOrigins); } cachedOrigins.add(origin); } @@ -121,11 +121,10 @@ * @param origin The origin to verify * @param relation The Digital Asset Links relation to verify for. */ - public static boolean isValidOrigin(String packageName, Uri origin, @Relation int relation) { + public static boolean isValidOrigin(String packageName, Origin origin, @Relation int relation) { ThreadUtils.assertOnUiThread(); if (sPackageToCachedOrigins == null) return false; - Set<Uri> cachedOrigins = - sPackageToCachedOrigins.get(new Pair<String, Integer>(packageName, relation)); + Set<Origin> cachedOrigins = sPackageToCachedOrigins.get(new Pair<>(packageName, relation)); if (cachedOrigins == null) return false; return cachedOrigins.contains(origin); } @@ -140,12 +139,12 @@ * @param origin The origin that was declared on the query for this result. * @param verified Whether the given origin was verified to correspond to the given package. */ - void onOriginVerified(String packageName, Uri origin, boolean verified); + void onOriginVerified(String packageName, Origin origin, boolean verified); } /** * Main constructor. - * Use {@link OriginVerifier#start(Uri)} + * Use {@link OriginVerifier#start(Origin)} * @param listener The listener who will get the verification result. * @param packageName The package for the Android application for verification. * @param relation Digital Asset Links {@link Relation} to use during verification. @@ -164,10 +163,10 @@ * profile as context. * @param origin The postMessage origin the application is claiming to have. Can't be null. */ - public void start(@NonNull Uri origin) { + public void start(@NonNull Origin origin) { ThreadUtils.assertOnUiThread(); mOrigin = origin; - String scheme = mOrigin.getScheme(); + String scheme = mOrigin.uri().getScheme(); if (TextUtils.isEmpty(scheme) || !UrlConstants.HTTPS_SCHEME.equals(scheme.toLowerCase(Locale.US))) { ThreadUtils.runOnUiThread(new VerifiedCallback(false)); @@ -274,7 +273,6 @@ private void originVerified(boolean originVerified) { if (originVerified) { addVerifiedOriginForPackage(mPackageName, mOrigin, mRelation); - mOrigin = getPostMessageOriginFromVerifiedOrigin(mPackageName, mOrigin); } if (mListener != null) mListener.onOriginVerified(mPackageName, mOrigin, originVerified); cleanUp();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browserservices/PostMessageHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/PostMessageHandler.java index a8f8c6c..2c8587b 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/browserservices/PostMessageHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/PostMessageHandler.java
@@ -32,7 +32,7 @@ private boolean mMessageChannelCreated; private boolean mBoundToService; private AppWebMessagePort[] mChannel; - private Uri mOrigin; + private Uri mPostMessageUri; private String mPackageName; /** @@ -77,7 +77,7 @@ // Can't reset with the same web contents twice. if (webContents.equals(mWebContents)) return; mWebContents = webContents; - if (mOrigin == null) return; + if (mPostMessageUri == null) return; new WebContentsObserver(webContents) { private boolean mNavigatedOnce; @@ -125,7 +125,7 @@ mChannel[0].setMessageCallback(mMessageCallback, null); webContents.postMessageToFrame( - null, "", mOrigin.toString(), "", new AppWebMessagePort[] {mChannel[1]}); + null, "", mPostMessageUri.toString(), "", new AppWebMessagePort[] {mChannel[1]}); mMessageChannelCreated = true; if (mBoundToService) notifyMessageChannelReady(null); @@ -139,11 +139,11 @@ } /** - * Sets the postMessage origin for this session to the given {@link Uri}. - * @param origin The origin value to be set. + * Sets the postMessage postMessageUri for this session to the given {@link Uri}. + * @param postMessageUri The postMessageUri value to be set. */ - public void initializeWithOrigin(Uri origin) { - mOrigin = origin; + public void initializeWithPostMessageUri(Uri postMessageUri) { + mPostMessageUri = postMessageUri; if (mWebContents != null && !mWebContents.isDestroyed()) { initializeWithWebContents(mWebContents); } @@ -191,17 +191,18 @@ } @Override - public void onOriginVerified(String packageName, Uri origin, boolean result) { + public void onOriginVerified(String packageName, Origin origin, boolean result) { if (!result) return; - initializeWithOrigin(origin); + initializeWithPostMessageUri( + OriginVerifier.getPostMessageUriFromVerifiedOrigin(packageName, origin)); } /** - * @return The origin that has been declared for this handler. + * @return The PostMessage Uri that has been declared for this handler. */ @VisibleForTesting - public Uri getOriginForTesting() { - return mOrigin; + public Uri getPostMessageUriForTesting() { + return mPostMessageUri; } /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java index e85c510..dad853a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java
@@ -1293,6 +1293,13 @@ } @Override + public void showUnhandledTapUIIfNeeded(final int x, final int y) { + if (!isOverlayVideoMode()) { + mSelectionController.handleShowUnhandledTapUIIfNeeded(x, y); + } + } + + @Override public void selectWordAroundCaretAck(boolean didSelect, int startAdjust, int endAdjust) { if (mSelectWordAroundCaretCounter > 0) mSelectWordAroundCaretCounter--; if (mSelectWordAroundCaretCounter > 0 @@ -1320,13 +1327,6 @@ public void cancelAllRequests() {} } - /** Shows the Unhandled Tap UI. Called by {@link ContextualSearchTabHelper}. */ - void onShowUnhandledTapUIIfNeeded(int x, int y) { - if (!isOverlayVideoMode()) { - mSelectionController.handleShowUnhandledTapUIIfNeeded(x, y); - } - } - /** * @return Whether the display is in a full-screen video overlay mode. */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java index a0edbba..fc68c94 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java
@@ -30,9 +30,6 @@ /** The Tab that this helper tracks. */ private final Tab mTab; - // Device scale factor. - private final float mPxToDp; - /** Notification handler for Contextual Search events. */ private TemplateUrlServiceObserver mTemplateUrlObserver; @@ -76,11 +73,6 @@ if (NetworkChangeNotifier.isInitialized()) { NetworkChangeNotifier.addConnectionTypeObserver(this); } - float scaleFactor = 1.f; - if (tab != null && tab.getActivity() != null && tab.getActivity().getResources() != null) { - scaleFactor /= tab.getActivity().getResources().getDisplayMetrics().density; - } - mPxToDp = scaleFactor; } // ============================================================================================ @@ -227,7 +219,6 @@ contextualSearchManager.getContextualSearchSelectionClient())); contextualSearchManager.suppressContextualSearchForSmartSelection( mSelectionClientManager.isSmartSelectionEnabledInChrome()); - nativeInstallUnhandledTapNotifierIfNeeded(mNativeHelper, webContents, mPxToDp); } } @@ -312,20 +303,6 @@ } } - /** - * Notifies this helper to show the Unhandled Tap UI due to a tap at the given pixel - * coordinates. - */ - @CalledByNative - void onShowUnhandledTapUIIfNeeded(int x, int y) { - // Only notify the manager if we currently have a valid listener. - if (mGestureStateListener != null && getContextualSearchManager(mTab) != null) { - getContextualSearchManager(mTab).onShowUnhandledTapUIIfNeeded(x, y); - } - } - private native long nativeInit(Profile profile); - private native void nativeInstallUnhandledTapNotifierIfNeeded( - long nativeContextualSearchTabHelper, WebContents webContents, float pxToDpScaleFactor); private native void nativeDestroy(long nativeContextualSearchTabHelper); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/SelectionClientManager.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/SelectionClientManager.java index 628a4f9..3163e34 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/SelectionClientManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/SelectionClientManager.java
@@ -162,6 +162,12 @@ } @Override + public void showUnhandledTapUIIfNeeded(int x, int y) { + mSmartSelectionClient.showUnhandledTapUIIfNeeded(x, y); + mContextualSearchSelectionClient.showUnhandledTapUIIfNeeded(x, y); + } + + @Override public void selectWordAroundCaretAck(boolean didSelect, int startAdjust, int endAdjust) { mSmartSelectionClient.selectWordAroundCaretAck(didSelect, startAdjust, endAdjust); mContextualSearchSelectionClient.selectWordAroundCaretAck(
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java index 80b2110..6db1811 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java
@@ -27,6 +27,7 @@ import org.chromium.chrome.browser.ChromeFeatureList; import org.chromium.chrome.browser.ChromeVersionInfo; import org.chromium.chrome.browser.IntentHandler; +import org.chromium.chrome.browser.browserservices.Origin; import org.chromium.chrome.browser.browserservices.OriginVerifier; import org.chromium.chrome.browser.browserservices.OriginVerifier.OriginVerificationListener; import org.chromium.chrome.browser.browserservices.PostMessageHandler; @@ -359,13 +360,13 @@ } /** - * See {@link PostMessageHandler#initializeWithOrigin(Uri)}. + * See {@link PostMessageHandler#initializeWithPostMessageUri(Uri)}. */ public synchronized void initializeWithPostMessageOriginForSession( CustomTabsSessionToken session, Uri origin) { SessionParams params = mSessionParams.get(session); if (params == null) return; - params.postMessageHandler.initializeWithOrigin(origin); + params.postMessageHandler.initializeWithPostMessageUri(origin); } public synchronized boolean validateRelationship( @@ -374,7 +375,7 @@ } /** - * See {@link PostMessageHandler#verifyAndInitializeWithOrigin(Uri, int)}. + * Validates the link between the client and the origin. */ public synchronized void verifyAndInitializeWithPostMessageOriginForSession( CustomTabsSessionToken session, Uri origin, @Relation int relation) { @@ -391,7 +392,7 @@ OriginVerificationListener listener = null; if (initializePostMessageChannel) listener = params.postMessageHandler; params.originVerifier = new OriginVerifier(listener, params.getPackageName(), relation); - ThreadUtils.runOnUiThread(() -> { params.originVerifier.start(origin); }); + ThreadUtils.runOnUiThread(() -> { params.originVerifier.start(new Origin(origin)); }); if (relation == CustomTabsService.RELATION_HANDLE_ALL_URLS && InstalledAppProviderImpl.isAppInstalledAndAssociatedWithOrigin( params.getPackageName(), URI.create(origin.toString()), @@ -424,7 +425,7 @@ if (!isAppAssociatedWithOrigin) return false; // Split path from the given Uri to get only the origin before web->native verification. - Uri origin = new Uri.Builder().scheme(url.getScheme()).authority(url.getHost()).build(); + Origin origin = new Origin(url); if (OriginVerifier.isValidOrigin( packageName, origin, CustomTabsService.RELATION_HANDLE_ALL_URLS)) { return true; @@ -444,7 +445,7 @@ synchronized Uri getPostMessageOriginForSessionForTesting(CustomTabsSessionToken session) { SessionParams params = mSessionParams.get(session); if (params == null) return null; - return params.postMessageHandler.getOriginForTesting(); + return params.postMessageHandler.getPostMessageUriForTesting(); } /** @@ -614,8 +615,8 @@ */ public synchronized boolean isFirstPartyOriginForSession( CustomTabsSessionToken session, Uri origin) { - return OriginVerifier.isValidOrigin(getClientPackageNameForSession(session), origin, - CustomTabsService.RELATION_USE_AS_ORIGIN); + return OriginVerifier.isValidOrigin(getClientPackageNameForSession(session), + new Origin(origin), CustomTabsService.RELATION_USE_AS_ORIGIN); } /** Tries to bind to a client to keep it alive, and returns true for success. */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java index 3c57d2b..5651586 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -39,7 +39,6 @@ import org.chromium.base.TraceEvent; import org.chromium.base.VisibleForTesting; import org.chromium.base.annotations.CalledByNative; -import org.chromium.base.metrics.RecordHistogram; import org.chromium.chrome.R; import org.chromium.chrome.browser.AppHooks; import org.chromium.chrome.browser.ChromeActionModeCallback; @@ -1700,10 +1699,6 @@ mIsTabStateDirty = true; updateTitle(); updateFullscreenEnabledState(); - if (!isNativePage()) { - RecordHistogram.recordBooleanHistogram( - "Navigation.IsMobileOptimized", mContentViewCore.getIsMobileOptimizedHint()); - } // Reset the succressiveRefresh counter after successfully loading a page. mSadTabSuccessiveRefreshCounter = 0;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java index e235112..6c49d24 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
@@ -45,6 +45,7 @@ import org.chromium.chrome.browser.browserservices.BrowserSessionContentHandler; import org.chromium.chrome.browser.browserservices.BrowserSessionContentUtils; import org.chromium.chrome.browser.browserservices.BrowserSessionDataProvider; +import org.chromium.chrome.browser.browserservices.Origin; import org.chromium.chrome.browser.browserservices.OriginVerifier; import org.chromium.chrome.browser.browserservices.OriginVerifier.OriginVerificationListener; import org.chromium.chrome.browser.compositor.layouts.LayoutManager; @@ -175,18 +176,12 @@ void verifyRelationship() { mOriginVerifier = new OriginVerifier(mTrustedWebContentProvider, getNativeClientPackageName(), CustomTabsService.RELATION_HANDLE_ALL_URLS); - // Split path from the url to get only the origin. - Uri origin = new Uri.Builder() - .scheme(mWebappInfo.uri().getScheme()) - .authority(mWebappInfo.uri().getHost()) - .build(); - mOriginVerifier.start(origin); + mOriginVerifier.start(new Origin(mWebappInfo.uri())); } @Override - public void onOriginVerified(String packageName, Uri origin, boolean verified) { + public void onOriginVerified(String packageName, Origin origin, boolean verified) { mVerificationFailed = !verified; - mOriginVerifier.cleanUp(); mOriginVerifier = null; if (mVerificationFailed) getFullscreenManager().setPositionsForTabToNonFullscreen(); }
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni index 3760ce3..f7e7675a 100644 --- a/chrome/android/java_sources.gni +++ b/chrome/android/java_sources.gni
@@ -140,6 +140,7 @@ "java/src/org/chromium/chrome/browser/browserservices/BrowserSessionContentUtils.java", "java/src/org/chromium/chrome/browser/browserservices/BrowserSessionDataProvider.java", "java/src/org/chromium/chrome/browser/browserservices/OriginVerifier.java", + "java/src/org/chromium/chrome/browser/browserservices/Origin.java", "java/src/org/chromium/chrome/browser/browserservices/PostMessageHandler.java", "java/src/org/chromium/chrome/browser/browsing_data/UrlFilters.java", "java/src/org/chromium/chrome/browser/childaccounts/ChildAccountFeedbackReporter.java", @@ -1519,6 +1520,7 @@ "javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkTest.java", "javatests/src/org/chromium/chrome/browser/browseractions/BrowserActionActivityTest.java", "javatests/src/org/chromium/chrome/browser/browserservices/OriginVerifierTest.java", + "javatests/src/org/chromium/chrome/browser/browserservices/OriginTest.java", "javatests/src/org/chromium/chrome/browser/browsing_data/BrowsingDataRemoverIntegrationTest.java", "javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelBaseTest.java", "javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelEventFilterTest.java",
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/browserservices/OriginTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/browserservices/OriginTest.java new file mode 100644 index 0000000..6fdaf073 --- /dev/null +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/browserservices/OriginTest.java
@@ -0,0 +1,71 @@ +// 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. + +package org.chromium.chrome.browser.browserservices; + +import android.net.Uri; +import android.support.test.filters.SmallTest; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.chromium.base.test.BaseJUnit4ClassRunner; +import org.chromium.content.browser.test.NativeLibraryTestRule; + +/** + * Tests for org.chromium.net.Origin. + */ +@RunWith(BaseJUnit4ClassRunner.class) +public class OriginTest { + @Rule + public NativeLibraryTestRule mNativeLibraryTestRule = new NativeLibraryTestRule(); + + @Before + public void setUp() { + mNativeLibraryTestRule.loadNativeLibraryNoBrowserProcess(); + } + + /** + * The actual conversion from a free form URL to an Origin is done in native and that is + * thoroughly tested there. Here we only check that the transformation is performed, not that + * it is complete and correct. + */ + @Test + @SmallTest + public void testConstruction() { + Origin origin = new Origin("http://www.example.com/path/to/page.html"); + Assert.assertEquals("http://www.example.com/", origin.toString()); + } + + @Test + @SmallTest + public void testEquality() { + Origin origin1 = new Origin("http://www.example.com/page1.html"); + Origin origin2 = new Origin("http://www.example.com/page2.html"); + Assert.assertEquals(origin1, origin2); + Assert.assertEquals(origin1.hashCode(), origin2.hashCode()); + + // Note http*s*. + Origin origin3 = new Origin("https://www.example.com/page3.html"); + Assert.assertNotEquals(origin1, origin3); + } + + @Test + @SmallTest + public void testToUri() { + Origin origin = new Origin(Uri.parse("http://www.example.com/page.html")); + Uri uri = Uri.parse("http://www.example.com/"); + Assert.assertEquals(uri, origin.uri()); + } + + @Test + @SmallTest + public void testToString() { + Origin origin = new Origin("http://www.example.com/page.html"); + Assert.assertEquals("http://www.example.com/", origin.toString()); + } +}
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/browserservices/OriginVerifierTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/browserservices/OriginVerifierTest.java index 9c7abcc..a461b5f6 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/browserservices/OriginVerifierTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/browserservices/OriginVerifierTest.java
@@ -40,13 +40,13 @@ private static final String SHA_256_FINGERPRINT = ChromeVersionInfo.isOfficialBuild() ? SHA_256_FINGERPRINT_OFFICIAL : SHA_256_FINGERPRINT_PUBLIC; - private static final Uri TEST_HTTPS_ORIGIN_1 = Uri.parse("https://www.example.com"); - private static final Uri TEST_HTTPS_ORIGIN_2 = Uri.parse("https://www.android.com"); - private static final Uri TEST_HTTP_ORIGIN = Uri.parse("http://www.android.com"); + private static final Origin TEST_HTTPS_ORIGIN_1 = new Origin("https://www.example.com"); + private static final Origin TEST_HTTPS_ORIGIN_2 = new Origin("https://www.android.com"); + private static final Origin TEST_HTTP_ORIGIN = new Origin("http://www.android.com"); private class TestOriginVerificationListener implements OriginVerificationListener { @Override - public void onOriginVerified(String packageName, Uri origin, boolean verified) { + public void onOriginVerified(String packageName, Origin origin, boolean verified) { mLastPackageName = packageName; mLastOrigin = origin; mLastVerified = verified; @@ -58,7 +58,7 @@ private OriginVerifier mUseAsOriginVerifier; private OriginVerifier mHandleAllUrlsVerifier; private volatile String mLastPackageName; - private volatile Uri mLastOrigin; + private volatile Origin mLastOrigin; private volatile boolean mLastVerified; @Before @@ -81,7 +81,8 @@ @Test @SmallTest public void testOnlyHttpsAllowed() throws InterruptedException { - ThreadUtils.postOnUiThread(() -> mHandleAllUrlsVerifier.start(Uri.parse("LOL"))); + ThreadUtils.postOnUiThread(() + -> mHandleAllUrlsVerifier.start(new Origin(Uri.parse("LOL")))); Assert.assertTrue( mVerificationResultSemaphore.tryAcquire(TIMEOUT_MS, TimeUnit.MILLISECONDS)); Assert.assertFalse(mLastVerified); @@ -117,8 +118,6 @@ } })); Assert.assertEquals(mLastPackageName, PACKAGE_NAME); - Assert.assertEquals(mLastOrigin, - OriginVerifier.getPostMessageOriginFromVerifiedOrigin( - PACKAGE_NAME, TEST_HTTPS_ORIGIN_1)); + Assert.assertEquals(mLastOrigin, TEST_HTTPS_ORIGIN_1); } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapEventTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapEventTest.java index 311f5dee..93b2c58 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapEventTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapEventTest.java
@@ -200,7 +200,7 @@ @Override public void run() { mContextualSearchManager.getGestureStateListener().onTouchDown(); - mContextualSearchManager.onShowUnhandledTapUIIfNeeded(0, 0); + mContextualSearchClient.showUnhandledTapUIIfNeeded(0, 0); } }); } @@ -212,7 +212,7 @@ ThreadUtils.runOnUiThreadBlocking(new Runnable() { @Override public void run() { - mContextualSearchManager.onShowUnhandledTapUIIfNeeded(0, 0); + mContextualSearchClient.showUnhandledTapUIIfNeeded(0, 0); mContextualSearchClient.onSelectionEvent( SelectionEventType.SELECTION_HANDLES_CLEARED, 0, 0); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/ClientManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/ClientManagerTest.java index 6d4b5e7..f87baa1 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/ClientManagerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/ClientManagerTest.java
@@ -24,6 +24,7 @@ import org.chromium.base.test.util.MetricsUtils; import org.chromium.base.test.util.RetryOnFailure; import org.chromium.chrome.browser.IntentHandler; +import org.chromium.chrome.browser.browserservices.Origin; import org.chromium.chrome.browser.browserservices.OriginVerifier; import org.chromium.chrome.browser.browserservices.PostMessageHandler; import org.chromium.content.browser.test.NativeLibraryTestRule; @@ -185,7 +186,7 @@ // If there is a prepopulated origin, we should get a synchronous verification. OriginVerifier.addVerifiedOriginForPackage( - ContextUtils.getApplicationContext().getPackageName(), Uri.parse(URL), + ContextUtils.getApplicationContext().getPackageName(), new Origin(URL), CustomTabsService.RELATION_USE_AS_ORIGIN); cm.verifyAndInitializeWithPostMessageOriginForSession( mSession, Uri.parse(URL), CustomTabsService.RELATION_USE_AS_ORIGIN); @@ -229,7 +230,7 @@ ThreadUtils.runOnUiThreadBlocking(() -> { // Prepopulated origins should depend on the relation used. OriginVerifier.addVerifiedOriginForPackage( - ContextUtils.getApplicationContext().getPackageName(), Uri.parse(URL), + ContextUtils.getApplicationContext().getPackageName(), new Origin(URL), CustomTabsService.RELATION_HANDLE_ALL_URLS); // This uses CustomTabsService.RELATION_USE_AS_ORIGIN by default. Assert.assertFalse(cm.isFirstPartyOriginForSession(mSession, Uri.parse(URL))); @@ -269,7 +270,7 @@ // Even if there is a prepopulated origin, non-https origins should get an early // return with false. OriginVerifier.addVerifiedOriginForPackage( - ContextUtils.getApplicationContext().getPackageName(), uri, + ContextUtils.getApplicationContext().getPackageName(), new Origin(uri), CustomTabsService.RELATION_USE_AS_ORIGIN); cm.verifyAndInitializeWithPostMessageOriginForSession( mSession, uri, CustomTabsService.RELATION_USE_AS_ORIGIN);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java index f7e15067..323d0cb 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
@@ -87,6 +87,7 @@ import org.chromium.chrome.browser.WarmupManager; import org.chromium.chrome.browser.appmenu.AppMenuHandler; import org.chromium.chrome.browser.browserservices.BrowserSessionContentUtils; +import org.chromium.chrome.browser.browserservices.Origin; import org.chromium.chrome.browser.browserservices.OriginVerifier; import org.chromium.chrome.browser.document.ChromeLauncherActivity; import org.chromium.chrome.browser.firstrun.FirstRunStatus; @@ -1176,7 +1177,7 @@ connection.newSession(token); connection.overridePackageNameForSessionForTesting(token, "app1"); ThreadUtils.runOnUiThreadBlocking( - () -> OriginVerifier.addVerifiedOriginForPackage("app1", Uri.parse(referrer), + () -> OriginVerifier.addVerifiedOriginForPackage("app1", new Origin(referrer), CustomTabsService.RELATION_USE_AS_ORIGIN)); final CustomTabsSessionToken session = warmUpAndLaunchUrlWithSession(intent);
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/contextualsearch/SelectionClientManagerTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/contextualsearch/SelectionClientManagerTest.java index b08bc3c..3ef1ad2 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/contextualsearch/SelectionClientManagerTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/contextualsearch/SelectionClientManagerTest.java
@@ -50,6 +50,9 @@ public void onSelectionEvent(int eventType, float posXPix, float posYPix) {} @Override + public void showUnhandledTapUIIfNeeded(int x, int y) {} + + @Override public void selectWordAroundCaretAck(boolean didSelect, int startAdjust, int endAdjust) {} @Override
diff --git a/chrome/android/profiles/newest.txt b/chrome/android/profiles/newest.txt index 7dd24e1..d47bb8b 100644 --- a/chrome/android/profiles/newest.txt +++ b/chrome/android/profiles/newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-66.0.3359.0_rc-r2.afdo.bz2 \ No newline at end of file +chromeos-chrome-amd64-67.0.3362.0_rc-r1.afdo.bz2 \ No newline at end of file
diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp index b4e9ffe..c6a5d7b 100644 --- a/chrome/app/chromeos_strings.grdp +++ b/chrome/app/chromeos_strings.grdp
@@ -1725,35 +1725,14 @@ <message name="IDS_LOGIN_SYNC_CONSENT_SCREEN_PERSONALIZE_GOOGLE_SERVICES_NAME" desc="Title of the personalize services section of the sync confirmation dialog that is displayed on the first user log in."> Personalize Google services </message> - <message name="IDS_LOGIN_SYNC_CONSENT_SCREEN_PERSONALIZE_GOOGLE_SERVICES_DESCRIPTION" desc="The description of the personalize services section of the sync confirmation dialog that is displayed on the first user log in."> - Google may use your browsing history to personalize Search, ads, and other Google services. + <message name="IDS_LOGIN_SYNC_CONSENT_SCREEN_PERSONALIZE_GOOGLE_SERVICES_DESCRIPTION" desc="The description of how services personalization works and a URL to configure personalization settings in Google user profile."> + Google may use your browsing history to personalize Search, ads, and other Google services. You can change this anytime at myaccount.google.com/activitycontrols/search </message> - <message name="IDS_LOGIN_SYNC_CONSENT_SCREEN_SETTINGS_LINK" desc="A note at the end of the sync confirmation dialog that is displayed on the first user log in, suggesting that preferences may be changed in Settings. It also contains link to Settings page."> - Control how this works in <ph name="LINK_START">$1<ex>>a<</ex></ph>Settings<ph name="LINK_END">$2<ex>>/a<</ex></ph>. + <message name="IDS_LOGIN_SYNC_CONSENT_SCREEN_REVIEW_SYNC_OPTIONS_LATER" desc="The label to the checkbox explaining that when checked, it will trigger user settings screen opened after session start."> + Review sync options following setup </message> - <message name="IDS_LOGIN_SYNC_CONSENT_SETTINGS_TITLE" desc="The title of the dialog that is shown on the first user log in, and allows user to select Chrome Sync options."> - Sync settings - </message> - <message name="IDS_LOGIN_SYNC_CONSENT_SETTINGS_SUBTITLE" desc="The sub-title of the dialog that is shown on the first user log in, and allows user to select Chrome Sync options. It explains to the user what options can be changed here."> - Your bookmarks, history, passwords, and other settings will be synced to your Google Account so you can use them on all your devices. You can always change this later in your settings. - </message> - <message name="IDS_LOGIN_SYNC_CONSENT_SYNC_ALL_OPTION" desc="Label for toggle-button UI element that controls whether user settings are synced to user's Google Account."> - Sync everything - </message> - <message name="IDS_LOGIN_SYNC_CONSENT_SYNC_ALL_OPTION_ON" desc="A 'turned on' value for the 'Sync everything' toggle-button UI element that controls whether user settings are synced to user's Google Account."> - On - </message> - <message name="IDS_LOGIN_SYNC_CONSENT_SYNC_ALL_OPTION_OFF" desc="A 'turned off' value for the 'Sync everything' toggle-button UI element that controls whether user settings are synced to user's Google Account."> - Off - </message> - <message name="IDS_LOGIN_SYNC_CONSENT_STATUS_SYNC_ALL_ON" desc="Status message on the Chrome Sync status dialog explaining 'sync is turned on' status."> - Personalization is on. You can change this at myaccount.google.com. - </message> - <message name="IDS_LOGIN_SYNC_CONSENT_STATUS_SYNC_ALL_OFF" desc="Status message on the Chrome Sync status dialog explaining 'sync is turned off' status."> - Personalization is off. You can change this at myaccount.google.com. - </message> - <message name="IDS_LOGIN_SYNC_CONSENT_SAVE_AND_CONTINUE" desc="Label on the button of the Sync Settings dialog that closes the dialog and saves the changes."> - Save and continue + <message name="IDS_LOGIN_SYNC_CONSENT_SCREEN_ACCEPT_AND_CONTINUE" desc="The label on the button that closes dialog while accepting the selected settings."> + Accept and continue </message> <message name="IDS_DISABLED_ADD_USER_TOOLTIP" desc="Tooltip over disabled Add user button"> The owner of this device has disabled new users from being added
diff --git a/chrome/app/chromium_strings.grd b/chrome/app/chromium_strings.grd index 67fd36e..e236d95 100644 --- a/chrome/app/chromium_strings.grd +++ b/chrome/app/chromium_strings.grd
@@ -1249,7 +1249,7 @@ </message> <message name="IDS_RELAUNCH_REQUIRED_TITLE_DAYS" desc="The title of a dialog that tells users the browser must be relaunched within two or more days."> {0, plural, - =1 {Relaunch Chromium within a day}} + =1 {Relaunch Chromium within a day} other {Relaunch Chromium within # days}} </message> <message name="IDS_RELAUNCH_REQUIRED_TITLE_HOURS" desc="The title of a dialog that tells users the browser must be relaunched within one or more hours.">
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 2244303..ae21985 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -6104,7 +6104,10 @@ <message name="IDS_PRINT_PREVIEW_OFFLINE" desc="Shown when printer is currently offline."> Currently offline </message> - <message name="IDS_PRINT_PREVIEW_NO_LONGER_SUPPORTED" desc="Shown when printer is no longer supported."> + <message name="IDS_PRINT_PREVIEW_NO_LONGER_SUPPORTED_FRAGMENT" desc="Shown in destination settings when printer is no longer supported."> + No longer supported + </message> + <message name="IDS_PRINT_PREVIEW_NO_LONGER_SUPPORTED" desc="Shown in destinations dialog when printer is no longer supported."> No longer supported. </message> <message name="IDS_PRINT_PREVIEW_EXTENSION_DESTINATION_ICON_TOOLTIP" desc="Tooltip for the icon shown in print destination list next to print destination provided by an extension.">
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 5641004..8b8a6a9f 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -1941,10 +1941,6 @@ "android/contextualsearch/ctr_suppression.h", "android/contextualsearch/resolved_search_term.cc", "android/contextualsearch/resolved_search_term.h", - "android/contextualsearch/unhandled_tap_notifier_impl.cc", - "android/contextualsearch/unhandled_tap_notifier_impl.h", - "android/contextualsearch/unhandled_tap_web_contents_observer.cc", - "android/contextualsearch/unhandled_tap_web_contents_observer.h", "android/cookies/cookies_fetcher_util.cc", "android/crash/pure_java_exception_handler.cc", "android/crash/pure_java_exception_handler.h", @@ -3479,8 +3475,6 @@ "renderer_context_menu/context_menu_content_type_platform_app.h", "renderer_host/chrome_extension_message_filter.cc", "renderer_host/chrome_extension_message_filter.h", - "signin/chrome_proximity_auth_client.cc", - "signin/chrome_proximity_auth_client.h", "speech/extension_api/tts_engine_extension_api.cc", "speech/extension_api/tts_engine_extension_api.h", "speech/extension_api/tts_engine_extension_observer.cc", @@ -3629,6 +3623,8 @@ if (is_chromeos) { sources += [ + "signin/chrome_proximity_auth_client.cc", + "signin/chrome_proximity_auth_client.h", "signin/easy_unlock_app_manager.cc", "signin/easy_unlock_app_manager.h", "signin/easy_unlock_auth_attempt.cc",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 12e01ca..a179200 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -3384,12 +3384,6 @@ flag_descriptions::kAsyncImageDecodingDescription, kOsAll, MULTI_VALUE_TYPE(kAsyncImageDecodingChoices)}, - {"capture-thumbnail-on-navigating-away", - flag_descriptions::kCaptureThumbnailOnNavigatingAwayName, - flag_descriptions::kCaptureThumbnailOnNavigatingAwayDescription, - kOsDesktop, - FEATURE_VALUE_TYPE(features::kCaptureThumbnailOnNavigatingAway)}, - #if defined(OS_CHROMEOS) {"disable-lock-screen-apps", flag_descriptions::kDisableLockScreenAppsName, flag_descriptions::kDisableLockScreenAppsDescription, kOsCrOS, @@ -3503,7 +3497,7 @@ {"enable-v8-context-snapshot", flag_descriptions::kV8ContextSnapshotName, flag_descriptions::kV8ContextSnapshotDescription, - kOsDesktop, // TODO(peria): Add Android support. + kOsMac | kOsWin | kOsLinux | kOsAndroid, FEATURE_VALUE_TYPE(features::kV8ContextSnapshot)}, #if defined(OS_CHROMEOS)
diff --git a/chrome/browser/android/DEPS b/chrome/browser/android/DEPS index d42425c9..cc1bb3a 100644 --- a/chrome/browser/android/DEPS +++ b/chrome/browser/android/DEPS
@@ -15,7 +15,6 @@ "+sandbox/sandbox_features.h", "+third_party/gvr-android-sdk", "+third_party/WebKit/public/platform/media_download_in_product_help.mojom.h", - "+third_party/WebKit/public/platform/unhandled_tap_notifier.mojom.h", ] specific_include_rules = {
diff --git a/chrome/browser/android/contextualsearch/contextual_search_manager.cc b/chrome/browser/android/contextualsearch/contextual_search_manager.cc index 2ee3567..c985300 100644 --- a/chrome/browser/android/contextualsearch/contextual_search_manager.cc +++ b/chrome/browser/android/contextualsearch/contextual_search_manager.cc
@@ -14,6 +14,7 @@ #include "base/time/time.h" #include "chrome/browser/android/contextualsearch/contextual_search_delegate.h" #include "chrome/browser/android/contextualsearch/resolved_search_term.h" +#include "chrome/browser/android/tab_android.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "components/contextual_search/browser/contextual_search_js_api_service_impl.h"
diff --git a/chrome/browser/android/contextualsearch/contextual_search_tab_helper.cc b/chrome/browser/android/contextualsearch/contextual_search_tab_helper.cc index 8700892..41c30fd 100644 --- a/chrome/browser/android/contextualsearch/contextual_search_tab_helper.cc +++ b/chrome/browser/android/contextualsearch/contextual_search_tab_helper.cc
@@ -6,13 +6,10 @@ #include "base/android/jni_android.h" #include "base/android/jni_string.h" -#include "build/build_config.h" -#include "chrome/browser/android/contextualsearch/unhandled_tap_web_contents_observer.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_android.h" #include "chrome/common/pref_names.h" #include "components/prefs/pref_change_registrar.h" -#include "content/public/browser/web_contents.h" #include "jni/ContextualSearchTabHelper_jni.h" using base::android::JavaParamRef; @@ -27,9 +24,8 @@ pref_change_registrar_->Init(profile->GetPrefs()); pref_change_registrar_->Add( prefs::kContextualSearchEnabled, - base::BindRepeating( - &ContextualSearchTabHelper::OnContextualSearchPrefChanged, - weak_factory_.GetWeakPtr())); + base::Bind(&ContextualSearchTabHelper::OnContextualSearchPrefChanged, + weak_factory_.GetWeakPtr())); } ContextualSearchTabHelper::~ContextualSearchTabHelper() { @@ -42,33 +38,6 @@ Java_ContextualSearchTabHelper_onContextualSearchPrefChanged(env, jobj); } -void ContextualSearchTabHelper::OnShowUnhandledTapUIIfNeeded(int x_px, - int y_px) { - JNIEnv* env = base::android::AttachCurrentThread(); - ScopedJavaLocalRef<jobject> jobj = weak_java_ref_.get(env); - Java_ContextualSearchTabHelper_onShowUnhandledTapUIIfNeeded(env, jobj, x_px, - y_px); -} - -void ContextualSearchTabHelper::InstallUnhandledTapNotifierIfNeeded( - JNIEnv* env, - jobject obj, - const JavaParamRef<jobject>& j_base_web_contents, - jfloat device_scale_factor) { - DCHECK(j_base_web_contents); - content::WebContents* base_web_contents = - content::WebContents::FromJavaWebContents(j_base_web_contents); - DCHECK(base_web_contents); - if (!unhandled_tap_web_contents_observer_) { - unhandled_tap_web_contents_observer_.reset( - new contextual_search::UnhandledTapWebContentsObserver( - base_web_contents, device_scale_factor, - base::BindRepeating( - &ContextualSearchTabHelper::OnShowUnhandledTapUIIfNeeded, - weak_factory_.GetWeakPtr()))); - } -} - void ContextualSearchTabHelper::Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj) { delete this;
diff --git a/chrome/browser/android/contextualsearch/contextual_search_tab_helper.h b/chrome/browser/android/contextualsearch/contextual_search_tab_helper.h index c7832e8..36f7b2c 100644 --- a/chrome/browser/android/contextualsearch/contextual_search_tab_helper.h +++ b/chrome/browser/android/contextualsearch/contextual_search_tab_helper.h
@@ -15,42 +15,17 @@ class Profile; -namespace contextual_search { -class UnhandledTapWebContentsObserver; -} - class ContextualSearchTabHelper { public: ContextualSearchTabHelper(JNIEnv* env, jobject obj, Profile* profile); void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); - // Installs the UnhandledTapNotifier Mojo handler if needed. - // The |j_base_web_contents| is a java WebContents of the base page tab. - // The |device_scale_factor| is the ratio of pixels to dips. - void InstallUnhandledTapNotifierIfNeeded( - JNIEnv* env, - jobject obj, - const base::android::JavaParamRef<jobject>& j_base_web_contents, - jfloat device_scale_factor); - private: ~ContextualSearchTabHelper(); - - // Methods that call back to Java. - // Call when the preferences change. void OnContextualSearchPrefChanged(); - // Call when an unhandled tap needs to show the UI for a tap at the given - // position. - void OnShowUnhandledTapUIIfNeeded(int x_px, int y_px); JavaObjectWeakGlobalRef weak_java_ref_; std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; - - // The unhandled tap WebContentsObserver for the current tab. - // Installs a mojo handler for ShowUnhandledTapUIIfNeeded. - std::unique_ptr<contextual_search::UnhandledTapWebContentsObserver> - unhandled_tap_web_contents_observer_; - base::WeakPtrFactory<ContextualSearchTabHelper> weak_factory_; DISALLOW_COPY_AND_ASSIGN(ContextualSearchTabHelper); };
diff --git a/chrome/browser/android/contextualsearch/unhandled_tap_notifier_impl.cc b/chrome/browser/android/contextualsearch/unhandled_tap_notifier_impl.cc deleted file mode 100644 index 36fa718..0000000 --- a/chrome/browser/android/contextualsearch/unhandled_tap_notifier_impl.cc +++ /dev/null
@@ -1,47 +0,0 @@ -// Copyright 2018 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/contextualsearch/unhandled_tap_notifier_impl.h" - -#include <utility> - -#include "base/memory/ptr_util.h" -#include "content/public/common/use_zoom_for_dsf_policy.h" -#include "mojo/public/cpp/bindings/strong_binding.h" - -namespace contextual_search { - -UnhandledTapNotifierImpl::UnhandledTapNotifierImpl( - float device_scale_factor, - UnhandledTapCallback callback) - : device_scale_factor_(device_scale_factor), - unhandled_tap_callback_(std::move(callback)) {} - -UnhandledTapNotifierImpl::~UnhandledTapNotifierImpl() {} - -void UnhandledTapNotifierImpl::ShowUnhandledTapUIIfNeeded( - blink::mojom::UnhandledTapInfoPtr unhandled_tap_info) { - float x_px = unhandled_tap_info->tapped_position_in_viewport.x(); - float y_px = unhandled_tap_info->tapped_position_in_viewport.y(); - - if (!content::IsUseZoomForDSFEnabled()) { - x_px /= device_scale_factor_; - y_px /= device_scale_factor_; - } - // Call back through the callback if possible. (The callback uses a weakptr - // that might make this a NOP). - unhandled_tap_callback_.Run(x_px, y_px); -} - -// static -void CreateUnhandledTapNotifierImpl( - float device_scale_factor, - UnhandledTapCallback callback, - blink::mojom::UnhandledTapNotifierRequest request) { - mojo::MakeStrongBinding(std::make_unique<UnhandledTapNotifierImpl>( - device_scale_factor, std::move(callback)), - std::move(request)); -} - -} // namespace contextual_search
diff --git a/chrome/browser/android/contextualsearch/unhandled_tap_notifier_impl.h b/chrome/browser/android/contextualsearch/unhandled_tap_notifier_impl.h deleted file mode 100644 index 3340608..0000000 --- a/chrome/browser/android/contextualsearch/unhandled_tap_notifier_impl.h +++ /dev/null
@@ -1,49 +0,0 @@ -// Copyright 2018 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_CONTEXTUALSEARCH_UNHANDLED_TAP_NOTIFIER_IMPL_H_ -#define CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_UNHANDLED_TAP_NOTIFIER_IMPL_H_ - -#include "base/macros.h" -#include "chrome/browser/android/contextualsearch/unhandled_tap_web_contents_observer.h" -#include "third_party/WebKit/public/platform/unhandled_tap_notifier.mojom.h" - -namespace contextual_search { - -// Implements a Mojo service endpoint for the mojo unhandled-tap notifier -// message. -class UnhandledTapNotifierImpl : public blink::mojom::UnhandledTapNotifier { - public: - // Creates an implementation that will scale tap locations by the given - // |scale_factor| (when needed) and call the given |callback| when Mojo - // ShowUnhandledTapUIIfNeeded messages are received for the - // unhandled_tap_notifier service. - UnhandledTapNotifierImpl(float device_scale_factor, - UnhandledTapCallback callback); - - ~UnhandledTapNotifierImpl() override; - - // Mojo UnhandledTapNotifier implementation. - void ShowUnhandledTapUIIfNeeded( - blink::mojom::UnhandledTapInfoPtr unhandled_tap_info) override; - - private: - // Scale factor between pixels and DPs. - float device_scale_factor_; - - // Callback to call when an unhandled tap notification takes place. - UnhandledTapCallback unhandled_tap_callback_; - - DISALLOW_COPY_AND_ASSIGN(UnhandledTapNotifierImpl); -}; - -// static -void CreateUnhandledTapNotifierImpl( - float device_scale_factor, - UnhandledTapCallback callback, - blink::mojom::UnhandledTapNotifierRequest request); - -} // namespace contextual_search - -#endif // CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_UNHANDLED_TAP_NOTIFIER_IMPL_H_
diff --git a/chrome/browser/android/contextualsearch/unhandled_tap_web_contents_observer.cc b/chrome/browser/android/contextualsearch/unhandled_tap_web_contents_observer.cc deleted file mode 100644 index 74e86be..0000000 --- a/chrome/browser/android/contextualsearch/unhandled_tap_web_contents_observer.cc +++ /dev/null
@@ -1,42 +0,0 @@ -// Copyright 2018 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/contextualsearch/unhandled_tap_web_contents_observer.h" - -#include <utility> - -#include "base/memory/ptr_util.h" -#include "build/build_config.h" -#include "third_party/WebKit/public/public_features.h" - -#if BUILDFLAG(ENABLE_UNHANDLED_TAP) -#include "chrome/browser/android/contextualsearch/unhandled_tap_notifier_impl.h" -#endif // BUILDFLAG(ENABLE_UNHANDLED_TAP) - -namespace contextual_search { - -UnhandledTapWebContentsObserver::UnhandledTapWebContentsObserver( - content::WebContents* web_contents, - float device_scale_factor, - UnhandledTapCallback callback) - : content::WebContentsObserver(web_contents) { -#if BUILDFLAG(ENABLE_UNHANDLED_TAP) - registry_.AddInterface( - base::BindRepeating(&contextual_search::CreateUnhandledTapNotifierImpl, - device_scale_factor, std::move(callback))); -#endif // BUILDFLAG(ENABLE_UNHANDLED_TAP) -} - -UnhandledTapWebContentsObserver::~UnhandledTapWebContentsObserver() {} - -void UnhandledTapWebContentsObserver::OnInterfaceRequestFromFrame( - content::RenderFrameHost* render_frame_host, - const std::string& interface_name, - mojo::ScopedMessagePipeHandle* interface_pipe) { -#if BUILDFLAG(ENABLE_UNHANDLED_TAP) - registry_.TryBindInterface(interface_name, interface_pipe); -#endif // BUILDFLAG(ENABLE_UNHANDLED_TAP) -} - -} // namespace contextual_search
diff --git a/chrome/browser/android/contextualsearch/unhandled_tap_web_contents_observer.h b/chrome/browser/android/contextualsearch/unhandled_tap_web_contents_observer.h deleted file mode 100644 index d5bbd4b..0000000 --- a/chrome/browser/android/contextualsearch/unhandled_tap_web_contents_observer.h +++ /dev/null
@@ -1,46 +0,0 @@ -// Copyright 2018 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_CONTEXTUALSEARCH_UNHANDLED_TAP_WEB_CONTENTS_OBSERVER_H_ -#define CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_UNHANDLED_TAP_WEB_CONTENTS_OBSERVER_H_ - -#include "base/macros.h" -#include "content/public/browser/render_frame_host.h" -#include "content/public/browser/web_contents_observer.h" -#include "services/service_manager/public/cpp/binder_registry.h" - -namespace contextual_search { - -typedef base::RepeatingCallback<void(int x_px, int y_px)> UnhandledTapCallback; - -// Binds a Mojo unhandled-tap notifier message-handler to the frame host -// observed by this observer. -class UnhandledTapWebContentsObserver : public content::WebContentsObserver { - public: - // Creates an observer for the given |web_contents| that binds a Mojo request - // for an endpoint to the UnhandledTapNotifier service. This will create an - // instance of the contextual_search::CreateUnhandledTapNotifierImpl to handle - // those messages. May use the given |scale_factor| to convert from dips to - // pixels for tap coordinates when calling back through the given |callback|. - UnhandledTapWebContentsObserver(content::WebContents* web_contents, - float device_scale_factor, - UnhandledTapCallback callback); - - ~UnhandledTapWebContentsObserver() override; - - private: - // content::WebContentsObserver implementation. - void OnInterfaceRequestFromFrame( - content::RenderFrameHost* render_frame_host, - const std::string& interface_name, - mojo::ScopedMessagePipeHandle* interface_pipe) override; - - service_manager::BinderRegistry registry_; - - DISALLOW_COPY_AND_ASSIGN(UnhandledTapWebContentsObserver); -}; - -} // namespace contextual_search - -#endif // CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_UNHANDLED_TAP_WEB_CONTENTS_OBSERVER_H_
diff --git a/chrome/browser/browsing_data/navigation_entry_remover.cc b/chrome/browser/browsing_data/navigation_entry_remover.cc index e10fff2..05258b0 100644 --- a/chrome/browser/browsing_data/navigation_entry_remover.cc +++ b/chrome/browser/browsing_data/navigation_entry_remover.cc
@@ -76,6 +76,10 @@ const content::NavigationController::DeletionPredicate& predicate) { for (int i = 0; i < tab_count; i++) { content::WebContents* web_contents = tab_list->GetWebContentsAt(i); + // TODO(dullweber): Non-loaded tabs on Android don't have a WebContents. + // We need to cleanup their TabState instead. + if (!web_contents) + continue; content::NavigationController* controller = &web_contents->GetController(); controller->DiscardNonCommittedEntries(); // We discarded pending and transient entries but there could still be
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 54414c7d..d587d03 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc
@@ -227,6 +227,7 @@ #include "google_apis/google_api_keys.h" #include "gpu/config/gpu_switches.h" #include "media/audio/audio_manager.h" +#include "media/base/media_switches.h" #include "media/media_features.h" #include "media/mojo/features.h" #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h" @@ -895,6 +896,9 @@ // used for mapping the command-line flags). registry->RegisterStringPref(prefs::kIsolateOrigins, std::string()); registry->RegisterBooleanPref(prefs::kSitePerProcess, false); +#if !defined(OS_ANDROID) + registry->RegisterBooleanPref(prefs::kAutoplayAllowed, false); +#endif } // static @@ -2719,14 +2723,17 @@ web_prefs->embedded_media_experience_enabled = tab_android->ShouldEnableEmbeddedMediaExperience(); - web_prefs->picture_in_picture_enabled = - tab_android->IsPictureInPictureEnabled(); - if (base::FeatureList::IsEnabled( features::kAllowAutoplayUnmutedInWebappManifestScope)) { web_prefs->media_playback_gesture_whitelist_scope = tab_android->GetWebappManifestScope(); } + + if (base::FeatureList::IsEnabled(media::kUseSurfaceLayerForVideo) && + base::FeatureList::IsEnabled(media::kPictureInPicture)) { + web_prefs->picture_in_picture_enabled = + tab_android->IsPictureInPictureEnabled(); + } } } @@ -2754,6 +2761,14 @@ } } +#if !defined(OS_ANDROID) + if (prefs->GetBoolean(prefs::kAutoplayAllowed) && + prefs->IsManagedPreference(prefs::kAutoplayAllowed)) { + web_prefs->autoplay_policy = + content::AutoplayPolicy::kNoUserGestureRequired; + } +#endif // !defined(OS_ANDROID) + for (size_t i = 0; i < extra_parts_.size(); ++i) extra_parts_[i]->OverrideWebkitPrefs(rvh, web_prefs); }
diff --git a/chrome/browser/chromeos/accessibility/select_to_speak_browsertest.cc b/chrome/browser/chromeos/accessibility/select_to_speak_browsertest.cc index 24acb5a..8e8e37b 100644 --- a/chrome/browser/chromeos/accessibility/select_to_speak_browsertest.cc +++ b/chrome/browser/chromeos/accessibility/select_to_speak_browsertest.cc
@@ -256,7 +256,13 @@ EXPECT_EQ(focus_rings.size(), 0u); } -IN_PROC_BROWSER_TEST_F(SelectToSpeakTest, ContinuesReadingDuringResize) { +// Disabled due to use-after-free; see https://crbug.com/818603. +#if defined(ADDRESS_SANITIZER) +#define MAYBE_ContinuesReadingDuringResize DISABLED_ContinuesReadingDuringResize +#else +#define MAYBE_ContinuesReadingDuringResize ContinuesReadingDuringResize +#endif +IN_PROC_BROWSER_TEST_F(SelectToSpeakTest, MAYBE_ContinuesReadingDuringResize) { ActivateSelectToSpeakInWindowBounds( "data:text/html;charset=utf-8,<p>First paragraph</p>" "<div id='resize' style='width:300px; font-size: 10em'>"
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_mount.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_mount.cc index 51b2a3d..727b1332 100644 --- a/chrome/browser/chromeos/extensions/file_manager/private_api_mount.cc +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_mount.cc
@@ -219,6 +219,108 @@ return true; } +bool FileManagerPrivateMarkCacheAsMountedFunction::RunAsync() { + using file_manager_private::MarkCacheAsMounted::Params; + const std::unique_ptr<Params> params(Params::Create(*args_)); + EXTENSION_FUNCTION_VALIDATE(params); + + const base::FilePath path(params->source_path); + bool isMounted = params->is_mounted; + + if (path.empty()) + return false; + + if (!drive::util::IsUnderDriveMountPoint(path)) { + // Ignore non-drive files. Treated as success. + SendResponse(true); + return true; + } + + drive::FileSystemInterface* file_system = + drive::util::GetFileSystemByProfile(GetProfile()); + if (!file_system) + return false; + + // Ensure that the cache file exists. + const base::FilePath drive_path = drive::util::ExtractDrivePath(path); + file_system->GetFile( + drive_path, + base::Bind( + &FileManagerPrivateMarkCacheAsMountedFunction::RunAfterGetDriveFile, + this, drive_path, isMounted)); + return true; +} + +void FileManagerPrivateMarkCacheAsMountedFunction::RunAfterGetDriveFile( + const base::FilePath& drive_path, + bool isMounted, + drive::FileError error, + const base::FilePath& cache_path, + std::unique_ptr<drive::ResourceEntry> entry) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + if (error != drive::FILE_ERROR_OK) { + SetError(FileErrorToString(error)); + SendResponse(false); + return; + } + + drive::FileSystemInterface* const file_system = + drive::util::GetFileSystemByProfile(GetProfile()); + if (!file_system) { + SendResponse(false); + return; + } + + // TODO(yamaguchi): Check if the current status of the file. + // Currently calling this method twice will result in error, although it + // doesn't give bad side effect. + if (isMounted) { + file_system->MarkCacheFileAsMounted( + drive_path, base::Bind(&FileManagerPrivateMarkCacheAsMountedFunction:: + RunAfterMarkCacheFileAsMounted, + this)); + } else { + file_system->MarkCacheFileAsUnmounted( + cache_path, base::Bind(&FileManagerPrivateMarkCacheAsMountedFunction:: + RunAfterMarkCacheFileAsUnmounted, + this)); + } +} + +void FileManagerPrivateMarkCacheAsMountedFunction:: + RunAfterMarkCacheFileAsMounted(drive::FileError error, + const base::FilePath& file_path) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + switch (error) { + case drive::FILE_ERROR_INVALID_OPERATION: + // The file was already marked as mounted. Ignore and treat as success. + case drive::FILE_ERROR_OK: + SendResponse(true); + break; + default: + SetError(FileErrorToString(error)); + SendResponse(false); + } +} + +void FileManagerPrivateMarkCacheAsMountedFunction:: + RunAfterMarkCacheFileAsUnmounted(drive::FileError error) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + switch (error) { + case drive::FILE_ERROR_INVALID_OPERATION: + // The file was already marked as unmounted. Ignore and treat as success. + case drive::FILE_ERROR_OK: + SendResponse(true); + break; + default: + SetError(FileErrorToString(error)); + SendResponse(false); + } +} + bool FileManagerPrivateGetVolumeMetadataListFunction::RunAsync() { if (args_->GetSize()) return false;
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_mount.h b/chrome/browser/chromeos/extensions/file_manager/private_api_mount.h index 7c60630c..3114997 100644 --- a/chrome/browser/chromeos/extensions/file_manager/private_api_mount.h +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_mount.h
@@ -58,6 +58,36 @@ bool RunAsync() override; }; +// Implements chrome.fileManagerPrivate.markCacheAsMounted method. +// Marks a cached file as mounted or unmounted. +class FileManagerPrivateMarkCacheAsMountedFunction + : public LoggedAsyncExtensionFunction { + public: + DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.markCacheAsMounted", + FILEMANAGERPRIVATE_MARKCACHEASMOUNTED) + + protected: + ~FileManagerPrivateMarkCacheAsMountedFunction() override {} + + // AsyncExtensionFunction overrides. + bool RunAsync() override; + + private: + // Part of Run(). Called after GetFile for Drive File System. + void RunAfterGetDriveFile(const base::FilePath& drive_path, + bool isMounted, + drive::FileError error, + const base::FilePath& cache_path, + std::unique_ptr<drive::ResourceEntry> entry); + + // Part of Run(). Called after MarkCacheFielAsMounted for Drive File System. + void RunAfterMarkCacheFileAsMounted(drive::FileError error, + const base::FilePath& file_path); + + // Part of Run(). Called after MarkCacheFielAsUnmounted for Drive File System. + void RunAfterMarkCacheFileAsUnmounted(drive::FileError error); +}; + // Implements chrome.fileManagerPrivate.getVolumeMetadataList method. class FileManagerPrivateGetVolumeMetadataListFunction : public LoggedAsyncExtensionFunction {
diff --git a/chrome/browser/chromeos/file_manager/gallery_browsertest.cc b/chrome/browser/chromeos/file_manager/gallery_browsertest.cc index 9610cdc..edc2b99 100644 --- a/chrome/browser/chromeos/file_manager/gallery_browsertest.cc +++ b/chrome/browser/chromeos/file_manager/gallery_browsertest.cc
@@ -124,7 +124,10 @@ #else #define MAYBE_TraverseSlideImagesOnDrive TraverseSlideImagesOnDrive #endif -IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_TraverseSlideImagesOnDrive) { +// TODO(yamaguchi):Enable after removing root cause of the test flakiness. +// https://crbug.com/804413. +IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, + DISABLED_TraverseSlideImagesOnDrive) { set_test_case_name("traverseSlideImagesOnDrive"); StartTest(); } @@ -162,7 +165,9 @@ StartTest(); } -IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, RenameImageOnDownloads) { +// TODO(yamaguchi):Enable after removing root cause of the test flakiness. +// https://crbug.com/804413. +IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, DISABLED_RenameImageOnDownloads) { set_test_case_name("renameImageOnDownloads"); StartTest(); } @@ -297,7 +302,9 @@ #else #define MAYBE_CropImageOnDrive CropImageOnDrive #endif -IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, MAYBE_CropImageOnDrive) { +// TODO(yamaguchi):Enable after removing root cause of the test flakiness. +// https://crbug.com/804413. +IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, DISABLED_CropImageOnDrive) { set_test_case_name("cropImageOnDrive"); StartTest(); }
diff --git a/chrome/browser/chromeos/file_manager/video_player_browsertest.cc b/chrome/browser/chromeos/file_manager/video_player_browsertest.cc index 1bf5ff9..7296d62 100644 --- a/chrome/browser/chromeos/file_manager/video_player_browsertest.cc +++ b/chrome/browser/chromeos/file_manager/video_player_browsertest.cc
@@ -75,7 +75,9 @@ #else #define MAYBE_CheckInitialElements CheckInitialElements #endif -IN_PROC_BROWSER_TEST_F(VideoPlayerBrowserTest, MAYBE_CheckInitialElements) { +// TODO(yamaguchi):Enable after removing root cause of the test flakiness. +// https://crbug.com/804413. +IN_PROC_BROWSER_TEST_F(VideoPlayerBrowserTest, DISABLED_CheckInitialElements) { set_test_case_name("checkInitialElements"); StartTest(); } @@ -86,7 +88,9 @@ #else #define MAYBE_ClickControlButtons ClickControlButtons #endif -IN_PROC_BROWSER_TEST_F(VideoPlayerBrowserTest, MAYBE_ClickControlButtons) { +// TODO(yamaguchi):Enable after removing root cause of the test flakiness. +// https://crbug.com/804413. +IN_PROC_BROWSER_TEST_F(VideoPlayerBrowserTest, DISABLED_ClickControlButtons) { set_test_case_name("clickControlButtons"); StartTest(); }
diff --git a/chrome/browser/chromeos/login/screens/sync_consent_screen.cc b/chrome/browser/chromeos/login/screens/sync_consent_screen.cc index b8b71fa7..adf1d2a0 100644 --- a/chrome/browser/chromeos/login/screens/sync_consent_screen.cc +++ b/chrome/browser/chromeos/login/screens/sync_consent_screen.cc
@@ -15,7 +15,9 @@ namespace chromeos { namespace { -constexpr const char kUserActionButtonClicked[] = "save-and-continue"; +constexpr const char kUserActionConinueAndReview[] = "continue-and-review"; +constexpr const char kUserActionContinueWithDefaults[] = + "continue-with-defaults"; browser_sync::ProfileSyncService* GetSyncService(Profile* profile) { if (ProfileSyncServiceFactory::HasProfileSyncService(profile)) @@ -54,7 +56,11 @@ } void SyncConsentScreen::OnUserAction(const std::string& action_id) { - if (action_id == kUserActionButtonClicked) { + if (action_id == kUserActionConinueAndReview) { + Finish(ScreenExitCode::SYNC_CONSENT_FINISHED); + return; + } + if (action_id == kUserActionContinueWithDefaults) { Finish(ScreenExitCode::SYNC_CONSENT_FINISHED); return; }
diff --git a/chrome/browser/chromeos/printing/printers_sync_bridge.cc b/chrome/browser/chromeos/printing/printers_sync_bridge.cc index a7e2701..08a1dc5 100644 --- a/chrome/browser/chromeos/printing/printers_sync_bridge.cc +++ b/chrome/browser/chromeos/printing/printers_sync_bridge.cc
@@ -252,7 +252,7 @@ } } } - callback.Run(std::move(batch)); + std::move(callback).Run(std::move(batch)); } void PrintersSyncBridge::GetAllData(DataCallback callback) { @@ -263,7 +263,7 @@ batch->Put(entry.first, CopyToEntityData(*entry.second)); } } - callback.Run(std::move(batch)); + std::move(callback).Run(std::move(batch)); } std::string PrintersSyncBridge::GetClientTag(const EntityData& entity_data) {
diff --git a/chrome/browser/engagement/site_engagement_helper_unittest.cc b/chrome/browser/engagement/site_engagement_helper_unittest.cc index cd2f972..a325890 100644 --- a/chrome/browser/engagement/site_engagement_helper_unittest.cc +++ b/chrome/browser/engagement/site_engagement_helper_unittest.cc
@@ -562,7 +562,7 @@ // Occluded -> Visible transition should not affect input tracking. EXPECT_EQ(content::Visibility::OCCLUDED, web_contents()->GetVisibility()); - web_contents()->WasShown(); + web_contents()->WasUnOccluded(); EXPECT_EQ(content::Visibility::VISIBLE, web_contents()->GetVisibility()); EXPECT_FALSE(input_tracker_timer->IsRunning()); EXPECT_TRUE(IsTrackingInput(helper)); @@ -583,7 +583,7 @@ // Hidden -> Occluded transition should start a timer to track input. EXPECT_EQ(content::Visibility::HIDDEN, web_contents()->GetVisibility()); - web_contents()->WasOccluded(); + web_contents()->WasShown(); EXPECT_EQ(content::Visibility::OCCLUDED, web_contents()->GetVisibility()); EXPECT_TRUE(input_tracker_timer->IsRunning()); EXPECT_FALSE(IsTrackingInput(helper));
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index a24aa4e..2c8c567 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -117,13 +117,6 @@ "Use committed error pages instead of transient navigation entries " "for interstitial error pages (e.g. certificate errors)."; -const char kCaptureThumbnailOnNavigatingAwayName[] = - "Capture page thumbnail on navigating away"; -const char kCaptureThumbnailOnNavigatingAwayDescription[] = - "Capture a page thumbnail (for use on the New Tab page) when navigating " - "away from the current page, in addition to other times a thumbnail may be " - "captured."; - const char kCastStreamingHwEncodingName[] = "Cast Streaming hardware video encoding"; const char kCastStreamingHwEncodingDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 24e27fd..7c4363ff 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -99,9 +99,6 @@ extern const char kCommittedInterstitialsName[]; extern const char kCommittedInterstitialsDescription[]; -extern const char kCaptureThumbnailOnNavigatingAwayName[]; -extern const char kCaptureThumbnailOnNavigatingAwayDescription[]; - extern const char kCastStreamingHwEncodingName[]; extern const char kCastStreamingHwEncodingDescription[];
diff --git a/chrome/browser/metrics/chrome_stability_metrics_provider.cc b/chrome/browser/metrics/chrome_stability_metrics_provider.cc index 2b0dba78..8b662d7c 100644 --- a/chrome/browser/metrics/chrome_stability_metrics_provider.cc +++ b/chrome/browser/metrics/chrome_stability_metrics_provider.cc
@@ -36,6 +36,15 @@ helper_(local_state) { BrowserChildProcessObserver::Add(this); + registrar_.Add(this, content::NOTIFICATION_LOAD_START, + content::NotificationService::AllSources()); + registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED, + content::NotificationService::AllSources()); + registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_HOST_HANG, + content::NotificationService::AllSources()); + registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED, + content::NotificationService::AllSources()); + #if defined(OS_ANDROID) auto* crash_manager = breakpad::CrashDumpManager::GetInstance(); DCHECK(crash_manager); @@ -44,26 +53,14 @@ } ChromeStabilityMetricsProvider::~ChromeStabilityMetricsProvider() { + registrar_.RemoveAll(); BrowserChildProcessObserver::Remove(this); } void ChromeStabilityMetricsProvider::OnRecordingEnabled() { - registrar_.Add(this, - content::NOTIFICATION_LOAD_START, - content::NotificationService::AllSources()); - registrar_.Add(this, - content::NOTIFICATION_RENDERER_PROCESS_CLOSED, - content::NotificationService::AllSources()); - registrar_.Add(this, - content::NOTIFICATION_RENDER_WIDGET_HOST_HANG, - content::NotificationService::AllSources()); - registrar_.Add(this, - content::NOTIFICATION_RENDERER_PROCESS_CREATED, - content::NotificationService::AllSources()); } void ChromeStabilityMetricsProvider::OnRecordingDisabled() { - registrar_.RemoveAll(); } void ChromeStabilityMetricsProvider::ProvideStabilityMetrics(
diff --git a/chrome/browser/metrics/process_memory_metrics_emitter.cc b/chrome/browser/metrics/process_memory_metrics_emitter.cc index f538c52..eebed9c 100644 --- a/chrome/browser/metrics/process_memory_metrics_emitter.cc +++ b/chrome/browser/metrics/process_memory_metrics_emitter.cc
@@ -29,36 +29,143 @@ #endif using memory_instrumentation::GlobalMemoryDump; +using ukm::builders::Memory_Experimental; namespace { -void AddCommonGpuMetricsToBuilder(ukm::builders::Memory_Experimental* builder, - const GlobalMemoryDump::ProcessDump& pmd) { - DCHECK(builder); - UMA_HISTOGRAM_MEMORY_LARGE_MB( - "Memory.Experimental.Gpu2.CommandBuffer", - pmd.chrome_dump().command_buffer_total_kb / 1024); - builder->SetCommandBuffer(pmd.chrome_dump().command_buffer_total_kb / 1024); +const char kEffectiveSize[] = "effective_size"; + +struct Metric { + const char* const dump_name; + const char* const ukm_name; + const char* const metric; + Memory_Experimental& (Memory_Experimental::*setter)(int64_t); +}; +const Metric kAllocatorDumpNamesForMetrics[] = { + {"blink_gc", "BlinkGC", kEffectiveSize, &Memory_Experimental::SetBlinkGC}, + {"blink_gc/allocated_objects", "BlinkGC.AllocatedObjects", kEffectiveSize, + &Memory_Experimental::SetBlinkGC_AllocatedObjects}, + {"blink_objects/Document", "NumberOfDocuments", + base::trace_event::MemoryAllocatorDump::kNameObjectCount, + &Memory_Experimental::SetNumberOfDocuments}, + {"blink_objects/Frame", "NumberOfFrames", + base::trace_event::MemoryAllocatorDump::kNameObjectCount, + &Memory_Experimental::SetNumberOfFrames}, + {"blink_objects/LayoutObject", "NumberOfLayoutObjects", + base::trace_event::MemoryAllocatorDump::kNameObjectCount, + &Memory_Experimental::SetNumberOfLayoutObjects}, + {"blink_objects/Node", "NumberOfNodes", + base::trace_event::MemoryAllocatorDump::kNameObjectCount, + &Memory_Experimental::SetNumberOfNodes}, + {"discardable", "Discardable", kEffectiveSize, + &Memory_Experimental::SetDiscardable}, + {"extensions/value_store", "Extensions.ValueStore", kEffectiveSize, + &Memory_Experimental::SetExtensions_ValueStore}, + {"gpu/gl", "CommandBuffer", kEffectiveSize, + &Memory_Experimental::SetCommandBuffer}, + {"history", "History", kEffectiveSize, &Memory_Experimental::SetHistory}, + {"java_heap", "JavaHeap", kEffectiveSize, + &Memory_Experimental::SetJavaHeap}, + {"leveldatabase", "LevelDatabase", kEffectiveSize, + &Memory_Experimental::SetLevelDatabase}, + {"malloc", "Malloc", kEffectiveSize, &Memory_Experimental::SetMalloc}, + {"mojo", "NumberOfMojoHandles", + base::trace_event::MemoryAllocatorDump::kNameObjectCount, + &Memory_Experimental::SetNumberOfMojoHandles}, + {"net", "Net", kEffectiveSize, &Memory_Experimental::SetNet}, + {"net/url_request_context", "Net.UrlRequestContext", kEffectiveSize, + &Memory_Experimental::SetNet_UrlRequestContext}, + {"partition_alloc", "PartitionAlloc", kEffectiveSize, + &Memory_Experimental::SetPartitionAlloc}, + {"partition_alloc/allocated_objects", "PartitionAlloc.AllocatedObjects", + kEffectiveSize, &Memory_Experimental::SetPartitionAlloc_AllocatedObjects}, + {"partition_alloc/partitions/array_buffer", + "PartitionAlloc.Partitions.ArrayBuffer", kEffectiveSize, + &Memory_Experimental::SetPartitionAlloc_Partitions_ArrayBuffer}, + {"partition_alloc/partitions/buffer", "PartitionAlloc.Partitions.Buffer", + kEffectiveSize, &Memory_Experimental::SetPartitionAlloc_Partitions_Buffer}, + {"partition_alloc/partitions/fast_malloc", + "PartitionAlloc.Partitions.FastMalloc", kEffectiveSize, + &Memory_Experimental::SetPartitionAlloc_Partitions_FastMalloc}, + {"partition_alloc/partitions/layout", "PartitionAlloc.Partitions.Layout", + kEffectiveSize, &Memory_Experimental::SetPartitionAlloc_Partitions_Layout}, + {"site_storage", "SiteStorage", kEffectiveSize, + &Memory_Experimental::SetSiteStorage}, + {"site_storage/index_db", "SiteStorage.IndexDB", kEffectiveSize, + &Memory_Experimental::SetSiteStorage_IndexDB}, + // TODO(ssid): This metric does not return total value. + {"site_storage/localstorage", "SiteStorage.LocalStorage", kEffectiveSize, + &Memory_Experimental::SetSiteStorage_LocalStorage}, + {"site_storage/session_storage", "SiteStorage.SessionStorage", + kEffectiveSize, &Memory_Experimental::SetSiteStorage_SessionStorage}, + {"skia", "Skia", kEffectiveSize, &Memory_Experimental::SetSkia}, + {"skia/sk_glyph_cache", "Skia.SkGlyphCache", kEffectiveSize, + &Memory_Experimental::SetSkia_SkGlyphCache}, + {"skia/sk_resource_cache", "Skia.SkResourceCache", kEffectiveSize, + &Memory_Experimental::SetSkia_SkResourceCache}, + {"sqlite", "Sqlite", kEffectiveSize, &Memory_Experimental::SetSqlite}, + {"sync", "Sync", kEffectiveSize, &Memory_Experimental::SetSync}, + {"tab_restore", "TabRestore", kEffectiveSize, + &Memory_Experimental::SetTabRestore}, + {"ui", "UI", kEffectiveSize, &Memory_Experimental::SetUI}, + {"v8", "V8", kEffectiveSize, &Memory_Experimental::SetV8}, + {"web_cache", "WebCache", kEffectiveSize, + &Memory_Experimental::SetWebCache}, + {"web_cache/Image_resources", "WebCache.ImageResources", kEffectiveSize, + &Memory_Experimental::SetWebCache_ImageResources}, + {"web_cache/CSS stylesheet_resources", "WebCache.CSSStylesheetResources", + kEffectiveSize, &Memory_Experimental::SetWebCache_CSSStylesheetResources}, + {"web_cache/Script_resources", "WebCache.ScriptResources", kEffectiveSize, + &Memory_Experimental::SetWebCache_ScriptResources}, + {"web_cache/XSL stylesheet_resources", "WebCache.XSLStylesheetResources", + kEffectiveSize, &Memory_Experimental::SetWebCache_XSLStylesheetResources}, + {"web_cache/Font_resources", "WebCache.FontResources", kEffectiveSize, + &Memory_Experimental::SetWebCache_FontResources}, + {"web_cache/Other_resources", "WebCache.OtherResources", kEffectiveSize, + &Memory_Experimental::SetWebCache_OtherResources}, +}; + +void EmitProcessUkm(const GlobalMemoryDump::ProcessDump& pmd, + const base::Optional<base::TimeDelta>& uptime, + Memory_Experimental* builder) { + for (const auto& item : kAllocatorDumpNamesForMetrics) { + base::Optional<uint64_t> value = pmd.GetMetric(item.dump_name, item.metric); + if (value) { + if (base::StringPiece(item.metric) == + base::trace_event::MemoryAllocatorDump::kNameObjectCount) { + ((*builder).*(item.setter))(value.value()); + } else { + ((*builder).*(item.setter))(value.value() / 1024 / 1024); + } + } + } + builder->SetResident(pmd.os_dump().resident_set_kb / 1024); + builder->SetPrivateMemoryFootprint(pmd.os_dump().private_footprint_kb / 1024); + builder->SetSharedMemoryFootprint(pmd.os_dump().shared_footprint_kb / 1024); +#if defined(OS_LINUX) || defined(OS_ANDROID) + builder->SetPrivateSwapFootprint(pmd.os_dump().private_footprint_swap_kb / + 1024); +#endif + if (uptime) + builder->SetUptime(uptime.value().InSeconds()); } void EmitBrowserMemoryMetrics(const GlobalMemoryDump::ProcessDump& pmd, ukm::SourceId ukm_source_id, ukm::UkmRecorder* ukm_recorder, const base::Optional<base::TimeDelta>& uptime) { - ukm::builders::Memory_Experimental builder(ukm_source_id); + Memory_Experimental builder(ukm_source_id); builder.SetProcessType(static_cast<int64_t>( memory_instrumentation::mojom::ProcessType::BROWSER)); + EmitProcessUkm(pmd, uptime, &builder); UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Experimental.Browser2.Resident", pmd.os_dump().resident_set_kb / 1024); - builder.SetResident(pmd.os_dump().resident_set_kb / 1024); #if !defined(OS_WIN) UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Experimental.Browser2.Malloc", pmd.chrome_dump().malloc_total_kb / 1024); - builder.SetMalloc(pmd.chrome_dump().malloc_total_kb / 1024); #endif - UMA_HISTOGRAM_MEMORY_LARGE_MB( "Memory.Experimental.Browser2.PrivateMemoryFootprint", pmd.os_dump().private_footprint_kb / 1024); @@ -69,22 +176,16 @@ #if defined(OS_LINUX) || defined(OS_ANDROID) UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Browser.PrivateSwapFootprint", pmd.os_dump().private_footprint_swap_kb / 1024); - builder.SetPrivateSwapFootprint(pmd.os_dump().private_footprint_swap_kb / - 1024); #endif - - builder.SetPrivateMemoryFootprint(pmd.os_dump().private_footprint_kb / 1024); - builder.SetSharedMemoryFootprint(pmd.os_dump().shared_footprint_kb / 1024); - // It is possible to run without a separate GPU process. // When that happens, we should log common GPU metrics from the browser proc. if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kInProcessGPU)) { - AddCommonGpuMetricsToBuilder(&builder, pmd); + UMA_HISTOGRAM_MEMORY_LARGE_MB( + "Memory.Experimental.Gpu2.CommandBuffer", + pmd.chrome_dump().command_buffer_total_kb / 1024); } - if (uptime) - builder.SetUptime(uptime.value().InSeconds()); builder.Record(ukm_recorder); } @@ -142,43 +243,11 @@ ukm::SourceId ukm_source_id = page_info.is_null() ? ukm::UkmRecorder::GetNewSourceID() : page_info->ukm_source_id; - ukm::builders::Memory_Experimental builder(ukm_source_id); + Memory_Experimental builder(ukm_source_id); builder.SetProcessType(static_cast<int64_t>( memory_instrumentation::mojom::ProcessType::RENDERER)); - builder.SetResident(pmd.os_dump().resident_set_kb / 1024); -#if !defined(OS_WIN) - builder.SetMalloc(pmd.chrome_dump().malloc_total_kb / 1024); -#endif - builder.SetPrivateMemoryFootprint(pmd.os_dump().private_footprint_kb / 1024); - builder.SetSharedMemoryFootprint(pmd.os_dump().shared_footprint_kb / 1024); - builder.SetPartitionAlloc(pmd.chrome_dump().partition_alloc_total_kb / 1024); - builder.SetBlinkGC(pmd.chrome_dump().blink_gc_total_kb / 1024); - builder.SetV8(pmd.chrome_dump().v8_total_kb / 1024); builder.SetNumberOfExtensions(number_of_extensions); -#if defined(OS_LINUX) || defined(OS_ANDROID) - builder.SetPrivateSwapFootprint(pmd.os_dump().private_footprint_swap_kb / - 1024); -#endif - base::Optional<uint64_t> number_of_documents = - pmd.GetMetric("blink_objects/Document", "object_count"); - if (number_of_documents.has_value()) - builder.SetNumberOfDocuments(number_of_documents.value()); - base::Optional<uint64_t> number_of_layout_objects = - pmd.GetMetric("blink_objects/LayoutObject", "object_count"); - if (number_of_layout_objects.has_value()) - builder.SetNumberOfLayoutObjects(number_of_layout_objects.value()); - base::Optional<uint64_t> number_of_nodes = - pmd.GetMetric("blink_objects/Node", "object_count"); - if (number_of_nodes.has_value()) - builder.SetNumberOfNodes(number_of_nodes.value()); - base::Optional<uint64_t> number_of_frames = - pmd.GetMetric("blink_objects/Frame", "object_count"); - if (number_of_frames.has_value()) - builder.SetNumberOfFrames(number_of_frames.value()); - base::Optional<uint64_t> array_buffer_size = - pmd.GetMetric("partition_alloc/partitions/array_buffer", "size"); - if (array_buffer_size.has_value()) - builder.SetArrayBuffer(array_buffer_size.value() / 1024 / 1024); + EmitProcessUkm(pmd, uptime, &builder); if (!page_info.is_null()) { builder.SetIsVisible(page_info->is_visible); @@ -188,9 +257,6 @@ page_info->time_since_last_navigation.InSeconds()); } - if (uptime) - builder.SetUptime(uptime.value().InSeconds()); - builder.Record(ukm_recorder); } @@ -198,22 +264,19 @@ ukm::SourceId ukm_source_id, ukm::UkmRecorder* ukm_recorder, const base::Optional<base::TimeDelta>& uptime) { - ukm::builders::Memory_Experimental builder(ukm_source_id); + Memory_Experimental builder(ukm_source_id); builder.SetProcessType( static_cast<int64_t>(memory_instrumentation::mojom::ProcessType::GPU)); + EmitProcessUkm(pmd, uptime, &builder); UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Experimental.Gpu2.Resident", pmd.os_dump().resident_set_kb / 1024); - builder.SetResident(pmd.os_dump().resident_set_kb / 1024); #if !defined(OS_WIN) UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Experimental.Gpu2.Malloc", pmd.chrome_dump().malloc_total_kb / 1024); - builder.SetMalloc(pmd.chrome_dump().malloc_total_kb / 1024); #endif - AddCommonGpuMetricsToBuilder(&builder, pmd); - UMA_HISTOGRAM_MEMORY_LARGE_MB( "Memory.Experimental.Gpu2.PrivateMemoryFootprint", pmd.os_dump().private_footprint_kb / 1024); @@ -224,13 +287,11 @@ #if defined(OS_LINUX) || defined(OS_ANDROID) UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Gpu.PrivateSwapFootprint", pmd.os_dump().private_footprint_swap_kb / 1024); - builder.SetPrivateSwapFootprint(pmd.os_dump().private_footprint_swap_kb / - 1024); #endif - builder.SetPrivateMemoryFootprint(pmd.os_dump().private_footprint_kb / 1024); - builder.SetSharedMemoryFootprint(pmd.os_dump().shared_footprint_kb / 1024); - if (uptime) - builder.SetUptime(uptime.value().InSeconds()); + UMA_HISTOGRAM_MEMORY_LARGE_MB( + "Memory.Experimental.Gpu2.CommandBuffer", + pmd.chrome_dump().command_buffer_total_kb / 1024); + builder.Record(ukm_recorder); } @@ -244,11 +305,11 @@ // The callback keeps this object alive until the callback is invoked. auto callback = base::Bind(&ProcessMemoryMetricsEmitter::ReceivedMemoryDump, this); + std::vector<std::string> mad_list; + for (const auto& metric : kAllocatorDumpNamesForMetrics) + mad_list.push_back(metric.dump_name); memory_instrumentation::MemoryInstrumentation::GetInstance() - ->RequestGlobalDump({"blink_objects/Document", "blink_objects/Frame", - "blink_objects/LayoutObject", "blink_objects/Node", - "partition_alloc/partitions/array_buffer"}, - callback); + ->RequestGlobalDump(mad_list, callback); // The callback keeps this object alive until the callback is invoked. if (IsResourceCoordinatorEnabled()) { @@ -409,7 +470,7 @@ UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Total.SharedMemoryFootprint", shared_footprint_total_kb / 1024); - ukm::builders::Memory_Experimental(ukm::UkmRecorder::GetNewSourceID()) + Memory_Experimental(ukm::UkmRecorder::GetNewSourceID()) .SetTotal2_PrivateMemoryFootprint(private_footprint_total_kb / 1024) .SetTotal2_SharedMemoryFootprint(shared_footprint_total_kb / 1024) .Record(GetUkmRecorder());
diff --git a/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc b/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc index 579344bc..b9ed457 100644 --- a/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc +++ b/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc
@@ -79,6 +79,22 @@ DISALLOW_COPY_AND_ASSIGN(ProcessMemoryMetricsEmitterFake); }; +void SetAllocatorDumpMetric(ProcessMemoryDumpPtr& pmd, + const std::string& dump_name, + const std::string& metric_name, + uint64_t value) { + auto it = pmd->chrome_dump->entries_for_allocator_dumps.find(dump_name); + if (it == pmd->chrome_dump->entries_for_allocator_dumps.end()) { + memory_instrumentation::mojom::AllocatorMemDumpPtr amd( + memory_instrumentation::mojom::AllocatorMemDump::New()); + amd->numeric_entries.insert(std::make_pair(metric_name, value)); + pmd->chrome_dump->entries_for_allocator_dumps.insert( + std::make_pair(dump_name, std::move(amd))); + } else { + it->second->numeric_entries.insert(std::make_pair(metric_name, value)); + } +} + OSMemDumpPtr GetFakeOSMemDump(uint32_t resident_set_kb, uint32_t private_footprint_kb, #if defined(OS_LINUX) || defined(OS_ANDROID) @@ -106,9 +122,8 @@ memory_instrumentation::mojom::ProcessMemoryDump::New()); pmd->process_type = ProcessType::BROWSER; pmd->chrome_dump = memory_instrumentation::mojom::ChromeMemDump::New(); -#if !defined(OS_WIN) - pmd->chrome_dump->malloc_total_kb = metrics_mb["Malloc"] * 1024; -#endif + SetAllocatorDumpMetric(pmd, "malloc", "effective_size", + metrics_mb["Malloc"] * 1024 * 1024); OSMemDumpPtr os_dump = GetFakeOSMemDump(metrics_mb["Resident"] * 1024, metrics_mb["PrivateMemoryFootprint"] * 1024, @@ -131,9 +146,7 @@ { {"ProcessType", static_cast<int64_t>(ProcessType::BROWSER)}, {"Resident", 10}, -#if !defined(OS_WIN) {"Malloc", 20}, -#endif {"PrivateMemoryFootprint", 30}, {"SharedMemoryFootprint", 35}, {"Uptime", 42}, #if defined(OS_LINUX) || defined(OS_ANDROID) @@ -143,22 +156,6 @@ base::KEEP_FIRST_OF_DUPES); } -void SetAllocatorDumpMetric(ProcessMemoryDumpPtr& pmd, - const std::string& dump_name, - const std::string& metric_name, - uint64_t value) { - auto it = pmd->chrome_dump->entries_for_allocator_dumps.find(dump_name); - if (it == pmd->chrome_dump->entries_for_allocator_dumps.end()) { - memory_instrumentation::mojom::AllocatorMemDumpPtr amd( - memory_instrumentation::mojom::AllocatorMemDump::New()); - amd->numeric_entries.insert(std::make_pair(metric_name, value)); - pmd->chrome_dump->entries_for_allocator_dumps.insert( - std::make_pair(dump_name, std::move(amd))); - } else { - it->second->numeric_entries.insert(std::make_pair(metric_name, value)); - } -} - void PopulateRendererMetrics( GlobalMemoryDumpPtr& global_dump, base::flat_map<const char*, int64_t>& metrics_mb_or_count, @@ -167,13 +164,14 @@ memory_instrumentation::mojom::ProcessMemoryDump::New()); pmd->process_type = ProcessType::RENDERER; pmd->chrome_dump = memory_instrumentation::mojom::ChromeMemDump::New(); -#if !defined(OS_WIN) - pmd->chrome_dump->malloc_total_kb = metrics_mb_or_count["Malloc"] * 1024; -#endif - pmd->chrome_dump->partition_alloc_total_kb = - metrics_mb_or_count["PartitionAlloc"] * 1024; - pmd->chrome_dump->blink_gc_total_kb = metrics_mb_or_count["BlinkGC"] * 1024; - pmd->chrome_dump->v8_total_kb = metrics_mb_or_count["V8"] * 1024; + SetAllocatorDumpMetric(pmd, "malloc", "effective_size", + metrics_mb_or_count["Malloc"] * 1024 * 1024); + SetAllocatorDumpMetric(pmd, "partition_alloc", "effective_size", + metrics_mb_or_count["PartitionAlloc"] * 1024 * 1024); + SetAllocatorDumpMetric(pmd, "blink_gc", "effective_size", + metrics_mb_or_count["BlinkGC"] * 1024 * 1024); + SetAllocatorDumpMetric(pmd, "v8", "effective_size", + metrics_mb_or_count["V8"] * 1024 * 1024); SetAllocatorDumpMetric(pmd, "blink_objects/Document", "object_count", metrics_mb_or_count["NumberOfDocuments"]); @@ -183,8 +181,10 @@ metrics_mb_or_count["NumberOfLayoutObjects"]); SetAllocatorDumpMetric(pmd, "blink_objects/Node", "object_count", metrics_mb_or_count["NumberOfNodes"]); - SetAllocatorDumpMetric(pmd, "partition_alloc/partitions/array_buffer", "size", - metrics_mb_or_count["ArrayBuffer"] * 1024 * 1024); + SetAllocatorDumpMetric( + pmd, "partition_alloc/partitions/array_buffer", "effective_size", + metrics_mb_or_count["PartitionAlloc.Partitions.ArrayBuffer"] * 1024 * + 1024); OSMemDumpPtr os_dump = GetFakeOSMemDump( metrics_mb_or_count["Resident"] * 1024, @@ -208,19 +208,16 @@ return base::flat_map<const char*, int64_t>( { {"ProcessType", static_cast<int64_t>(ProcessType::RENDERER)}, - {"Resident", 110}, -#if !defined(OS_WIN) - {"Malloc", 120}, -#endif - {"PrivateMemoryFootprint", 130}, {"SharedMemoryFootprint", 135}, - {"PartitionAlloc", 140}, {"BlinkGC", 150}, {"V8", 160}, - {"NumberOfExtensions", 0}, {"Uptime", 42}, + {"Resident", 110}, {"Malloc", 120}, {"PrivateMemoryFootprint", 130}, + {"SharedMemoryFootprint", 135}, {"PartitionAlloc", 140}, + {"BlinkGC", 150}, {"V8", 160}, {"NumberOfExtensions", 0}, + {"Uptime", 42}, #if defined(OS_LINUX) || defined(OS_ANDROID) {"PrivateSwapFootprint", 50}, #endif {"NumberOfDocuments", 1}, {"NumberOfFrames", 2}, {"NumberOfLayoutObjects", 5}, {"NumberOfNodes", 3}, - {"ArrayBuffer", 10}, + {"PartitionAlloc.Partitions.ArrayBuffer", 10}, }, base::KEEP_FIRST_OF_DUPES); } @@ -237,11 +234,10 @@ memory_instrumentation::mojom::ProcessMemoryDump::New()); pmd->process_type = ProcessType::GPU; pmd->chrome_dump = memory_instrumentation::mojom::ChromeMemDump::New(); -#if !defined(OS_WIN) - pmd->chrome_dump->malloc_total_kb = metrics_mb["Malloc"] * 1024; -#endif - pmd->chrome_dump->command_buffer_total_kb = - metrics_mb["CommandBuffer"] * 1024; + SetAllocatorDumpMetric(pmd, "malloc", "effective_size", + metrics_mb["Malloc"] * 1024 * 1024); + SetAllocatorDumpMetric(pmd, "gpu/gl", "effective_size", + metrics_mb["CommandBuffer"] * 1024 * 1024); OSMemDumpPtr os_dump = GetFakeOSMemDump(metrics_mb["Resident"] * 1024, metrics_mb["PrivateMemoryFootprint"] * 1024, @@ -264,9 +260,7 @@ { {"ProcessType", static_cast<int64_t>(ProcessType::GPU)}, {"Resident", 210}, -#if !defined(OS_WIN) {"Malloc", 220}, -#endif {"PrivateMemoryFootprint", 230}, {"SharedMemoryFootprint", 235}, {"CommandBuffer", 240}, {"Uptime", 42}, #if defined(OS_LINUX) || defined(OS_ANDROID)
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc index ac4b1c0..6e83718 100644 --- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc +++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -774,6 +774,12 @@ prefs::kRelaunchNotificationPeriod, base::Value::Type::INTEGER }, #endif // !defined(OS_ANDROID) + +#if !defined(OS_ANDROID) + { key::kAutoplayAllowed, + prefs::kAutoplayAllowed, + base::Value::Type::BOOLEAN }, +#endif // !defined(OS_ANDROID) }; // clang-format on
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index 7f08268df..b3e7cf7 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc
@@ -158,6 +158,7 @@ #include "content/public/common/content_switches.h" #include "content/public/common/result_codes.h" #include "content/public/common/url_constants.h" +#include "content/public/common/web_preferences.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/download_test_observer.h" #include "content/public/test/mock_notification_observer.h" @@ -5044,4 +5045,31 @@ #endif // defined(OS_CHROMEOS) +#if !defined(OS_ANDROID) + +IN_PROC_BROWSER_TEST_F(PolicyTest, AutoplayAllowedByPolicy) { + ASSERT_TRUE(embedded_test_server()->Start()); + content::WebContents* web_contents = + browser()->tab_strip_model()->GetActiveWebContents(); + + // Check that autoplay was not allowed. + EXPECT_EQ( + web_contents->GetRenderViewHost()->GetWebkitPreferences().autoplay_policy, + content::AutoplayPolicy::kDocumentUserActivationRequired); + + // Update policy to allow autoplay. + PolicyMap policies; + SetPolicy(&policies, key::kAutoplayAllowed, + std::make_unique<base::Value>(true)); + UpdateProviderPolicy(policies); + + // Check that autoplay was allowed by policy. + web_contents->GetRenderViewHost()->OnWebkitPreferencesChanged(); + EXPECT_EQ( + web_contents->GetRenderViewHost()->GetWebkitPreferences().autoplay_policy, + content::AutoplayPolicy::kNoUserGestureRequired); +} + +#endif // !defined(OS_ANDROID) + } // namespace policy
diff --git a/chrome/browser/resources/chromeos/login/sync_consent.css b/chrome/browser/resources/chromeos/login/sync_consent.css index 376a1ac..4e75d28 100644 --- a/chrome/browser/resources/chromeos/login/sync_consent.css +++ b/chrome/browser/resources/chromeos/login/sync_consent.css
@@ -40,17 +40,6 @@ padding: 0 6px; /* = 8px - 2px button border */ } -/************* Settings Section **************/ -#syncConsentSettingsDialog oobe-a11y-option { - border-top: var(--sync-consent-dialog-list-item-border); - min-height: 56px; +#acceptAndContinue { + -webkit-padding-end: 18px; } - -#syncConsentSettingsDialog oobe-a11y-option:last-of-type { - border-bottom: var(--sync-consent-dialog-list-item-border); -} - -#syncConsentSettingsDialog .bottom-buttons { - padding: 0 24px; -} -
diff --git a/chrome/browser/resources/chromeos/login/sync_consent.html b/chrome/browser/resources/chromeos/login/sync_consent.html index 0c64eb5..6d22811 100644 --- a/chrome/browser/resources/chromeos/login/sync_consent.html +++ b/chrome/browser/resources/chromeos/login/sync_consent.html
@@ -41,8 +41,7 @@ <link rel="stylesheet" href="oobe_dialog_parameters.css"> <link rel="stylesheet" href="oobe_flex_layout.css"> <oobe-dialog id="syncConsentOverviewDialog" role="dialog" has-buttons - aria-label$="[[i18nDynamic(locale, 'syncConsentScreenTitle')]]" - hidden="[[isSectionHidden_(activeSection_,'overview')]]"> + aria-label$="[[i18nDynamic(locale, 'syncConsentScreenTitle')]]"> <hd-iron-icon class="oobe-icon" icon1x="sync-consent-32:googleg" icon2x="sync-consent-64:googleg"> </hd-iron-icon> @@ -81,59 +80,18 @@ </div> </div> </div> - <div id="settingsLink" class="sync-status-line" - locale-monitor="[[updateSettingsLink_(locale)]]"> - </div> - </div> - <div class="bottom-buttons layout horizontal end-justified"> - <oobe-next-button on-tap="onSettingsSaveAndContinue_" - disabled="[[!userPrefsKnown_]]" class="focus-on-show"> - </oobe-next-button> - </div> - </oobe-dialog> - <oobe-dialog id="syncConsentSettingsDialog" role="dialog" has-buttons - aria-label$="[[i18nDynamic(locale, 'syncConsentSettingsDialogTitle')]]" - hidden="[[isSectionHidden_(activeSection_,'settings')]]"> - <hd-iron-icon class="oobe-icon" - icon1x="sync-consent-32:googleg" icon2x="sync-consent-64:googleg"> - </hd-iron-icon> - <div class="header"> - <h1 class="title"> - [[i18nDynamic(locale, 'syncConsentSettingsDialogTitle')]] - </h1> - <div class="subtitle"> - [[i18nDynamic(locale, 'syncConsentSettingsDialogSubTitle')]] - </div> - </div> - <div class="footer layout vertical"> - <oobe-a11y-option checked="[[syncAllEnabled_]]" - on-change="onSyncAllEnabledChanged_" - label-for-aria="[[i18nDynamic(locale, 'syncConsentSyncAllOptionTitle')]]" - disabled="[[isManaged_]]" - class="focus-on-show"> - <span class="title"> - [[i18nDynamic(locale, 'syncConsentSyncAllOptionTitle')]] - </span> - <span class="checked-value"> - [[i18nDynamic(locale, 'syncConsentSyncAllOptionOn')]] - </span> - <span class="unchecked-value"> - [[i18nDynamic(locale, 'syncConsentSyncAllOptionOff')]] - </span> - </oobe-a11y-option> - <div class="sync-status-line" hidden="[[!syncAllEnabled_]]"> - [[i18nDynamic(locale, 'syncConsentSettingsStatusSyncAllOn')]] - </div> - <div class="sync-status-line" hidden="[[syncAllEnabled_]]"> - [[i18nDynamic(locale, 'syncConsentSettingsStatusSyncAllOff')]] - </div> - </div> - <div class="bottom-buttons layout horizontal end-justified"> - <oobe-text-button inverse on-tap="onSettingsSaveAndContinue_" - disabled="[[!userPrefsKnown_]]"> - <div> - [[i18nDynamic(locale, 'syncConsentSettingsSaveAndContinue')]] + <div id="reviewSettings" class="layout horizontal"> + <paper-checkbox id="reviewSettingsBox"> + </paper-checkbox> + <div id="reviewSettingsLabelContainer"> + [[i18nDynamic(locale, 'syncConsentReviewSyncOptionsText')]] </div> + </div> + </div> + <div class="bottom-buttons layout horizontal end-justified"> + <oobe-text-button id="acceptAndContinue" + on-tap="onSettingsSaveAndContinue_" class="focus-on-show" inverse> + [[i18nDynamic(locale, 'syncConsentAcceptAndContinue')]] </oobe-text-button> </div> </oobe-dialog>
diff --git a/chrome/browser/resources/chromeos/login/sync_consent.js b/chrome/browser/resources/chromeos/login/sync_consent.js index 73d36e9..27fb94b4 100644 --- a/chrome/browser/resources/chromeos/login/sync_consent.js +++ b/chrome/browser/resources/chromeos/login/sync_consent.js
@@ -12,103 +12,20 @@ behaviors: [I18nBehavior], - properties: { - /** - * Value of "Sync all" trigger button. - */ - syncAllEnabled_: { - type: Boolean, - value: true, - }, - - /** - * False until user sync prefs are known. - */ - userPrefsKnown_: { - type: Boolean, - value: false, - }, - - /** - * True when sync preferences are managed. - */ - isManaged_: { - type: Boolean, - value: true, - }, - - /** - * Name of currently active section. - */ - activeSection_: { - type: String, - value: 'overview', - } - }, - focus: function() { - if (this.activeSection_ == 'overview') { - this.$.syncConsentOverviewDialog.show(); - } else { - this.$.syncConsentSettingsDialog.show(); - } - }, - - isSectionHidden_: function(activeSectionName, thisSectionName) { - return activeSectionName != thisSectionName; + this.$.syncConsentOverviewDialog.focus(); }, /** - * This updates link to 'Settings' section on locale change. - * @param {string} locale The UI language used. - * @private - */ - updateSettingsLink_: function(locale) { - this.$.settingsLink.innerHTML = loadTimeData.getStringF( - 'syncConsentScreenSettingsLink', '<a id="settingsLinkAnchor" href="#">', - '</a>'); - this.$$('#settingsLinkAnchor') - .addEventListener('click', this.switchToSettingsDialog_.bind(this)); - }, - - /** - * This is called when "Settings" link is clicked. - * @private - */ - switchToSettingsDialog_: function() { - this.activeSection_ = 'settings'; - this.focus(); - }, - - /** - * This is called when "Sync all" trigger value is changed. - * @param {!Event} event - * @private - */ - onSyncAllEnabledChanged_: function(event) { - if (this.syncAllEnabled_ == event.currentTarget.checked) - return; - - this.syncAllEnabled_ = event.currentTarget.checked; - chrome.send('syncEverythingChanged', [this.syncAllEnabled_]); - }, - - /** - * This is 'on-tap' event handler for 'AcceptAndContinue/Next' buttons. + * This is 'on-tap' event handler for 'AcceptAndContinue' button. * @private */ onSettingsSaveAndContinue_: function() { - chrome.send('login.SyncConsentScreen.userActed', ['save-and-continue']); - }, - - /** - * Modify UI state to match given user preferences. - * @param {boolean} sync_all_enabled Whether "sync everything" is enabled. - * @param {boolean} is_managed Whether sync preferences are managed. - */ - onUserSyncPrefsKnown: function(sync_all_enabled, is_managed) { - this.isManaged_ = is_managed; - this.syncAllEnabled_ = sync_all_enabled; - this.userPrefsKnown_ = true; + if (this.$.reviewSettingsBox.checked) { + chrome.send('login.SyncConsentScreen.userActed', ['continue-and-review']); + } else { + chrome.send( + 'login.SyncConsentScreen.userActed', ['continue-with-defaults']); + } }, });
diff --git a/chrome/browser/resources/chromeos/zip_archiver/js/app.js b/chrome/browser/resources/chromeos/zip_archiver/js/app.js index da76925..5a61778 100644 --- a/chrome/browser/resources/chromeos/zip_archiver/js/app.js +++ b/chrome/browser/resources/chromeos/zip_archiver/js/app.js
@@ -570,41 +570,56 @@ */ unmountVolume: function(fileSystemId, opt_forceUnmount) { return new Promise(function(fulfill, reject) { - var volume = unpacker.app.volumes[fileSystemId]; - console.assert( - volume || opt_forceUnmount, - 'Unmount that is not forced must not be called for ', - 'volumes that are not restored.'); + chrome.fileManagerPrivate.markCacheAsMounted( + fileSystemId, false /* isMounted */, function() { + if (chrome.runtime.lastError) { + console.error( + 'Unmount error: ' + chrome.runtime.lastError.message + + '.'); + reject('FAILED'); + return; + } + fulfill(); + }); + }) + .then(function() { + return new Promise(function(fulfill, reject) { + var volume = unpacker.app.volumes[fileSystemId]; + console.assert( + volume || opt_forceUnmount, + 'Unmount that is not forced must not be called for ', + 'volumes that are not restored.'); - if (!opt_forceUnmount && volume.inUse()) { - reject('IN_USE'); - return; - } + if (!opt_forceUnmount && volume.inUse()) { + reject('IN_USE'); + return; + } - var options = {fileSystemId: fileSystemId}; - chrome.fileSystemProvider.unmount(options, function() { - if (chrome.runtime.lastError) { - console.error( - 'Unmount error: ' + chrome.runtime.lastError.message + '.'); - reject('FAILED'); - return; - } + var options = {fileSystemId: fileSystemId}; + chrome.fileSystemProvider.unmount(options, function() { + if (chrome.runtime.lastError) { + console.error( + 'Unmount error: ' + chrome.runtime.lastError.message + '.'); + reject('FAILED'); + return; + } - // In case of forced unmount volume can be undefined due to not being - // restored. An unmount that is not forced will be called only after - // restoring state. In the case of forced unmount when volume is not - // restored, we will not do a normal cleanup, but just remove the load - // volume promise to allow further mounts. - if (opt_forceUnmount) - delete unpacker.app.volumeLoadedPromises[fileSystemId]; - else - unpacker.app.cleanupVolume(fileSystemId); + // In case of forced unmount volume can be undefined due to not + // being restored. An unmount that is not forced will be called + // only after restoring state. In the case of forced unmount when + // volume is not restored, we will not do a normal cleanup, but + // just remove the load volume promise to allow further mounts. + if (opt_forceUnmount) + delete unpacker.app.volumeLoadedPromises[fileSystemId]; + else + unpacker.app.cleanupVolume(fileSystemId); - // Remove volume from local storage. - unpacker.app.removeState_(fileSystemId); - fulfill(); - }); - }); + // Remove volume from local storage. + unpacker.app.removeState_(fileSystemId); + fulfill(); + }); + }); + }); }, /** @@ -867,7 +882,8 @@ launchData.items.forEach(function(item) { unpacker.app.mountProcessCounter++; chrome.fileSystem.getDisplayPath( - item.entry, function(entry, fileSystemId) { + item.entry, function(entry, displayPath) { + const fileSystemId = displayPath; // If loading takes significant amount of time, then show a // notification about scanning in progress. var deferredNotificationTimer = setTimeout(function() { @@ -941,6 +957,18 @@ loadPromise .then(function() { unpacker.app.volumeLoadFinished[fileSystemId] = true; + return new Promise(function(fulfill, reject) { + chrome.fileManagerPrivate.markCacheAsMounted( + displayPath, true /* isMounted */, function() { + if (chrome.runtime.lastError) { + reject(chrome.runtime.lastError); + return; + } + fulfill(); + }); + }); + }) + .then(function() { // Mount the volume and save its information in local // storage in order to be able to recover the metadata // in case of restarts, system crashes, etc.
diff --git a/chrome/browser/resources/print_preview/previewarea/preview_area.css b/chrome/browser/resources/print_preview/previewarea/preview_area.css index a6ce9ed..fd272fa1 100644 --- a/chrome/browser/resources/print_preview/previewarea/preview_area.css +++ b/chrome/browser/resources/print_preview/previewarea/preview_area.css
@@ -80,7 +80,6 @@ } #preview-area .learn-more-link { - -webkit-margin-start: 0.5em; color: rgb(51, 103, 214); }
diff --git a/chrome/browser/resources/print_preview/settings/destination_settings.js b/chrome/browser/resources/print_preview/settings/destination_settings.js index f806180..04b0362 100644 --- a/chrome/browser/resources/print_preview/settings/destination_settings.js +++ b/chrome/browser/resources/print_preview/settings/destination_settings.js
@@ -139,15 +139,23 @@ locationEl.textContent = hint; locationEl.title = hint; - const connectionStatusText = destination.connectionStatusText; + const showDestinationInvalid = + (destination.hasInvalidCertificate && + !loadTimeData.getBoolean('isEnterpriseManaged')); + let connectionStatusText = ''; + if (showDestinationInvalid) { + connectionStatusText = + loadTimeData.getString('noLongerSupportedFragment'); + } else { + connectionStatusText = destination.connectionStatusText; + } const connectionStatusEl = this.getChildElement('.destination-settings-connection-status'); connectionStatusEl.textContent = connectionStatusText; connectionStatusEl.title = connectionStatusText; - const hasConnectionError = destination.isOffline || - (destination.hasInvalidCertificate && - !loadTimeData.getBoolean('isEnterpriseManaged')); + const hasConnectionError = + destination.isOffline || showDestinationInvalid; destinationSettingsBoxEl.classList.toggle( print_preview.DestinationSettingsClasses_.STALE, hasConnectionError);
diff --git a/chrome/browser/ssl/ssl_browsertest.cc b/chrome/browser/ssl/ssl_browsertest.cc index ae53f39..b074e90 100644 --- a/chrome/browser/ssl/ssl_browsertest.cc +++ b/chrome/browser/ssl/ssl_browsertest.cc
@@ -7017,6 +7017,34 @@ base::MatchPattern(console_observer.message(), "*has been distrusted*")); } +// Tests that the Symantec console message is logged for iframe resources with +// certs that have already been distrusted. +IN_PROC_BROWSER_TEST_F(SymantecMessageSSLUITest, DistrustedIframeResource) { + content::SetupCrossSiteRedirector(https_server()); + // Only distrust subresources on *.test, so that the main resource loads + // without an interstitial. + ASSERT_NO_FATAL_FAILURE( + SetUpCertVerifier("*.test", true /* already_distrusted */)); + ASSERT_TRUE(https_server()->Start()); + GURL url(https_server()->GetURL("/ssl/blank_page.html")); + WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); + ui_test_utils::NavigateToURL(browser(), url); + ASSERT_FALSE(IsShowingInterstitial(tab)); + + content::ConsoleObserverDelegate console_observer(tab, "*https://a.test*"); + tab->SetDelegate(&console_observer); + ASSERT_TRUE( + content::ExecuteScript(tab, + "var i = document.createElement('iframe');" + "i.src = '" + + https_server()->GetURL("a.test", "/").spec() + + "';" + "document.body.appendChild(i);")); + console_observer.Wait(); + EXPECT_TRUE( + base::MatchPattern(console_observer.message(), "*has been distrusted*")); +} + // Checks that SimpleURLLoader, which uses services/network/url_loader.cc, goes // through the new NetworkServiceClient interface to deliver cert error // notifications to the browser which then overrides the certificate error.
diff --git a/chrome/browser/thumbnails/thumbnail_browsertest.cc b/chrome/browser/thumbnails/thumbnail_browsertest.cc index bd170dc..41222b8 100644 --- a/chrome/browser/thumbnails/thumbnail_browsertest.cc +++ b/chrome/browser/thumbnails/thumbnail_browsertest.cc
@@ -10,7 +10,6 @@ #include "base/memory/scoped_refptr.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" -#include "base/test/scoped_feature_list.h" #include "build/build_config.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/thumbnails/thumbnail_service.h" @@ -18,8 +17,6 @@ #include "chrome/browser/thumbnails/thumbnailing_context.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" -#include "chrome/common/chrome_features.h" -#include "chrome/common/chrome_switches.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" @@ -173,9 +170,6 @@ } void SetUpInProcessBrowserTestFixture() override { - feature_list_.InitAndEnableFeature( - features::kCaptureThumbnailOnNavigatingAway); - will_create_browser_context_services_subscription_ = BrowserContextDependencyManager::GetInstance() ->RegisterWillCreateBrowserContextServicesCallbackForTesting( @@ -194,8 +188,6 @@ context, &ThumbnailTest::CreateThumbnailService); } - base::test::ScopedFeatureList feature_list_; - std::unique_ptr< base::CallbackList<void(content::BrowserContext*)>::Subscription> will_create_browser_context_services_subscription_;
diff --git a/chrome/browser/thumbnails/thumbnail_service_impl.cc b/chrome/browser/thumbnails/thumbnail_service_impl.cc index 2ca6786..c4807d3 100644 --- a/chrome/browser/thumbnails/thumbnail_service_impl.cc +++ b/chrome/browser/thumbnails/thumbnail_service_impl.cc
@@ -83,19 +83,15 @@ if (local_ptr->IsNonForcedFull()) return false; - if (base::FeatureList::IsEnabled( - features::kCaptureThumbnailDependingOnTransitionType)) { - // Skip if the transition type is not interesting: - // Only new segments (roughly "initial navigations", e.g. not clicks on a - // link) can end up in TopSites (see HistoryBackend::UpdateSegments). - // Note that for pages that are already in TopSites, we don't care about - // the transition type, since for those we know we'll need the thumbnail. - if (!ui::PageTransitionCoreTypeIs(transition, - ui::PAGE_TRANSITION_TYPED) && - !ui::PageTransitionCoreTypeIs(transition, - ui::PAGE_TRANSITION_AUTO_BOOKMARK)) { - return false; - } + // Skip if the transition type is not interesting: + // Only new segments (roughly "initial navigations", e.g. not clicks on a + // link) can end up in TopSites (see HistoryBackend::UpdateSegments). + // Note that for pages that are already in TopSites, we don't care about + // the transition type, since for those we know we'll need the thumbnail. + if (!ui::PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_TYPED) && + !ui::PageTransitionCoreTypeIs(transition, + ui::PAGE_TRANSITION_AUTO_BOOKMARK)) { + return false; } }
diff --git a/chrome/browser/thumbnails/thumbnail_service_unittest.cc b/chrome/browser/thumbnails/thumbnail_service_unittest.cc index 2e39bc9..f1b2289f 100644 --- a/chrome/browser/thumbnails/thumbnail_service_unittest.cc +++ b/chrome/browser/thumbnails/thumbnail_service_unittest.cc
@@ -9,10 +9,8 @@ #include "base/bind.h" #include "base/macros.h" #include "base/memory/ref_counted.h" -#include "base/test/scoped_feature_list.h" #include "chrome/browser/history/history_utils.h" #include "chrome/browser/history/top_sites_factory.h" -#include "chrome/common/chrome_features.h" #include "chrome/test/base/testing_profile.h" #include "components/history/core/browser/default_top_sites_provider.h" #include "components/history/core/browser/top_sites_impl.h" @@ -165,10 +163,6 @@ TEST_F(ThumbnailServiceTest, ShouldAcquireTempThumbnailDependingOnTransitionType) { - base::test::ScopedFeatureList features; - features.InitAndEnableFeature( - features::kCaptureThumbnailDependingOnTransitionType); - const GURL kUnknownURL("http://www.google.com/"); const ui::PageTransition interesting_transition = ui::PAGE_TRANSITION_TYPED; const ui::PageTransition uninteresting_transition = ui::PAGE_TRANSITION_LINK;
diff --git a/chrome/browser/thumbnails/thumbnail_tab_helper.cc b/chrome/browser/thumbnails/thumbnail_tab_helper.cc index a574b3a..6ffe7d7 100644 --- a/chrome/browser/thumbnails/thumbnail_tab_helper.cc +++ b/chrome/browser/thumbnails/thumbnail_tab_helper.cc
@@ -59,16 +59,13 @@ // StartThumbnailCaptureIfNecessary(), which updates the thumbnail for the // current tab if needed. The heuristics to judge whether to update the // thumbnail are implemented in ThumbnailService::ShouldAcquirePageThumbnail(). -// There are several triggers that can start the process: +// There are two triggers that can start the process: // - When a renderer is about to be hidden (this usually occurs when the current // tab is closed or another tab is clicked). -// - If features::kCaptureThumbnailOnNavigatingAway is enabled: Just before -// navigating away from the current page. +// - Just before navigating away from the current page. ThumbnailTabHelper::ThumbnailTabHelper(content::WebContents* contents) : content::WebContentsObserver(contents), - capture_on_navigating_away_(base::FeatureList::IsEnabled( - features::kCaptureThumbnailOnNavigatingAway)), did_navigation_finish_(false), has_received_document_since_navigation_finished_(false), has_painted_since_document_received_(false), @@ -118,12 +115,10 @@ return; } - if (capture_on_navigating_away_) { - // At this point, the new navigation has just been started, but the - // WebContents still shows the previous page. Grab a thumbnail before it - // goes away. - StartThumbnailCaptureIfNecessary(TriggerReason::NAVIGATING_AWAY); - } + // At this point, the new navigation has just been started, but the + // WebContents still shows the previous page. Grab a thumbnail before it + // goes away. + StartThumbnailCaptureIfNecessary(TriggerReason::NAVIGATING_AWAY); // Now reset navigation-related state. It's important that this happens after // calling StartThumbnailCaptureIfNecessary.
diff --git a/chrome/browser/thumbnails/thumbnail_tab_helper.h b/chrome/browser/thumbnails/thumbnail_tab_helper.h index 4e2f4f31..f9fb8fd 100644 --- a/chrome/browser/thumbnails/thumbnail_tab_helper.h +++ b/chrome/browser/thumbnails/thumbnail_tab_helper.h
@@ -101,8 +101,6 @@ static void LogThumbnailingOutcome(TriggerReason trigger, Outcome outcome); - const bool capture_on_navigating_away_; - content::NotificationRegistrar registrar_; bool did_navigation_finish_;
diff --git a/chrome/browser/ui/app_list/arc/arc_app_utils.cc b/chrome/browser/ui/app_list/arc/arc_app_utils.cc index a0b705d..83fc86f 100644 --- a/chrome/browser/ui/app_list/arc/arc_app_utils.cc +++ b/chrome/browser/ui/app_list/arc/arc_app_utils.cc
@@ -394,15 +394,16 @@ bool IsArcItem(content::BrowserContext* context, const std::string& id) { DCHECK(context); - // Some unit tests use empty id. - if (id.empty()) + // Some unit tests use empty ids, some app ids are not valid ARC app ids. + const ArcAppShelfId arc_app_shelf_id = ArcAppShelfId::FromString(id); + if (!arc_app_shelf_id.valid()) return false; const ArcAppListPrefs* const arc_prefs = ArcAppListPrefs::Get(context); if (!arc_prefs) return false; - return arc_prefs->IsRegistered(ArcAppShelfId::FromString(id).app_id()); + return arc_prefs->IsRegistered(arc_app_shelf_id.app_id()); } std::string GetLaunchIntent(const std::string& package_name,
diff --git a/chrome/browser/ui/app_list/arc/arc_app_utils_unittest.cc b/chrome/browser/ui/app_list/arc/arc_app_utils_unittest.cc index f21394e0..83664074 100644 --- a/chrome/browser/ui/app_list/arc/arc_app_utils_unittest.cc +++ b/chrome/browser/ui/app_list/arc/arc_app_utils_unittest.cc
@@ -5,6 +5,8 @@ #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" #include "chrome/browser/ui/ash/launcher/arc_app_shelf_id.h" +#include "chrome/test/base/testing_profile.h" +#include "content/public/test/test_browser_thread_bundle.h" #include "testing/gtest/include/gtest/gtest.h" namespace { @@ -24,14 +26,7 @@ } // namespace -class ArcAppUtilsTest : public testing::Test { - public: - ArcAppUtilsTest() = default; - ~ArcAppUtilsTest() override = default; - - private: - DISALLOW_COPY_AND_ASSIGN(ArcAppUtilsTest); -}; +using ArcAppUtilsTest = testing::Test; TEST_F(ArcAppUtilsTest, LaunchIntent) { const std::string launch_intent = GetPlayStoreInitialLaunchIntent(); @@ -78,3 +73,12 @@ EXPECT_FALSE(shelf_id2.has_shelf_group_id()); EXPECT_EQ(shelf_id2.app_id(), arc::kPlayStoreAppId); } + +// Tests that IsArcItem does not crash or DCHECK with invalid crx file ids. +TEST_F(ArcAppUtilsTest, IsArcItemDoesNotCrashWithInvalidCrxFileIds) { + // TestingProfile checks CurrentlyOn(cotnent::BrowserThread::UI). + content::TestBrowserThreadBundle thread_bundle; + TestingProfile testing_profile; + EXPECT_FALSE(arc::IsArcItem(&testing_profile, std::string())); + EXPECT_FALSE(arc::IsArcItem(&testing_profile, "ShelfWindowWatcher0")); +}
diff --git a/chrome/browser/ui/ash/ash_shell_init.cc b/chrome/browser/ui/ash/ash_shell_init.cc index 4f37433..d5cbfff 100644 --- a/chrome/browser/ui/ash/ash_shell_init.cc +++ b/chrome/browser/ui/ash/ash_shell_init.cc
@@ -63,13 +63,11 @@ // When Ash runs in the same services as chrome content creates the // DiscardableSharedMemoryManager. const bool create_discardable_memory = false; - std::unique_ptr<aura::WindowTreeClient> window_tree_client = - std::make_unique<aura::WindowTreeClient>( - connector, window_manager.get(), window_manager.get(), nullptr, - nullptr, create_discardable_memory); const bool automatically_create_display_roots = false; - window_tree_client->ConnectAsWindowManager( - automatically_create_display_roots); + std::unique_ptr<aura::WindowTreeClient> window_tree_client = + aura::WindowTreeClient::CreateForWindowManager( + connector, window_manager.get(), window_manager.get(), + automatically_create_display_roots, create_discardable_memory); aura::Env::GetInstance()->SetWindowTreeClient(window_tree_client.get()); window_manager->Init(std::move(window_tree_client), std::make_unique<ChromeShellDelegate>());
diff --git a/chrome/browser/ui/ash/launcher/arc_app_shelf_id.cc b/chrome/browser/ui/ash/launcher/arc_app_shelf_id.cc index 98ef84f..32382ab 100644 --- a/chrome/browser/ui/ash/launcher/arc_app_shelf_id.cc +++ b/chrome/browser/ui/ash/launcher/arc_app_shelf_id.cc
@@ -21,6 +21,8 @@ } // namespace +ArcAppShelfId::ArcAppShelfId() = default; + ArcAppShelfId::ArcAppShelfId(const std::string& shelf_group_id, const std::string& app_id) : shelf_group_id_(shelf_group_id), app_id_(app_id) { @@ -33,14 +35,15 @@ // static ArcAppShelfId ArcAppShelfId::FromString(const std::string& id) { - if (!base::StartsWith(id, kShelfGroupPrefix, base::CompareCase::SENSITIVE)) + if (base::StartsWith(id, kShelfGroupPrefix, base::CompareCase::SENSITIVE)) { + const std::vector<std::string> parts = base::SplitString( + id, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); + if (parts.size() == 3u && crx_file::id_util::IdIsValid(parts[2])) + return ArcAppShelfId(parts[1], parts[2]); + } else if (crx_file::id_util::IdIsValid(id)) { return ArcAppShelfId(std::string(), id); - - const std::vector<std::string> parts = base::SplitString( - id, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); - DCHECK_EQ(3u, parts.size()); - - return ArcAppShelfId(parts[1], parts[2]); + } + return ArcAppShelfId(); } // static
diff --git a/chrome/browser/ui/ash/launcher/arc_app_shelf_id.h b/chrome/browser/ui/ash/launcher/arc_app_shelf_id.h index 8415c53..333dc47 100644 --- a/chrome/browser/ui/ash/launcher/arc_app_shelf_id.h +++ b/chrome/browser/ui/ash/launcher/arc_app_shelf_id.h
@@ -7,19 +7,21 @@ #include <string> -// Represents ARC app shelf id that consists from app id and optional shelf -// group id. namespace arc { +// An ARC app shelf id consisting of an app id (must be a valid crx file id) +// and an optional shelf group id. Ids with empty app ids are invalid. class ArcAppShelfId { public: + ArcAppShelfId(); ArcAppShelfId(const std::string& shelf_group_id, const std::string& app_id); ArcAppShelfId(const ArcAppShelfId& other); ~ArcAppShelfId(); - // Returns id from string representation which has syntax - // "shelf_group:some_group_id:some_app_id". In case suffix shelf_group is - // absent then id is treated as app id. + // Returns an id from a string with syntax "shelf_group:group_id:app_id". + // If the shelf_group prefix is absent then the input is treated as an app id. + // In either case, if the app_id is not a valid crx file id, then the returned + // ArcAppShelfId is empty and considered invalid. static ArcAppShelfId FromString(const std::string& id); // Constructs id from app id and optional shelf_group_id encoded into the @@ -38,6 +40,8 @@ const std::string& app_id() const { return app_id_; } + bool valid() const { return !app_id_.empty(); } + private: const std::string shelf_group_id_; const std::string app_id_;
diff --git a/chrome/browser/ui/ash/launcher/arc_app_shelf_id_unittest.cc b/chrome/browser/ui/ash/launcher/arc_app_shelf_id_unittest.cc index 3753cc0f..6284e48 100644 --- a/chrome/browser/ui/ash/launcher/arc_app_shelf_id_unittest.cc +++ b/chrome/browser/ui/ash/launcher/arc_app_shelf_id_unittest.cc
@@ -17,14 +17,7 @@ constexpr char kTestIntentWithoutShelfGroup[] = "#Intent;S.other=tmp;end"; } // namespace -class ArcAppShelfIdTest : public testing::Test { - public: - ArcAppShelfIdTest() = default; - ~ArcAppShelfIdTest() override = default; - - private: - DISALLOW_COPY_AND_ASSIGN(ArcAppShelfIdTest); -}; +using ArcAppShelfIdTest = testing::Test; TEST_F(ArcAppShelfIdTest, BaseTestAAA) { const arc::ArcAppShelfId shelf_id1(kTestShelfGroupId, kTestAppId); @@ -62,3 +55,19 @@ EXPECT_FALSE(shelf_id7.has_shelf_group_id()); EXPECT_EQ(shelf_id7.app_id(), kTestAppId); } + +// Tests valid and invalid input to ArcAppShelfId::FromString. +TEST_F(ArcAppShelfIdTest, FromString) { + // A string containing just a valid crx id string yields a valid id. + EXPECT_TRUE(arc::ArcAppShelfId::FromString(kTestAppId).valid()); + // A serialized string with a group id and valid crx id yields a valid id. + const arc::ArcAppShelfId id(kTestShelfGroupId, kTestAppId); + EXPECT_TRUE(arc::ArcAppShelfId::FromString(id.ToString()).valid()); + + // An empty string yields an invalid id. + EXPECT_FALSE(arc::ArcAppShelfId::FromString(std::string()).valid()); + // A string with just a group id yields an invalid id. + EXPECT_FALSE(arc::ArcAppShelfId::FromString(kTestShelfGroupId).valid()); + // A string with arbitrary text (possibly a non-crx id) yields an invalid id. + EXPECT_FALSE(arc::ArcAppShelfId::FromString("ShelfWindowWatcher0").valid()); +}
diff --git a/chrome/browser/ui/views/sync/dice_signin_button.cc b/chrome/browser/ui/views/sync/dice_signin_button.cc index 64c7f2b..eb9cf7fa 100644 --- a/chrome/browser/ui/views/sync/dice_signin_button.cc +++ b/chrome/browser/ui/views/sync/dice_signin_button.cc
@@ -110,8 +110,10 @@ views::Button::STATE_NORMAL, gfx::CreateVectorIcon(kSigninButtonDropDownArrowIcon, kDropDownArrowIconSize, SK_ColorWHITE)); - arrow_->SetAccessibleName(l10n_util::GetStringUTF16( - IDS_PROFILES_DICE_SIGNIN_WITH_ANOTHER_ACCOUNT_BUTTON)); + base::string16 arrow_accessible_name = l10n_util::GetStringUTF16( + IDS_PROFILES_DICE_SIGNIN_WITH_ANOTHER_ACCOUNT_BUTTON); + arrow_->SetAccessibleName(arrow_accessible_name); + arrow_->SetTooltipText(arrow_accessible_name); AddChildView(arrow_); }
diff --git a/chrome/browser/ui/webui/chromeos/login/sync_consent_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/sync_consent_screen_handler.cc index 825e795..4fa421c7 100644 --- a/chrome/browser/ui/webui/chromeos/login/sync_consent_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/sync_consent_screen_handler.cc
@@ -35,24 +35,10 @@ builder->Add( "syncConsentScreenPersonalizeGoogleServicesDescription", IDS_LOGIN_SYNC_CONSENT_SCREEN_PERSONALIZE_GOOGLE_SERVICES_DESCRIPTION); - builder->Add("syncConsentScreenSettingsLink", - IDS_LOGIN_SYNC_CONSENT_SCREEN_SETTINGS_LINK); - builder->Add("syncConsentSettingsDialogTitle", - IDS_LOGIN_SYNC_CONSENT_SETTINGS_TITLE); - builder->Add("syncConsentSettingsDialogSubTitle", - IDS_LOGIN_SYNC_CONSENT_SETTINGS_SUBTITLE); - builder->Add("syncConsentSyncAllOptionTitle", - IDS_LOGIN_SYNC_CONSENT_SYNC_ALL_OPTION); - builder->Add("syncConsentSyncAllOptionOn", - IDS_LOGIN_SYNC_CONSENT_SYNC_ALL_OPTION_ON); - builder->Add("syncConsentSyncAllOptionOff", - IDS_LOGIN_SYNC_CONSENT_SYNC_ALL_OPTION_OFF); - builder->Add("syncConsentSettingsStatusSyncAllOn", - IDS_LOGIN_SYNC_CONSENT_STATUS_SYNC_ALL_ON); - builder->Add("syncConsentSettingsStatusSyncAllOff", - IDS_LOGIN_SYNC_CONSENT_STATUS_SYNC_ALL_OFF); - builder->Add("syncConsentSettingsSaveAndContinue", - IDS_LOGIN_SYNC_CONSENT_SAVE_AND_CONTINUE); + builder->Add("syncConsentReviewSyncOptionsText", + IDS_LOGIN_SYNC_CONSENT_SCREEN_REVIEW_SYNC_OPTIONS_LATER); + builder->Add("syncConsentAcceptAndContinue", + IDS_LOGIN_SYNC_CONSENT_SCREEN_ACCEPT_AND_CONTINUE); } void SyncConsentScreenHandler::RegisterMessages() {
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc index 6930b922..60482c6 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -315,6 +315,8 @@ source->AddLocalizedString("offlineForWeek", IDS_PRINT_PREVIEW_OFFLINE_FOR_WEEK); source->AddLocalizedString("offline", IDS_PRINT_PREVIEW_OFFLINE); + source->AddLocalizedString("noLongerSupportedFragment", + IDS_PRINT_PREVIEW_NO_LONGER_SUPPORTED_FRAGMENT); source->AddLocalizedString("noLongerSupported", IDS_PRINT_PREVIEW_NO_LONGER_SUPPORTED); source->AddLocalizedString("couldNotPrint",
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc index f425ce4..b204e28f 100644 --- a/chrome/common/chrome_features.cc +++ b/chrome/common/chrome_features.cc
@@ -153,18 +153,6 @@ base::FEATURE_ENABLED_BY_DEFAULT}; #endif -// If enabled, we'll only take thumbnails of unknown URLs (i.e. URLs that are -// not (yet) part of TopSites) if they have an interesting transition type, i.e. -// one that qualifies for inclusion in TopSites. -const base::Feature kCaptureThumbnailDependingOnTransitionType{ - "CaptureThumbnailDependingOnTransitionType", - base::FEATURE_ENABLED_BY_DEFAULT}; - -// Whether to capture page thumbnails when navigating away from the current page -// (in addition to any other times this might happen). -const base::Feature kCaptureThumbnailOnNavigatingAway{ - "CaptureThumbnailOnNavigatingAway", base::FEATURE_ENABLED_BY_DEFAULT}; - // Enables change picture video mode. const base::Feature kChangePictureVideoMode{"ChangePictureVideoMode", base::FEATURE_ENABLED_BY_DEFAULT};
diff --git a/chrome/common/chrome_features.h b/chrome/common/chrome_features.h index b444d8e..8080b07 100644 --- a/chrome/common/chrome_features.h +++ b/chrome/common/chrome_features.h
@@ -80,10 +80,6 @@ extern const base::Feature kTabStripKeyboardFocus; #endif // defined(OS_MACOSX) -extern const base::Feature kCaptureThumbnailDependingOnTransitionType; - -extern const base::Feature kCaptureThumbnailOnNavigatingAway; - extern const base::Feature kChangePictureVideoMode; #if defined(OS_ANDROID)
diff --git a/chrome/common/extensions/api/file_manager_private.idl b/chrome/common/extensions/api/file_manager_private.idl index 8f9ff42..676fb187 100644 --- a/chrome/common/extensions/api/file_manager_private.idl +++ b/chrome/common/extensions/api/file_manager_private.idl
@@ -628,6 +628,8 @@ // |sourcePath| Source path of the mount. callback AddMountCallback = void(DOMString sourcePath); +callback MarkCacheAsMountedCallback = void(); + // |volumeMetadataList| The list of VolumeMetadata representing mounted volumes. callback GetVolumeMetadataListCallback = void(VolumeMetadata[] volumeMetadataList); @@ -835,6 +837,16 @@ // |volumeId| An ID of the volume. static void removeMount(DOMString volumeId); + // Marks a cache file of Drive as mounted or unmounted. + // Does nothing if the file is not under Drive directory. + // |sourcePath| Mounted source file. Relative file path within external file + // system. + // |isMounted| Mark as mounted if true. Mark as unmounted otherwise. + // |callback| Completion callback. $(ref:runtime.lastError) will be set if + // there was an error. + static void markCacheAsMounted(DOMString sourcePath, boolean isMounted, + MarkCacheAsMountedCallback callback); + // Get the list of mounted volumes. // |callback| static void getVolumeMetadataList(GetVolumeMetadataListCallback callback);
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index 5fc8d1b..fcd89f4 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc
@@ -2568,4 +2568,9 @@ const char kWebDriverOverridesIncompatiblePolicies[] = "webdriver.override_incompatible_policy"; +#if !defined(OS_ANDROID) +// Boolean that specifies whether media (audio/video) autoplay is allowed. +const char kAutoplayAllowed[] = "media.autoplay_allowed"; +#endif // !defined(OS_ANDROID) + } // namespace prefs
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index f1e0319..a853e85 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h
@@ -919,6 +919,10 @@ extern const char kSitePerProcess[]; extern const char kWebDriverOverridesIncompatiblePolicies[]; +#if !defined(OS_ANDROID) +extern const char kAutoplayAllowed[]; +#endif + } // namespace prefs #endif // CHROME_COMMON_PREF_NAMES_H_
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 999f06a..2bd89fe 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -30,6 +30,7 @@ if (is_android) { import("//build/config/android/rules.gni") + import("//tools/v8_context_snapshot/v8_context_snapshot.gni") } else { include_js_tests = !(is_asan || is_msan || is_tsan) } @@ -2805,8 +2806,12 @@ "//components/gcm_driver/instance_id/android:instance_id_driver_java", "//components/gcm_driver/instance_id/android:instance_id_driver_test_support_java", "//content/public/android:content_java", - "//v8:v8_external_startup_data_assets", ] + if (use_v8_context_snapshot) { + deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ] + } else { + deps += [ "//v8:v8_external_startup_data_assets" ] + } android_manifest = "//chrome/test/android/unit_tests_apk/AndroidManifest.xml"
diff --git a/chrome/test/data/extensions/api_test/system/get_incognito_mode_availability/manifest.json b/chrome/test/data/extensions/api_test/system/get_incognito_mode_availability/manifest.json index 23211d7..803149a 100644 --- a/chrome/test/data/extensions/api_test/system/get_incognito_mode_availability/manifest.json +++ b/chrome/test/data/extensions/api_test/system/get_incognito_mode_availability/manifest.json
@@ -1,10 +1,11 @@ { "key": "MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDFFBqmJf6+xgNeQhSwunB7Vdi+peXwR6uf09DKBmStju73Cjhggl3x+i7jfeRvGguJA1nnxK45dHktx5ppyy2w16nFKFcfIAN9dP6RrfPWuHVxw1AzNCRm/VutRLje1e9Kk3xtXAw9Vj3N0/txZ3u8HOr62YUDIyFcS87+Yo/a9QIBIw==", + "manifest_version": 2, "name" : "chrome.systemPrivate.getIncognitoModeAvailability", "version" : "0.1", "description" : "browser test for chrome.systemPrivate.getIncognitoModeVailability", "permissions": ["systemPrivate"], "background": { - "page": "test.html" + "scripts": ["test.js"] } }
diff --git a/chrome/test/data/extensions/api_test/system/get_incognito_mode_availability/test.html b/chrome/test/data/extensions/api_test/system/get_incognito_mode_availability/test.html deleted file mode 100644 index 0f517b5..0000000 --- a/chrome/test/data/extensions/api_test/system/get_incognito_mode_availability/test.html +++ /dev/null
@@ -1,19 +0,0 @@ -<script> -// System API test -// Run with browser_tests --gtest_filter=ExtensionApiTest.GetIncognitoModeAvailability - -function expect(expected, message) { - return chrome.test.callbackPass(function(value) { - chrome.test.assertEq(expected, value, message); - }); -} - -chrome.test.runTests([ - function getIncognitoModeAvailabilityTest() { - chrome.systemPrivate.getIncognitoModeAvailability(expect( - 'disabled', - "Pref `chrome.system.getIncognitoModeAvailability` is expected to " + - "return 'disabled'")); - }, -]); -</script>
diff --git a/chrome/test/data/extensions/api_test/system/get_incognito_mode_availability/test.js b/chrome/test/data/extensions/api_test/system/get_incognito_mode_availability/test.js new file mode 100644 index 0000000..777e235 --- /dev/null +++ b/chrome/test/data/extensions/api_test/system/get_incognito_mode_availability/test.js
@@ -0,0 +1,16 @@ +// Copyright 2018 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. + +// System API test +// Run with browser_tests \ +// --gtest_filter=ExtensionApiTest.GetIncognitoModeAvailability + +chrome.test.runTests([ + function getIncognitoModeAvailabilityTest() { + chrome.systemPrivate.getIncognitoModeAvailability( + chrome.test.callbackPass(function(value) { + chrome.test.assertEq('disabled', value); + })); + }, +]);
diff --git a/chrome/test/data/media/unified_autoplay.html b/chrome/test/data/media/unified_autoplay.html index cfefabc4..f4ddc4e8 100644 --- a/chrome/test/data/media/unified_autoplay.html +++ b/chrome/test/data/media/unified_autoplay.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <meta charset='utf-8'> -<title>Simple autopaly test page</title> +<title>Simple autoplay test page</title> <video src='bigbuck.webm'></video> <script> function attemptPlay() {
diff --git a/chrome/test/data/policy/policy_test_cases.json b/chrome/test/data/policy/policy_test_cases.json index 7243e29..818b1d3 100644 --- a/chrome/test/data/policy/policy_test_cases.json +++ b/chrome/test/data/policy/policy_test_cases.json
@@ -3623,6 +3623,14 @@ ] }, + "AutoplayAllowed": { + "os": ["win", "linux", "mac", "chromeos"], + "test_policy": { "AutoplayAllowed": false }, + "pref_mappings": [ + { "pref": "media.autoplay_allowed" } + ] + }, + "----- Chrome Frame policies -------------------------------------------": {}, "ChromeFrameRendererSettings": {
diff --git a/components/BUILD.gn b/components/BUILD.gn index bad99d8..b39fec5c 100644 --- a/components/BUILD.gn +++ b/components/BUILD.gn
@@ -14,6 +14,7 @@ if (is_android) { import("//build/config/android/rules.gni") + import("//tools/v8_context_snapshot/v8_context_snapshot.gni") } if (is_ios) { @@ -271,8 +272,12 @@ "//ui/android:ui_java", "//ui/base", "//ui/gfx", - "//v8:v8_external_startup_data_assets", ] + if (use_v8_context_snapshot) { + deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ] + } else { + deps += [ "//v8:v8_external_startup_data_assets" ] + } } else { # !is_android deps += [ "//components/keep_alive_registry:unit_tests" ] } @@ -375,8 +380,12 @@ ":components_tests_pak", "//content/shell:pak", "//third_party/icu:icu_assets", - "//v8:v8_external_startup_data_assets", ] + if (use_v8_context_snapshot) { + deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ] + } else { + deps += [ "//v8:v8_external_startup_data_assets" ] + } } android_library("components_browsertests_java") {
diff --git a/components/autofill/core/browser/webdata/autocomplete_sync_bridge.cc b/components/autofill/core/browser/webdata/autocomplete_sync_bridge.cc index 44d2068..bcdcc18 100644 --- a/components/autofill/core/browser/webdata/autocomplete_sync_bridge.cc +++ b/components/autofill/core/browser/webdata/autocomplete_sync_bridge.cc
@@ -382,7 +382,7 @@ batch->Put(key, CreateEntityData(entry)); } } - callback.Run(std::move(batch)); + std::move(callback).Run(std::move(batch)); } void AutocompleteSyncBridge::GetAllData(DataCallback callback) { @@ -399,7 +399,7 @@ for (const AutofillEntry& entry : entries) { batch->Put(GetStorageKeyFromModel(entry.key()), CreateEntityData(entry)); } - callback.Run(std::move(batch)); + std::move(callback).Run(std::move(batch)); } void AutocompleteSyncBridge::ActOnLocalChanges(
diff --git a/components/history/core/browser/typed_url_sync_bridge.cc b/components/history/core/browser/typed_url_sync_bridge.cc index e1e05051..84610a3 100644 --- a/components/history/core/browser/typed_url_sync_bridge.cc +++ b/components/history/core/browser/typed_url_sync_bridge.cc
@@ -288,7 +288,7 @@ batch->Put(key, std::move(entity_data)); } - callback.Run(std::move(batch)); + std::move(callback).Run(std::move(batch)); } void TypedURLSyncBridge::GetAllData(DataCallback callback) { @@ -318,7 +318,7 @@ batch->Put(GetStorageKeyFromURLRow(url), std::move(entity_data)); } - callback.Run(std::move(batch)); + std::move(callback).Run(std::move(batch)); } // Must be exactly the value of GURL::spec() for backwards comparability with
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json index 9aab17b..4817162 100644 --- a/components/policy/resources/policy_templates.json +++ b/components/policy/resources/policy_templates.json
@@ -146,7 +146,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: 429 +# For your editing convenience: highest ID currently used: 430 # And don't forget to also update the EnterprisePolicies enum of # histograms.xml (run 'python tools/metrics/histograms/update_policies.py'). # @@ -11481,14 +11481,36 @@ If this policy is set, <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> will try to register itself and apply associated cloud policy for all profiles. The value of this policy is an Enrollment token that can be retrieved from the Google Admin console.''', + }, + { + 'name': 'AutoplayAllowed', + 'type': 'main', + 'schema': { 'type': 'boolean' }, + 'supported_on': ['chrome.win:66-', 'chrome.linux:66-', 'chrome.mac:66-', 'chrome_os:66-'], + 'features': { + 'dynamic_refresh': True, + 'per_profile': True, + }, + 'example_value': True, + 'id': 430, + 'caption': '''Allows media autoplay''', + 'tags': [], + 'desc': '''Allows you to control if videos can play automatically (without user consent) with audio content in <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>. + + If the policy is set to True, <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> is allowed to autoplay media. + If the policy is set to False, <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> is not allowed to autoplay media. + By default, <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> is not allowed to autoplay media. + + Note that if <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> is running and this policy changes, it will be applied only to new opened tabs. Therefore some tabs might still observe the previous behavior. + ''', } ], 'messages': { # Messages that are not associated to any policies. - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'desc': '''A label specifying the oldest possible compatible version of Windows. This text will appear right next to a label containing the text 'Supported on:'.''', - 'text': '''Microsoft Windows XP SP2 or later''' + 'text': '''Microsoft Windows 7 or later''' }, 'mac_chrome_preferences': { 'desc': '''A text indicating in Mac OS X Workgroup Manager, that currently the preferences of Chromium are being edited''',
diff --git a/components/policy/tools/generate_extension_admx.py b/components/policy/tools/generate_extension_admx.py index 0ed729a..ffdf0a9 100755 --- a/components/policy/tools/generate_extension_admx.py +++ b/components/policy/tools/generate_extension_admx.py
@@ -194,9 +194,9 @@ definitions_elem = self._AddElement(supported_on_elem, 'definitions') definition_elem = self._AddElement(definitions_elem, 'definition') self._SetAttribute(definition_elem, 'displayName', - 'Microsoft Windows XP SP2 or later', - 'SUPPORTED_WINXPSP2') - self._SetAttribute(definition_elem, 'name', 'SUPPORTED_WINXPSP2') + 'Microsoft Windows 7 or later', + 'SUPPORTED_WIN7') + self._SetAttribute(definition_elem, 'name', 'SUPPORTED_WIN7') categories_elem = self._AddElement(root_elem, 'categories') self._AddCategory(categories_elem, @@ -229,7 +229,7 @@ self._SetAttribute(parent_category_elem, 'ref', 'extension') supported_on_elem = self._AddElement(policy_elem, 'supportedOn') - self._SetAttribute(supported_on_elem, 'ref', 'SUPPORTED_WINXPSP2') + self._SetAttribute(supported_on_elem, 'ref', 'SUPPORTED_WIN7') if 'id' in policy_schema: # Keep id map for referenced schema.
diff --git a/components/policy/tools/template_writers/writer_configuration.py b/components/policy/tools/template_writers/writer_configuration.py index 554ea30..b57be42 100755 --- a/components/policy/tools/template_writers/writer_configuration.py +++ b/components/policy/tools/template_writers/writer_configuration.py
@@ -112,7 +112,7 @@ raise Exception('Unknown build') if 'version' in defines: config['version'] = defines['version'] - config['win_supported_os'] = 'SUPPORTED_WINXPSP2' + config['win_supported_os'] = 'SUPPORTED_WIN7' if 'mac_bundle_id' in defines: config['mac_bundle_id'] = defines['mac_bundle_id'] config['android_webview_restriction_prefix'] = 'com.android.browser:'
diff --git a/components/policy/tools/template_writers/writers/adm_writer.py b/components/policy/tools/template_writers/writers/adm_writer.py index 98561f4c..b0f6b06 100755 --- a/components/policy/tools/template_writers/writers/adm_writer.py +++ b/components/policy/tools/template_writers/writers/adm_writer.py
@@ -95,7 +95,7 @@ def _WriteSupported(self, builder): builder.AddLine('#if version >= 4', 1) - builder.AddLine('SUPPORTED !!SUPPORTED_WINXPSP2') + builder.AddLine('SUPPORTED !!SUPPORTED_WIN7') builder.AddLine('#endif', -1) def _WritePart(self, policy, key_name, builder): @@ -219,7 +219,7 @@ self.WriteComment(self.config['build'] + ' version: ' + \ self._GetChromiumVersionString()) self._AddGuiString(self.config['win_supported_os'], - self.messages['win_supported_winxpsp2']['text']) + self.messages['win_supported_win7']['text']) categories = self.winconfig['mandatory_category_path'] + \ self.winconfig['recommended_category_path'] strings = self.winconfig['category_path_strings'].copy()
diff --git a/components/policy/tools/template_writers/writers/adm_writer_unittest.py b/components/policy/tools/template_writers/writers/adm_writer_unittest.py index b225b97..a9003c0 100755 --- a/components/policy/tools/template_writers/writers/adm_writer_unittest.py +++ b/components/policy/tools/template_writers/writers/adm_writer_unittest.py
@@ -48,7 +48,7 @@ 'policy_definitions': [], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least "Windows 3.11', 'desc': 'blah' }, 'doc_recommended': { @@ -71,7 +71,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least "Windows 3.11" +SUPPORTED_WIN7="At least "Windows 3.11" chromium="Chromium" chromium_recommended="Chromium - Recommended"''') self.CompareOutputs(output, expected_output) @@ -83,7 +83,7 @@ 'policy_definitions': [], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least "Windows 3.11', 'desc': 'blah' }, 'doc_recommended': { @@ -107,7 +107,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least "Windows 3.11" +SUPPORTED_WIN7="At least "Windows 3.11" chromium="Chromium" chromium_recommended="Chromium - Recommended"''') self.CompareOutputs(output, expected_output) @@ -128,7 +128,7 @@ ], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least Windows 3.12', 'desc': 'blah' }, 'doc_recommended': { @@ -145,7 +145,7 @@ POLICY !!MainPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!MainPolicy_Explain VALUENAME "MainPolicy" @@ -162,7 +162,7 @@ POLICY !!MainPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!MainPolicy_Explain VALUENAME "MainPolicy" @@ -175,7 +175,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least Windows 3.12" +SUPPORTED_WIN7="At least Windows 3.12" Google:Cat_Google="Google" googlechrome="Google Chrome" googlechrome_recommended="Google Chrome - Recommended" @@ -202,7 +202,7 @@ ], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least Windows 3.12', 'desc': 'blah' }, 'doc_recommended': { @@ -226,7 +226,7 @@ POLICY !!MainPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!MainPolicy_Explain VALUENAME "MainPolicy" @@ -239,7 +239,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least Windows 3.12" +SUPPORTED_WIN7="At least Windows 3.12" Google:Cat_Google="Google" googlechrome="Google Chrome" googlechrome_recommended="Google Chrome - Recommended" @@ -264,7 +264,7 @@ ], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least Windows 3.13', 'desc': 'blah' }, 'doc_recommended': { @@ -280,7 +280,7 @@ POLICY !!StringPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!StringPolicy_Explain @@ -297,7 +297,7 @@ POLICY !!StringPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!StringPolicy_Explain @@ -311,7 +311,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least Windows 3.13" +SUPPORTED_WIN7="At least Windows 3.13" chromium="Chromium" chromium_recommended="Chromium - Recommended" StringPolicy_Policy="Caption of policy." @@ -336,7 +336,7 @@ ], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least Windows 3.13', 'desc': 'blah' }, 'doc_recommended': { @@ -352,7 +352,7 @@ POLICY !!IntPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!IntPolicy_Explain @@ -369,7 +369,7 @@ POLICY !!IntPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!IntPolicy_Explain @@ -383,7 +383,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least Windows 3.13" +SUPPORTED_WIN7="At least Windows 3.13" chromium="Chromium" chromium_recommended="Chromium - Recommended" IntPolicy_Policy="Caption of policy." @@ -420,7 +420,7 @@ ], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least Windows 3.14', 'desc': 'blah' }, 'doc_recommended': { @@ -437,7 +437,7 @@ POLICY !!EnumPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!EnumPolicy_Explain @@ -459,7 +459,7 @@ POLICY !!EnumPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!EnumPolicy_Explain @@ -477,7 +477,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least Windows 3.14" +SUPPORTED_WIN7="At least Windows 3.14" Google:Cat_Google="Google" googlechrome="Google Chrome" googlechrome_recommended="Google Chrome - Recommended" @@ -511,7 +511,7 @@ ], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least Windows 3.14', 'desc': 'blah' }, 'doc_recommended': { @@ -528,7 +528,7 @@ POLICY !!EnumPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!EnumPolicy_Explain @@ -550,7 +550,7 @@ POLICY !!EnumPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!EnumPolicy_Explain @@ -568,7 +568,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least Windows 3.14" +SUPPORTED_WIN7="At least Windows 3.14" Google:Cat_Google="Google" googlechrome="Google Chrome" googlechrome_recommended="Google Chrome - Recommended" @@ -598,7 +598,7 @@ ], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least Windows 3.15', 'desc': 'blah' }, 'doc_recommended': { @@ -614,7 +614,7 @@ POLICY !!ListPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!ListPolicy_Explain @@ -631,7 +631,7 @@ POLICY !!ListPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!ListPolicy_Explain @@ -645,7 +645,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least Windows 3.15" +SUPPORTED_WIN7="At least Windows 3.15" chromium="Chromium" chromium_recommended="Chromium - Recommended" ListPolicy_Policy="Caption of list policy." @@ -678,7 +678,7 @@ ], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least Windows 3.15', 'desc': 'blah' }, 'doc_recommended': { @@ -694,7 +694,7 @@ POLICY !!ListPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!ListPolicy_Explain @@ -711,7 +711,7 @@ POLICY !!ListPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!ListPolicy_Explain @@ -725,7 +725,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least Windows 3.15" +SUPPORTED_WIN7="At least Windows 3.15" chromium="Chromium" chromium_recommended="Chromium - Recommended" ListPolicy_Policy="Caption of list policy." @@ -750,7 +750,7 @@ ], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least Windows 3.13', 'desc': 'blah' }, 'doc_recommended': { @@ -766,7 +766,7 @@ POLICY !!DictionaryPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!DictionaryPolicy_Explain @@ -783,7 +783,7 @@ POLICY !!DictionaryPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!DictionaryPolicy_Explain @@ -797,7 +797,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least Windows 3.13" +SUPPORTED_WIN7="At least Windows 3.13" chromium="Chromium" chromium_recommended="Chromium - Recommended" DictionaryPolicy_Policy="Caption of policy." @@ -822,7 +822,7 @@ ], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least Windows 3.13', 'desc': 'blah' }, 'doc_recommended': { @@ -838,7 +838,7 @@ POLICY !!ExternalPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!ExternalPolicy_Explain @@ -855,7 +855,7 @@ POLICY !!ExternalPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!ExternalPolicy_Explain @@ -869,7 +869,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least Windows 3.13" +SUPPORTED_WIN7="At least Windows 3.13" chromium="Chromium" chromium_recommended="Chromium - Recommended" ExternalPolicy_Policy="Caption of policy." @@ -901,7 +901,7 @@ ], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least Windows 3.16', 'desc': 'blah' }, 'doc_recommended': { @@ -924,7 +924,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least Windows 3.16" +SUPPORTED_WIN7="At least Windows 3.16" chromium="Chromium" chromium_recommended="Chromium - Recommended" ''') @@ -945,7 +945,7 @@ ], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least Windows 3.12', 'desc': 'blah' }, 'doc_recommended': { @@ -962,7 +962,7 @@ POLICY !!MainPolicy_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!MainPolicy_Explain VALUENAME "MainPolicy" @@ -982,7 +982,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least Windows 3.12" +SUPPORTED_WIN7="At least Windows 3.12" Google:Cat_Google="Google" googlechrome="Google Chrome" googlechrome_recommended="Google Chrome - Recommended" @@ -1022,7 +1022,7 @@ ], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least Windows 3.16', 'desc': 'blah' }, 'doc_recommended': { @@ -1039,7 +1039,7 @@ CATEGORY !!Group1_Category POLICY !!Policy1_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!Policy1_Explain @@ -1051,7 +1051,7 @@ POLICY !!Policy2_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!Policy2_Explain @@ -1071,7 +1071,7 @@ CATEGORY !!Group1_Category POLICY !!Policy1_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!Policy1_Explain @@ -1087,7 +1087,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least Windows 3.16" +SUPPORTED_WIN7="At least Windows 3.16" chromium="Chromium" chromium_recommended="Chromium - Recommended" Group1_Category="Caption of group." @@ -1129,7 +1129,7 @@ ], 'placeholders': [], 'messages': { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'At least Windows 3.14', 'desc': 'blah' }, 'doc_recommended': { @@ -1146,7 +1146,7 @@ POLICY !!EnumPolicy_A_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!EnumPolicy_A_Explain @@ -1160,7 +1160,7 @@ POLICY !!EnumPolicy_B_Policy #if version >= 4 - SUPPORTED !!SUPPORTED_WINXPSP2 + SUPPORTED !!SUPPORTED_WIN7 #endif EXPLAIN !!EnumPolicy_B_Explain @@ -1184,7 +1184,7 @@ ''', '''[Strings] -SUPPORTED_WINXPSP2="At least Windows 3.14" +SUPPORTED_WIN7="At least Windows 3.14" Google:Cat_Google="Google" googlechrome="Google Chrome" googlechrome_recommended="Google Chrome - Recommended"
diff --git a/components/policy/tools/template_writers/writers/adml_writer.py b/components/policy/tools/template_writers/writers/adml_writer.py index 4c30609ea..2b196dcf 100755 --- a/components/policy/tools/template_writers/writers/adml_writer.py +++ b/components/policy/tools/template_writers/writers/adml_writer.py
@@ -136,7 +136,7 @@ the ADMX file but not related to any specific Policy-Group or Policy. ''' self._AddString(self.config['win_supported_os'], - self.messages['win_supported_winxpsp2']['text']) + self.messages['win_supported_win7']['text']) categories = self.winconfig['mandatory_category_path'] + \ self.winconfig['recommended_category_path'] strings = self.winconfig['category_path_strings']
diff --git a/components/policy/tools/template_writers/writers/adml_writer_unittest.py b/components/policy/tools/template_writers/writers/adml_writer_unittest.py index f0a03e7..7e50d8e8 100755 --- a/components/policy/tools/template_writers/writers/adml_writer_unittest.py +++ b/components/policy/tools/template_writers/writers/adml_writer_unittest.py
@@ -47,7 +47,7 @@ } self.writer = self._GetWriter(config) self.writer.messages = { - 'win_supported_winxpsp2': { + 'win_supported_win7': { 'text': 'Supported on Test OS or higher', 'desc': 'blah' },
diff --git a/components/policy/tools/template_writers/writers/admx_writer.py b/components/policy/tools/template_writers/writers/admx_writer.py index 88607ba..d7277be8 100755 --- a/components/policy/tools/template_writers/writers/admx_writer.py +++ b/components/policy/tools/template_writers/writers/admx_writer.py
@@ -158,8 +158,8 @@ <supportedOn> <definitions> - <definition name="SUPPORTED_WINXPSP2" - displayName="$(string.SUPPORTED_WINXPSP2)"/> + <definition name="SUPPORTED_WIN7" + displayName="$(string.SUPPORTED_WIN7)"/> </definitions> ... </supportedOn>
diff --git a/components/policy/tools/template_writers/writers/template_writer.py b/components/policy/tools/template_writers/writers/template_writer.py index eab5222..4f23696 100755 --- a/components/policy/tools/template_writers/writers/template_writer.py +++ b/components/policy/tools/template_writers/writers/template_writer.py
@@ -20,12 +20,6 @@ 'branding': 'Google Chrome' or 'Chromium' 'mac_bundle_id': The Mac bundle id of Chrome. (Only set when building for Mac.) - messages: List of all the message strings from the grd file. Most of them - are also present in the policy data structures that are passed to - methods. That is the preferred way of accessing them, this should only - be used in exceptional cases. An example for its use is the - IDS_POLICY_WIN_SUPPORTED_WINXPSP2 message in ADM files, because that - cannot be associated with any policy or group. ''' self.platforms = platforms self.config = config
diff --git a/components/reading_list/core/reading_list_store.cc b/components/reading_list/core/reading_list_store.cc index 62fbb31..9ec4ab6 100644 --- a/components/reading_list/core/reading_list_store.cc +++ b/components/reading_list/core/reading_list_store.cc
@@ -367,7 +367,7 @@ } } - callback.Run(std::move(batch)); + std::move(callback).Run(std::move(batch)); } void ReadingListStore::GetAllData(DataCallback callback) { @@ -379,7 +379,7 @@ AddEntryToBatch(batch.get(), *entry); } - callback.Run(std::move(batch)); + std::move(callback).Run(std::move(batch)); } void ReadingListStore::AddEntryToBatch(syncer::MutableDataBatch* batch,
diff --git a/components/safe_browsing/triggers/ad_sampler_trigger.cc b/components/safe_browsing/triggers/ad_sampler_trigger.cc index 30294e8..fefeffe 100644 --- a/components/safe_browsing/triggers/ad_sampler_trigger.cc +++ b/components/safe_browsing/triggers/ad_sampler_trigger.cc
@@ -29,8 +29,11 @@ const char kAdSamplerFrequencyDenominatorParam[] = "safe_browsing_ad_sampler_frequency_denominator"; +// Default frequency denominator for the ad sampler. +const size_t kAdSamplerDefaultFrequency = 1000; + // A frequency denominator with this value indicates sampling is disabled. -const size_t kSamplerFrequencyDisabled = 0; +const size_t kAdSamplerFrequencyDisabled = 0; // Number of milliseconds to wait after a page finished loading before starting // a report. Allows ads which load in the background to finish loading. @@ -48,14 +51,14 @@ size_t GetSamplerFrequencyDenominator() { if (!base::FeatureList::IsEnabled(kAdSamplerTriggerFeature)) - return kSamplerFrequencyDisabled; + return kAdSamplerDefaultFrequency; const std::string sampler_frequency_denominator = base::GetFieldTrialParamValueByFeature( kAdSamplerTriggerFeature, kAdSamplerFrequencyDenominatorParam); int result; if (!base::StringToInt(sampler_frequency_denominator, &result)) - return kSamplerFrequencyDisabled; + return kAdSamplerDefaultFrequency; return result; } @@ -89,7 +92,7 @@ } bool ShouldSampleAd(const size_t frequency_denominator) { - return frequency_denominator != kSamplerFrequencyDisabled && + return frequency_denominator != kAdSamplerFrequencyDisabled && (base::RandUint64() % frequency_denominator) == 0; }
diff --git a/components/safe_browsing/triggers/ad_sampler_trigger.h b/components/safe_browsing/triggers/ad_sampler_trigger.h index 20190be1..fe60d0fd 100644 --- a/components/safe_browsing/triggers/ad_sampler_trigger.h +++ b/components/safe_browsing/triggers/ad_sampler_trigger.h
@@ -26,8 +26,11 @@ // Param name of the denominator for controlling sampling frequency. extern const char kAdSamplerFrequencyDenominatorParam[]; +// Default frequency for the ad sampler, if not configured in Finch. +extern const size_t kAdSamplerDefaultFrequency; + // A frequency denominator with this value indicates sampling is disabled. -extern const size_t kSamplerFrequencyDisabled; +extern const size_t kAdSamplerFrequencyDisabled; // Metric for tracking what the Ad Sampler trigger does on each navigation. extern const char kAdSamplerTriggerActionMetricName[];
diff --git a/components/safe_browsing/triggers/ad_sampler_trigger_unittest.cc b/components/safe_browsing/triggers/ad_sampler_trigger_unittest.cc index 2eba249..b41b1ee 100644 --- a/components/safe_browsing/triggers/ad_sampler_trigger_unittest.cc +++ b/components/safe_browsing/triggers/ad_sampler_trigger_unittest.cc
@@ -132,7 +132,7 @@ TEST_F(AdSamplerTriggerTest, TriggerDisabledBySamplingFrequency) { // Make sure the trigger doesn't fire when the sampling frequency is set to // zero, which disables the trigger. - CreateTriggerWithFrequency(kSamplerFrequencyDisabled); + CreateTriggerWithFrequency(kAdSamplerFrequencyDisabled); EXPECT_CALL(*get_trigger_manager(), StartCollectingThreatDetails(_, _, _, _, _, _)) .Times(0); @@ -245,7 +245,12 @@ TEST(AdSamplerTriggerTestFinch, FrequencyDenominatorFeature) { // Make sure that setting the frequency denominator via Finch params works as - // expected. + // expected, and that the default frequency is used when no Finch config is + // given. + AdSamplerTrigger trigger_default(nullptr, nullptr, nullptr, nullptr, nullptr); + EXPECT_EQ(kAdSamplerDefaultFrequency, + trigger_default.sampler_frequency_denominator_); + const size_t kDenominatorInt = 12345; base::FieldTrialList field_trial_list(nullptr); @@ -266,7 +271,7 @@ base::test::ScopedFeatureList scoped_feature_list; scoped_feature_list.InitWithFeatureList(std::move(feature_list)); - AdSamplerTrigger trigger(nullptr, nullptr, nullptr, nullptr, nullptr); - EXPECT_EQ(kDenominatorInt, trigger.sampler_frequency_denominator_); + AdSamplerTrigger trigger_finch(nullptr, nullptr, nullptr, nullptr, nullptr); + EXPECT_EQ(kDenominatorInt, trigger_finch.sampler_frequency_denominator_); } } // namespace safe_browsing
diff --git a/components/safe_browsing/triggers/trigger_throttler.cc b/components/safe_browsing/triggers/trigger_throttler.cc index 1f10f98..9ef8868b6e 100644 --- a/components/safe_browsing/triggers/trigger_throttler.cc +++ b/components/safe_browsing/triggers/trigger_throttler.cc
@@ -14,6 +14,7 @@ namespace safe_browsing { const char kTriggerTypeAndQuotaParam[] = "trigger_type_and_quota_csv"; +const size_t kAdSamplerTriggerDefaultQuota = 10; namespace { const size_t kUnlimitedTriggerQuota = std::numeric_limits<size_t>::max(); @@ -74,26 +75,20 @@ const TriggerTypeAndQuotaItem& b) { return a.first < b.first; }); } -size_t GetDailyQuotaForTrigger( +// Looks in |trigger_quota_list| for |trigger_type|. If found, sets |out_quota| +// to the configured quota, and returns true. If not found, returns false. +bool TryFindQuotaForTrigger( const TriggerType trigger_type, - const std::vector<TriggerTypeAndQuotaItem>& trigger_quota_list) { - switch (trigger_type) { - case TriggerType::SECURITY_INTERSTITIAL: - case TriggerType::GAIA_PASSWORD_REUSE: - return kUnlimitedTriggerQuota; - case TriggerType::AD_SAMPLE: - // These triggers have quota configured via Finch, lookup the value in - // |trigger_quota_list|. - const auto& trigger_quota_iter = - std::find_if(trigger_quota_list.begin(), trigger_quota_list.end(), - TriggerTypeIs(trigger_type)); - if (trigger_quota_iter != trigger_quota_list.end()) - return trigger_quota_iter->second; - - break; + const std::vector<TriggerTypeAndQuotaItem>& trigger_quota_list, + size_t* out_quota) { + const auto& trigger_quota_iter = + std::find_if(trigger_quota_list.begin(), trigger_quota_list.end(), + TriggerTypeIs(trigger_type)); + if (trigger_quota_iter != trigger_quota_list.end()) { + *out_quota = trigger_quota_iter->second; + return true; } - // By default, unhandled or unconfigured trigger types have no quota. - return 0; + return false; } } // namespace @@ -111,8 +106,7 @@ bool TriggerThrottler::TriggerCanFire(const TriggerType trigger_type) const { // Lookup how many times this trigger is allowed to fire each day. - const size_t trigger_quota = - GetDailyQuotaForTrigger(trigger_type, trigger_type_and_quota_list_); + const size_t trigger_quota = GetDailyQuotaForTrigger(trigger_type); // Some basic corner cases for triggers that always fire, or disabled // triggers that never fire. @@ -142,8 +136,7 @@ void TriggerThrottler::TriggerFired(const TriggerType trigger_type) { // Lookup how many times this trigger is allowed to fire each day. - const size_t trigger_quota = - GetDailyQuotaForTrigger(trigger_type, trigger_type_and_quota_list_); + const size_t trigger_quota = GetDailyQuotaForTrigger(trigger_type); // For triggers that always fire, don't bother tracking quota. if (trigger_quota == kUnlimitedTriggerQuota) @@ -160,8 +153,7 @@ void TriggerThrottler::CleanupOldEvents() { for (const auto& map_iter : trigger_events_) { const TriggerType trigger_type = map_iter.first; - const size_t trigger_quota = - GetDailyQuotaForTrigger(trigger_type, trigger_type_and_quota_list_); + const size_t trigger_quota = GetDailyQuotaForTrigger(trigger_type); const std::vector<time_t>& trigger_times = map_iter.second; // Skip the cleanup if we have quota room, quotas should generally be small. @@ -182,4 +174,27 @@ } } +size_t TriggerThrottler::GetDailyQuotaForTrigger( + const TriggerType trigger_type) const { + size_t quota_from_finch = 0; + switch (trigger_type) { + case TriggerType::SECURITY_INTERSTITIAL: + case TriggerType::GAIA_PASSWORD_REUSE: + return kUnlimitedTriggerQuota; + case TriggerType::AD_SAMPLE: + // These triggers have quota configured via Finch, lookup the value in + // |trigger_quota_list|. If it's not found, return the default quota. + if (TryFindQuotaForTrigger(trigger_type, trigger_type_and_quota_list_, + "a_from_finch)) { + return quota_from_finch; + } else { + return kAdSamplerTriggerDefaultQuota; + } + + break; + } + // By default, unhandled or unconfigured trigger types have no quota. + return 0; +} + } // namespace safe_browsing
diff --git a/components/safe_browsing/triggers/trigger_throttler.h b/components/safe_browsing/triggers/trigger_throttler.h index b5b2b644..2fb499e 100644 --- a/components/safe_browsing/triggers/trigger_throttler.h +++ b/components/safe_browsing/triggers/trigger_throttler.h
@@ -9,6 +9,7 @@ #include <unordered_map> #include <vector> +#include "base/gtest_prod_util.h" #include "base/macros.h" #include "base/time/clock.h" @@ -18,6 +19,9 @@ // types and daily quotas. extern const char kTriggerTypeAndQuotaParam[]; +// Default quota for ad sampler trigger. +extern const size_t kAdSamplerTriggerDefaultQuota; + enum class TriggerType { SECURITY_INTERSTITIAL = 1, AD_SAMPLE = 2, @@ -57,10 +61,14 @@ private: friend class TriggerThrottlerTest; + FRIEND_TEST_ALL_PREFIXES(TriggerThrottlerTestFinch, AdSamplerDefaultQuota); // Called to periodically clean-up the list of event timestamps. void CleanupOldEvents(); + // Returns the daily quota for the specified trigger. + size_t GetDailyQuotaForTrigger(const TriggerType trigger_type) const; + // Can be set for testing. base::Clock* clock_;
diff --git a/components/safe_browsing/triggers/trigger_throttler_unittest.cc b/components/safe_browsing/triggers/trigger_throttler_unittest.cc index f5a6308..b8d94a28 100644 --- a/components/safe_browsing/triggers/trigger_throttler_unittest.cc +++ b/components/safe_browsing/triggers/trigger_throttler_unittest.cc
@@ -142,13 +142,14 @@ // Make sure that setting the quota param via Finch params works as expected. base::FieldTrialList field_trial_list(nullptr); base::FieldTrial* trial = base::FieldTrialList::CreateFieldTrial( - safe_browsing::kTriggerThrottlerDailyQuotaFeature.name, "Group"); + safe_browsing::kTriggerThrottlerDailyQuotaFeature.name, + "Group_ConfigureQuotaViaFinch"); std::map<std::string, std::string> feature_params; feature_params[std::string(safe_browsing::kTriggerTypeAndQuotaParam)] = base::StringPrintf("%d,%d", TriggerType::AD_SAMPLE, 3); base::AssociateFieldTrialParams( - safe_browsing::kTriggerThrottlerDailyQuotaFeature.name, "Group", - feature_params); + safe_browsing::kTriggerThrottlerDailyQuotaFeature.name, + "Group_ConfigureQuotaViaFinch", feature_params); std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList); feature_list->InitializeFromCommandLine( safe_browsing::kTriggerThrottlerDailyQuotaFeature.name, std::string()); @@ -173,4 +174,36 @@ // Fourth attempt will fail since we're out of quota. EXPECT_FALSE(throttler.TriggerCanFire(TriggerType::AD_SAMPLE)); } + +TEST(TriggerThrottlerTestFinch, AdSamplerDefaultQuota) { + // Make sure that the ad sampler gets its own default quota when no finch + // config exists, but the quota can be overwritten through Finch. + TriggerThrottler throttler_default; + EXPECT_EQ(kAdSamplerTriggerDefaultQuota, + throttler_default.GetDailyQuotaForTrigger(TriggerType::AD_SAMPLE)); + + size_t quota_from_finch = 4; + base::FieldTrialList field_trial_list(nullptr); + base::FieldTrial* trial = base::FieldTrialList::CreateFieldTrial( + safe_browsing::kTriggerThrottlerDailyQuotaFeature.name, + "Group_AdSamplerDefaultQuota"); + std::map<std::string, std::string> feature_params; + feature_params[std::string(safe_browsing::kTriggerTypeAndQuotaParam)] = + base::StringPrintf("%d,%zu", TriggerType::AD_SAMPLE, quota_from_finch); + base::AssociateFieldTrialParams( + safe_browsing::kTriggerThrottlerDailyQuotaFeature.name, + "Group_AdSamplerDefaultQuota", feature_params); + std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList); + feature_list->InitializeFromCommandLine( + safe_browsing::kTriggerThrottlerDailyQuotaFeature.name, std::string()); + feature_list->AssociateReportingFieldTrial( + safe_browsing::kTriggerThrottlerDailyQuotaFeature.name, + base::FeatureList::OVERRIDE_ENABLE_FEATURE, trial); + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitWithFeatureList(std::move(feature_list)); + + TriggerThrottler throttler_finch; + EXPECT_EQ(quota_from_finch, + throttler_finch.GetDailyQuotaForTrigger(TriggerType::AD_SAMPLE)); +} } // namespace safe_browsing
diff --git a/components/sync/device_info/device_info_sync_bridge.cc b/components/sync/device_info/device_info_sync_bridge.cc index 5241f612..7796191 100644 --- a/components/sync/device_info/device_info_sync_bridge.cc +++ b/components/sync/device_info/device_info_sync_bridge.cc
@@ -214,7 +214,7 @@ batch->Put(key, CopyToEntityData(*iter->second)); } } - callback.Run(std::move(batch)); + std::move(callback).Run(std::move(batch)); } void DeviceInfoSyncBridge::GetAllData(DataCallback callback) { @@ -222,7 +222,7 @@ for (const auto& kv : all_data_) { batch->Put(kv.first, CopyToEntityData(*kv.second)); } - callback.Run(std::move(batch)); + std::move(callback).Run(std::move(batch)); } std::string DeviceInfoSyncBridge::GetClientTag(const EntityData& entity_data) {
diff --git a/components/sync/model/fake_model_type_sync_bridge.cc b/components/sync/model/fake_model_type_sync_bridge.cc index 6f256471..41496a1d 100644 --- a/components/sync/model/fake_model_type_sync_bridge.cc +++ b/components/sync/model/fake_model_type_sync_bridge.cc
@@ -314,7 +314,7 @@ DCHECK(db_->HasData(key)) << "No data for " << key; batch->Put(key, CopyEntityData(db_->GetData(key))); } - callback.Run(std::move(batch)); + std::move(callback).Run(std::move(batch)); } void FakeModelTypeSyncBridge::GetAllData(DataCallback callback) { @@ -328,7 +328,7 @@ for (const auto& kv : db_->all_data()) { batch->Put(kv.first, CopyEntityData(*kv.second)); } - callback.Run(std::move(batch)); + std::move(callback).Run(std::move(batch)); } std::string FakeModelTypeSyncBridge::GetClientTag(
diff --git a/components/sync/model/model_type_sync_bridge.h b/components/sync/model/model_type_sync_bridge.h index 9cb1859..f3a85bd2 100644 --- a/components/sync/model/model_type_sync_bridge.h +++ b/components/sync/model/model_type_sync_bridge.h
@@ -34,7 +34,7 @@ // ReportError() method should be called instead of ModelReadyToSync(). class ModelTypeSyncBridge : public base::SupportsWeakPtr<ModelTypeSyncBridge> { public: - using DataCallback = base::Callback<void(std::unique_ptr<DataBatch>)>; + using DataCallback = base::OnceCallback<void(std::unique_ptr<DataBatch>)>; using StorageKeyList = std::vector<std::string>; using ChangeProcessorFactory = base::RepeatingCallback<std::unique_ptr< ModelTypeChangeProcessor>(ModelType type, ModelTypeSyncBridge* bridge)>;
diff --git a/components/sync/model_impl/shared_model_type_processor_unittest.cc b/components/sync/model_impl/shared_model_type_processor_unittest.cc index dbd881a2..3d0f6ea 100644 --- a/components/sync/model_impl/shared_model_type_processor_unittest.cc +++ b/components/sync/model_impl/shared_model_type_processor_unittest.cc
@@ -90,8 +90,7 @@ void OnPendingCommitDataLoaded() { ASSERT_TRUE(data_callback_); - data_callback_.Run(); - data_callback_.Reset(); + std::move(data_callback_).Run(); } void InitializeToReadyState() { @@ -133,11 +132,11 @@ void GetData(StorageKeyList keys, DataCallback callback) override { if (synchronous_data_callback_) { synchronous_data_callback_ = false; - FakeModelTypeSyncBridge::GetData(keys, callback); + FakeModelTypeSyncBridge::GetData(keys, std::move(callback)); } else { FakeModelTypeSyncBridge::GetData( - keys, base::Bind(&TestModelTypeSyncBridge::CaptureDataCallback, - base::Unretained(this), callback)); + keys, base::BindOnce(&TestModelTypeSyncBridge::CaptureDataCallback, + base::Unretained(this), std::move(callback))); } } @@ -145,7 +144,7 @@ void CaptureDataCallback(DataCallback callback, std::unique_ptr<DataBatch> data) { EXPECT_FALSE(data_callback_); - data_callback_ = base::Bind(callback, base::Passed(std::move(data))); + data_callback_ = base::BindOnce(std::move(callback), std::move(data)); } // The number of times MergeSyncData has been called. @@ -154,7 +153,7 @@ int get_storage_key_call_count_ = 0; // Stores the data callback between GetData() and OnPendingCommitDataLoaded(). - base::Closure data_callback_; + base::OnceClosure data_callback_; // Whether to return GetData results synchronously. Overrides the default // callback capture behavior if set to true.
diff --git a/components/sync/user_events/user_event_sync_bridge.cc b/components/sync/user_events/user_event_sync_bridge.cc index 6793eb6..18c2157 100644 --- a/components/sync/user_events/user_event_sync_bridge.cc +++ b/components/sync/user_events/user_event_sync_bridge.cc
@@ -125,13 +125,15 @@ void UserEventSyncBridge::GetData(StorageKeyList storage_keys, DataCallback callback) { - store_->ReadData(storage_keys, base::Bind(&UserEventSyncBridge::OnReadData, - base::AsWeakPtr(this), callback)); + store_->ReadData(storage_keys, + base::BindOnce(&UserEventSyncBridge::OnReadData, + base::AsWeakPtr(this), std::move(callback))); } void UserEventSyncBridge::GetAllData(DataCallback callback) { - store_->ReadAllData(base::Bind(&UserEventSyncBridge::OnReadAllData, - base::AsWeakPtr(this), callback)); + store_->ReadAllData(base::BindOnce(&UserEventSyncBridge::OnReadAllData, + base::AsWeakPtr(this), + std::move(callback))); } std::string UserEventSyncBridge::GetClientTag(const EntityData& entity_data) { @@ -144,8 +146,8 @@ void UserEventSyncBridge::DisableSync() { // No data should be retained through sign out. - store_->ReadAllData(base::Bind(&UserEventSyncBridge::OnReadAllDataToDelete, - base::AsWeakPtr(this))); + store_->ReadAllData(base::BindOnce( + &UserEventSyncBridge::OnReadAllDataToDelete, base::AsWeakPtr(this))); } void UserEventSyncBridge::RecordUserEvent( @@ -234,7 +236,7 @@ const base::Optional<ModelError>& error, std::unique_ptr<RecordList> data_records, std::unique_ptr<IdList> missing_id_list) { - OnReadAllData(callback, error, std::move(data_records)); + OnReadAllData(std::move(callback), error, std::move(data_records)); } void UserEventSyncBridge::OnReadAllData( @@ -258,7 +260,7 @@ return; } } - callback.Run(std::move(batch)); + std::move(callback).Run(std::move(batch)); } void UserEventSyncBridge::OnReadAllDataToDelete(
diff --git a/components/viz/client/OWNERS b/components/viz/client/OWNERS new file mode 100644 index 0000000..f370f05 --- /dev/null +++ b/components/viz/client/OWNERS
@@ -0,0 +1 @@ +per-file hit_test_data_provider*=file://components/viz/common/hit_test/OWNERS
diff --git a/components/viz/common/hit_test/OWNERS b/components/viz/common/hit_test/OWNERS new file mode 100644 index 0000000..9d72d25c --- /dev/null +++ b/components/viz/common/hit_test/OWNERS
@@ -0,0 +1 @@ +riajiang@chromium.org
diff --git a/components/viz/host/hit_test/OWNERS b/components/viz/host/hit_test/OWNERS new file mode 100644 index 0000000..e85219c1 --- /dev/null +++ b/components/viz/host/hit_test/OWNERS
@@ -0,0 +1 @@ +file://components/viz/common/hit_test/OWNERS
diff --git a/components/viz/service/hit_test/OWNERS b/components/viz/service/hit_test/OWNERS new file mode 100644 index 0000000..e85219c1 --- /dev/null +++ b/components/viz/service/hit_test/OWNERS
@@ -0,0 +1 @@ +file://components/viz/common/hit_test/OWNERS
diff --git a/content/browser/android/content_view_core.cc b/content/browser/android/content_view_core.cc index f60bb75..ed677cc 100644 --- a/content/browser/android/content_view_core.cc +++ b/content/browser/android/content_view_core.cc
@@ -295,8 +295,7 @@ const gfx::SizeF& viewport_size, const float content_offset, const float top_shown_pix, - bool top_changed, - bool is_mobile_optimized_hint) { + bool top_changed) { JNIEnv* env = AttachCurrentThread(); ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); if (obj.is_null() || !GetWindowAndroid()) @@ -316,8 +315,8 @@ Java_ContentViewCoreImpl_updateFrameInfo( env, obj, scroll_offset.x(), scroll_offset.y(), page_scale_factor, min_page_scale, max_page_scale, content_width, content_height, - viewport_size.width(), viewport_size.height(), top_shown_pix, top_changed, - is_mobile_optimized_hint); + viewport_size.width(), viewport_size.height(), top_shown_pix, + top_changed); } void ContentViewCore::RequestDisallowInterceptTouchEvent() {
diff --git a/content/browser/android/content_view_core.h b/content/browser/android/content_view_core.h index 238b6779..9522d19 100644 --- a/content/browser/android/content_view_core.h +++ b/content/browser/android/content_view_core.h
@@ -171,8 +171,7 @@ const gfx::SizeF& viewport_size, const float top_content_offset, const float top_shown_pix, - bool top_changed, - bool is_mobile_optimized_hint); + bool top_changed); void RequestDisallowInterceptTouchEvent();
diff --git a/content/browser/android/selection_popup_controller.cc b/content/browser/android/selection_popup_controller.cc index 9a7b795..4ebfcfc 100644 --- a/content/browser/android/selection_popup_controller.cc +++ b/content/browser/android/selection_popup_controller.cc
@@ -175,6 +175,16 @@ return true; } +void SelectionPopupController::OnShowUnhandledTapUIIfNeeded(int x_px, + int y_px) { + JNIEnv* env = AttachCurrentThread(); + ScopedJavaLocalRef<jobject> obj = java_obj_.get(env); + if (obj.is_null()) + return; + Java_SelectionPopupControllerImpl_onShowUnhandledTapUIIfNeeded( + env, obj, static_cast<jint>(x_px), static_cast<jint>(y_px)); +} + void SelectionPopupController::OnSelectWordAroundCaretAck(bool did_select, int start_adjust, int end_adjust) {
diff --git a/content/browser/android/selection_popup_controller.h b/content/browser/android/selection_popup_controller.h index 287626b..624ce0a 100644 --- a/content/browser/android/selection_popup_controller.h +++ b/content/browser/android/selection_popup_controller.h
@@ -38,6 +38,8 @@ void OnDragUpdate(const gfx::PointF& position); void OnSelectionChanged(const std::string& text); bool ShowSelectionMenu(const ContextMenuParams& params, int handle_height); + // |x| and |y| are in physical pixel scale. + void OnShowUnhandledTapUIIfNeeded(int x_px, int y_px); void OnSelectWordAroundCaretAck(bool did_select, int start_adjust, int end_adjust);
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc index 593f4613..3e1786a 100644 --- a/content/browser/browser_plugin/browser_plugin_guest.cc +++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -1020,15 +1020,18 @@ return; guest_visible_ = visible; - - // Do not use WebContents::UpdateWebContentsVisibility() because it ignores - // visibility changes that come before the first change to VISIBLE. - if (!guest_visible_ || embedder_visibility_ == Visibility::HIDDEN) + // TODO(fdoray): Simplify the logic below. https://crbug.com/668690 + if (!guest_visible_ || embedder_visibility_ == Visibility::HIDDEN) { GetWebContents()->WasHidden(); - else if (embedder_visibility_ == Visibility::VISIBLE) + } else if (embedder_visibility_ == Visibility::VISIBLE) { GetWebContents()->WasShown(); - else + if (GetWebContents()->GetVisibility() == Visibility::OCCLUDED) + GetWebContents()->WasUnOccluded(); + } else { + if (GetWebContents()->GetVisibility() == Visibility::HIDDEN) + GetWebContents()->WasShown(); GetWebContents()->WasOccluded(); + } } void BrowserPluginGuest::OnUnlockMouse() {
diff --git a/content/browser/loader/resource_dispatcher_host_browsertest.cc b/content/browser/loader/resource_dispatcher_host_browsertest.cc index fd267df..4054504 100644 --- a/content/browser/loader/resource_dispatcher_host_browsertest.cc +++ b/content/browser/loader/resource_dispatcher_host_browsertest.cc
@@ -610,6 +610,12 @@ // when encountering a meta refresh tag. IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest, PageTransitionClientRedirect) { +// TODO(crbug.com/818445): Fix the flakiness on Network Service. +#if defined(OS_LINUX) + if (base::FeatureList::IsEnabled(network::features::kNetworkService)) + return; +#endif + ASSERT_TRUE(embedded_test_server()->Start()); PageTransitionResourceDispatcherHostDelegate delegate(
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h index be7c85d..46eb2d3 100644 --- a/content/browser/renderer_host/browser_compositor_view_mac.h +++ b/content/browser/renderer_host/browser_compositor_view_mac.h
@@ -30,6 +30,7 @@ virtual void BrowserCompositorMacOnBeginFrame() = 0; virtual void OnFrameTokenChanged(uint32_t frame_token) = 0; virtual void DidReceiveFirstFrameAfterNavigation() = 0; + virtual void DestroyCompositorForShutdown() = 0; }; // This class owns a DelegatedFrameHost, and will dynamically attach and
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm index 07d42e6..7fcc24c 100644 --- a/content/browser/renderer_host/browser_compositor_view_mac.mm +++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -28,13 +28,15 @@ namespace { -// Set when no browser compositors should remain alive. -bool g_has_shut_down = false; - -// The number of placeholder objects allocated. If this reaches zero, then -// the RecyclableCompositorMac being held on to for recycling, -// |g_spare_recyclable_compositors|, will be freed. -uint32_t g_browser_compositor_count = 0; +// Weak pointers to all BrowserCompositorMac instances, used to +// - Determine if a spare RecyclableCompositorMac should be kept around (one +// should be only if there exists at least one BrowserCompositorMac). +// - Force all ui::Compositors to be destroyed at shut-down (because the NSView +// signals to shut down will come in very late, long after things that the +// ui::Compositor depend on have been destroyed). +// https://crbug.com/805726 +base::LazyInstance<std::set<BrowserCompositorMac*>>::Leaky + g_browser_compositors; // A spare RecyclableCompositorMac kept around for recycling. base::LazyInstance<base::circular_deque< @@ -46,7 +48,7 @@ while (g_spare_recyclable_compositors.Get().size() > 1) g_spare_recyclable_compositors.Get().pop_front(); - if (!g_browser_compositor_count) + if (g_browser_compositors.Get().empty()) g_spare_recyclable_compositors.Get().clear(); } @@ -69,10 +71,6 @@ // Delete a compositor, or allow it to be recycled. static void Recycle(std::unique_ptr<RecyclableCompositorMac> compositor); - // Indicate that the recyclable compositor should be destroyed, and no future - // compositors should be recycled. - static void DisableRecyclingForShutdown(); - ui::Compositor* compositor() { return &compositor_; } ui::AcceleratedWidgetMac* accelerated_widget_mac() { return accelerated_widget_mac_.get(); @@ -153,11 +151,6 @@ // static void RecyclableCompositorMac::Recycle( std::unique_ptr<RecyclableCompositorMac> compositor) { - // It is an error to have a browser compositor continue to exist after - // shutdown. - CHECK(!g_has_shut_down); - CHECK(compositor); - CHECK(content::ImageTransportFactory::GetInstance()); content::ImageTransportFactory::GetInstance() ->SetCompositorSuspendedForRecycle(compositor->compositor(), true); @@ -183,7 +176,7 @@ : client_(client), accelerated_widget_mac_ns_view_(accelerated_widget_mac_ns_view), weak_factory_(this) { - g_browser_compositor_count += 1; + g_browser_compositors.Get().insert(this); root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); delegated_frame_host_.reset(new DelegatedFrameHost( @@ -206,12 +199,12 @@ delegated_frame_host_.reset(); root_layer_.reset(); - DCHECK_GT(g_browser_compositor_count, 0u); - g_browser_compositor_count -= 1; + size_t num_erased = g_browser_compositors.Get().erase(this); + DCHECK_EQ(1u, num_erased); // If there are no compositors allocated, destroy the recyclable // RecyclableCompositorMac. - if (!g_browser_compositor_count) + if (g_browser_compositors.Get().empty()) g_spare_recyclable_compositors.Get().clear(); } @@ -411,7 +404,14 @@ // static void BrowserCompositorMac::DisableRecyclingForShutdown() { - g_has_shut_down = true; + // Ensure that the client has destroyed its BrowserCompositorViewMac before + // it dependencies are destroyed. + // https://crbug.com/805726 + while (!g_browser_compositors.Get().empty()) { + BrowserCompositorMac* browser_compositor = + *g_browser_compositors.Get().begin(); + browser_compositor->client_->DestroyCompositorForShutdown(); + } g_spare_recyclable_compositors.Get().clear(); }
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc index f7e4a35..efff513 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -556,6 +556,11 @@ prefs.background_video_track_optimization_enabled = base::FeatureList::IsEnabled(media::kBackgroundVideoTrackOptimization); + if (base::FeatureList::IsEnabled(media::kUseSurfaceLayerForVideo) && + base::FeatureList::IsEnabled(media::kPictureInPicture)) { + prefs.picture_in_picture_enabled = true; + } + GetContentClient()->browser()->OverrideWebkitPrefs(this, &prefs); return prefs; }
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc index d1c06adf..c843797 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.cc +++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -248,6 +248,8 @@ } bool handled = true; IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostViewAndroid, message) + IPC_MESSAGE_HANDLER(ViewHostMsg_ShowUnhandledTapUIIfNeeded, + OnShowUnhandledTapUIIfNeeded) IPC_MESSAGE_HANDLER(ViewHostMsg_SelectWordAroundCaretAck, OnSelectWordAroundCaretAck) IPC_MESSAGE_UNHANDLED(handled = false) @@ -380,6 +382,13 @@ return is_showing_ && content_view_core_; } +void RenderWidgetHostViewAndroid::OnShowUnhandledTapUIIfNeeded(int x_px, + int y_px) { + if (!selection_popup_controller_ || !content_view_core_) + return; + selection_popup_controller_->OnShowUnhandledTapUIIfNeeded(x_px, y_px); +} + void RenderWidgetHostViewAndroid::OnSelectWordAroundCaretAck(bool did_select, int start_adjust, int end_adjust) { @@ -1273,7 +1282,7 @@ frame_metadata.min_page_scale_factor, frame_metadata.max_page_scale_factor, root_layer_size_dip, scrollable_viewport_size_dip, top_content_offset_dip, top_shown_pix, - top_changed, is_mobile_optimized); + top_changed); EvictFrameIfNecessary(); }
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h index 94f1c32..908ea65 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.h +++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -295,6 +295,8 @@ void ShowContextMenuAtPoint(const gfx::Point& point, ui::MenuSourceType); void DismissTextHandles(); void SetTextHandlesTemporarilyHidden(bool hidden); + // |x_px| and |y_px| are in physical pixel scale. + void OnShowUnhandledTapUIIfNeeded(int x_px, int y_px); void OnSelectWordAroundCaretAck(bool did_select, int start_adjust, int end_adjust);
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h index cb8b3e00..f9510077 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -493,6 +493,7 @@ void BrowserCompositorMacOnBeginFrame() override; void OnFrameTokenChanged(uint32_t frame_token) override; void DidReceiveFirstFrameAfterNavigation() override; + void DestroyCompositorForShutdown() override; // AcceleratedWidgetMacNSView implementation. NSView* AcceleratedWidgetGetNSView() const override;
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 93d1b45..608f74a 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -401,6 +401,10 @@ render_widget_host_->DidReceiveFirstFrameAfterNavigation(); } +void RenderWidgetHostViewMac::DestroyCompositorForShutdown() { + browser_compositor_.reset(); +} + //////////////////////////////////////////////////////////////////////////////// // AcceleratedWidgetMacNSView, public: @@ -729,7 +733,7 @@ } void RenderWidgetHostViewMac::UpdateNSViewAndDisplayProperties() { - if (!render_widget_host_) + if (!browser_compositor_) return; // During auto-resize it is the responsibility of the caller to ensure that @@ -1729,8 +1733,10 @@ } void RenderWidgetHostViewMac::PauseForPendingResizeOrRepaintsAndDraw() { - if (!render_widget_host_ || render_widget_host_->is_hidden()) + if (!render_widget_host_ || !browser_compositor_ || + render_widget_host_->is_hidden()) { return; + } // Pausing for one view prevents others from receiving frames. // This may lead to large delays, causing overlaps. See crbug.com/352020. @@ -3483,6 +3489,12 @@ } - (void)viewDidMoveToWindow { + // This can be called very late during shutdown, so it needs to be guarded by + // a check that DestroyCompositorForShutdown has not yet been called. + // https://crbug.com/805726 + if (!renderWidgetHostView_->browser_compositor_) + return; + if ([self window]) [self updateScreenProperties]; renderWidgetHostView_->browser_compositor_->SetNSViewAttachedToWindow(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 6479acc..07c4e5d 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -531,6 +531,9 @@ last_sent_theme_color_(SK_ColorTRANSPARENT), did_first_visually_non_empty_paint_(false), capturer_count_(0), + should_normally_be_visible_(true), + should_normally_be_occluded_(false), + did_first_set_visible_(false), is_being_destroyed_(false), is_notifying_observers_(false), notify_disconnection_(false), @@ -1314,7 +1317,6 @@ void WebContentsImpl::IncrementCapturerCount(const gfx::Size& capture_size) { DCHECK(!is_being_destroyed_); - const bool was_captured = IsBeingCaptured(); ++capturer_count_; DVLOG(1) << "There are now " << capturer_count_ << " capturing(s) of WebContentsImpl@" << this; @@ -1326,14 +1328,8 @@ OnPreferredSizeChanged(preferred_size_); } - if (GetVisibility() != Visibility::VISIBLE && !was_captured) { - // Ensure that all views act as if they were visible before capture begins. - // TODO(fdoray): Replace RenderWidgetHostView::WasUnOccluded() with a method - // to explicitly notify the RenderWidgetHostView that capture began. - // https://crbug.com/668690 - for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) - view->WasUnOccluded(); - } + // Ensure that all views are un-occluded before capture begins. + DoWasUnOccluded(); } void WebContentsImpl::DecrementCapturerCount() { @@ -1350,12 +1346,13 @@ preferred_size_for_capture_ = gfx::Size(); OnPreferredSizeChanged(old_size); - if (visibility_ == Visibility::HIDDEN) { + if (IsHidden()) { DVLOG(1) << "Executing delayed WasHidden()."; WasHidden(); - } else if (visibility_ == Visibility::OCCLUDED) { - WasOccluded(); } + + if (should_normally_be_occluded_) + WasOccluded(); } } @@ -1466,6 +1463,8 @@ } void WebContentsImpl::WasShown() { + const Visibility previous_visibility = GetVisibility(); + controller_.SetActive(true); if (auto* view = GetRenderWidgetHostView()) { @@ -1481,10 +1480,13 @@ SendPageMessage(new PageMsg_WasShown(MSG_ROUTING_NONE)); last_active_time_ = base::TimeTicks::Now(); - SetVisibility(Visibility::VISIBLE); + should_normally_be_visible_ = true; + NotifyVisibilityChanged(previous_visibility); } void WebContentsImpl::WasHidden() { + const Visibility previous_visibility = GetVisibility(); + // If there are entities capturing screenshots or video (e.g., mirroring), // don't activate the "disable rendering" optimization. if (!IsBeingCaptured()) { @@ -1503,7 +1505,8 @@ SendPageMessage(new PageMsg_WasHidden(MSG_ROUTING_NONE)); } - SetVisibility(Visibility::HIDDEN); + should_normally_be_visible_ = false; + NotifyVisibilityChanged(previous_visibility); } #if defined(OS_ANDROID) @@ -1536,15 +1539,39 @@ #endif void WebContentsImpl::WasOccluded() { + const Visibility previous_visibility = GetVisibility(); + if (!IsBeingCaptured()) { for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) view->WasOccluded(); } - SetVisibility(Visibility::OCCLUDED); + + should_normally_be_occluded_ = true; + NotifyVisibilityChanged(previous_visibility); +} + +void WebContentsImpl::WasUnOccluded() { + const Visibility previous_visibility = GetVisibility(); + + if (!IsBeingCaptured()) + DoWasUnOccluded(); + + should_normally_be_occluded_ = false; + NotifyVisibilityChanged(previous_visibility); +} + +void WebContentsImpl::DoWasUnOccluded() { + // TODO(fdoray): Only call WasUnOccluded on frames in the active viewport. + for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) + view->WasUnOccluded(); } Visibility WebContentsImpl::GetVisibility() const { - return visibility_; + if (!should_normally_be_visible_) + return Visibility::HIDDEN; + if (should_normally_be_occluded_) + return Visibility::OCCLUDED; + return Visibility::VISIBLE; } bool WebContentsImpl::NeedToFireBeforeUnload() { @@ -1697,8 +1724,7 @@ // This is set before initializing the render manager since // RenderFrameHostManager::Init calls back into us via its delegate to ask if // it should be hidden. - visibility_ = - params.initially_hidden ? Visibility::HIDDEN : Visibility::VISIBLE; + should_normally_be_visible_ = !params.initially_hidden; // The routing ids must either all be set or all be unset. DCHECK((params.routing_id == MSG_ROUTING_NONE && @@ -3410,12 +3436,10 @@ } } -void WebContentsImpl::SetVisibility(Visibility visibility) { - const Visibility previous_visibility = visibility_; - visibility_ = visibility; - +void WebContentsImpl::NotifyVisibilityChanged(Visibility previous_visibility) { // Notify observers if the visibility changed or if WasShown() is being called // for the first time. + const Visibility visibility = GetVisibility(); if (visibility != previous_visibility || (visibility == Visibility::VISIBLE && !did_first_set_visible_)) { for (auto& observer : observers_) @@ -5757,7 +5781,7 @@ } bool WebContentsImpl::IsHidden() { - return !IsBeingCaptured() && visibility_ != Visibility::VISIBLE; + return !IsBeingCaptured() && !should_normally_be_visible_; } int WebContentsImpl::GetOuterDelegateFrameTreeNodeId() { @@ -6008,40 +6032,25 @@ return currently_playing_video_count_; } -void WebContentsImpl::UpdateWebContentsVisibility(Visibility visibility) { - // Occlusion can cause flakiness in browser tests. - static const bool occlusion_is_disabled = - base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableBackgroundingOccludedWindowsForTesting); - if (occlusion_is_disabled && visibility == Visibility::OCCLUDED) - visibility = Visibility::VISIBLE; - +void WebContentsImpl::UpdateWebContentsVisibility(bool visible) { if (!did_first_set_visible_) { - if (visibility == Visibility::VISIBLE) { - // A WebContents created with CreateParams::initially_hidden = false - // starts with GetVisibility() == Visibility::VISIBLE even though it is - // not really visible. Call WasShown() when it becomes visible for real as - // the page load mechanism and some WebContentsObserver rely on that. + // If this WebContents has not yet been set to be visible for the first + // time, ignore any requests to make it hidden, since resources would + // immediately be destroyed and only re-created after content loaded. In + // this state the window content is undefined and can show garbage. + // However, the page load mechanism requires an activation call through a + // visibility call to (re)load. + if (visible) { WasShown(); did_first_set_visible_ = true; } - - // Trust the initial visibility of the WebContents and do not switch it to - // HIDDEN or OCCLUDED before it becomes VISIBLE for real. Doing so would - // result in destroying resources that would immediately be recreated (e.g. - // UpdateWebContents(HIDDEN) can be called when a WebContents is added to a - // hidden window that is about to be shown). - return; } - - if (visibility == visibility_) + if (visible == should_normally_be_visible_) return; - if (visibility == Visibility::VISIBLE) + if (visible) WasShown(); - else if (visibility == Visibility::OCCLUDED) - WasOccluded(); else WasHidden(); }
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h index 54c77a2..84a01a83 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h
@@ -211,8 +211,8 @@ uint64_t upload_position, uint64_t upload_size); - // Set the visibility to |visibility| and notifies observers. - void SetVisibility(Visibility visibility); + // Notify observers that the visibility changed. + void NotifyVisibilityChanged(Visibility previous_visibility); // Notify observers that the web contents has been focused. void NotifyWebContentsFocused(RenderWidgetHost* render_widget_host); @@ -228,6 +228,8 @@ return screen_orientation_provider_.get(); } + bool should_normally_be_visible() { return should_normally_be_visible_; } + // Broadcasts the mode change to all frames. void SetAccessibilityMode(ui::AXMode mode); @@ -360,6 +362,7 @@ void WasShown() override; void WasHidden() override; void WasOccluded() override; + void WasUnOccluded() override; Visibility GetVisibility() const override; bool NeedToFireBeforeUnload() override; void DispatchBeforeUnload() override; @@ -878,7 +881,7 @@ } // Update the web contents visibility. - void UpdateWebContentsVisibility(Visibility visibility); + void UpdateWebContentsVisibility(bool visible); // Called by FindRequestManager when find replies come in from a renderer // process. @@ -1068,6 +1071,9 @@ // all the unique RenderWidgetHostViews. std::set<RenderWidgetHostView*> GetRenderWidgetHostViewsInTree(); + // Calls WasUnOccluded() on all RenderWidgetHostViews in the frame tree. + void DoWasUnOccluded(); + // Called with the result of a DownloadImage() request. void OnDidDownloadImage(const ImageDownloadCallback& callback, int id, @@ -1467,13 +1473,17 @@ // be told it is hidden. int capturer_count_; - // The visibility of the WebContents. Initialized from - // |CreateParams::initially_hidden|. Updated from - // UpdateWebContentsVisibility(), WasShown(), WasHidden(), WasOccluded(). - Visibility visibility_ = Visibility::VISIBLE; + // Tracks whether RWHV should be visible once capturer_count_ becomes zero. + bool should_normally_be_visible_; - // Whether there has been a call to UpdateWebContentsVisibility(VISIBLE). - bool did_first_set_visible_ = false; + // Tracks whether RWHV should be occluded once |capturer_count_| becomes zero. + bool should_normally_be_occluded_; + + // Tracks whether this WebContents was ever set to be visible. Used to + // facilitate WebContents being loaded in the background by setting + // |should_normally_be_visible_|. Ensures WasShown() will trigger when first + // becoming visible to the user, and prevents premature unloading. + bool did_first_set_visible_; // See getter above. bool is_being_destroyed_;
diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc index cdcaa68f..05abf08 100644 --- a/content/browser/web_contents/web_contents_impl_unittest.cc +++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -2735,114 +2735,78 @@ EXPECT_EQ(original_preferred_size, contents()->GetPreferredSize()); } -TEST_F(WebContentsImplTest, UpdateWebContentsVisibility) { +TEST_F(WebContentsImplTest, CapturerPreventsHiding) { + const gfx::Size original_preferred_size(1024, 768); + contents()->UpdatePreferredSize(original_preferred_size); + TestRenderWidgetHostView* view = static_cast<TestRenderWidgetHostView*>( main_test_rfh()->GetRenderViewHost()->GetWidget()->GetView()); - TestWebContentsObserver observer(contents()); + // With no capturers, setting and un-setting occlusion should change the + // view's occlusion state. EXPECT_FALSE(view->is_showing()); - EXPECT_FALSE(view->is_occluded()); - - // WebContents must be made visible once before it can be hidden. - contents()->UpdateWebContentsVisibility(Visibility::HIDDEN); + contents()->WasShown(); + EXPECT_TRUE(view->is_showing()); + contents()->WasHidden(); EXPECT_FALSE(view->is_showing()); - EXPECT_FALSE(view->is_occluded()); - EXPECT_EQ(Visibility::VISIBLE, contents()->GetVisibility()); - - contents()->UpdateWebContentsVisibility(Visibility::VISIBLE); + contents()->WasShown(); EXPECT_TRUE(view->is_showing()); - EXPECT_FALSE(view->is_occluded()); - EXPECT_EQ(Visibility::VISIBLE, contents()->GetVisibility()); - // Hiding/occluding/showing the WebContents should hide and show |view|. - contents()->UpdateWebContentsVisibility(Visibility::HIDDEN); + // Add a capturer and try to hide the contents. The view will remain visible. + contents()->IncrementCapturerCount(gfx::Size()); + contents()->WasHidden(); + EXPECT_TRUE(view->is_showing()); + + // Remove the capturer, and the WasHidden should take effect. + contents()->DecrementCapturerCount(); EXPECT_FALSE(view->is_showing()); - EXPECT_FALSE(view->is_occluded()); - EXPECT_EQ(Visibility::HIDDEN, contents()->GetVisibility()); - - contents()->UpdateWebContentsVisibility(Visibility::VISIBLE); - EXPECT_TRUE(view->is_showing()); - EXPECT_FALSE(view->is_occluded()); - EXPECT_EQ(Visibility::VISIBLE, contents()->GetVisibility()); - - contents()->UpdateWebContentsVisibility(Visibility::OCCLUDED); - EXPECT_TRUE(view->is_showing()); - EXPECT_TRUE(view->is_occluded()); - EXPECT_EQ(Visibility::OCCLUDED, contents()->GetVisibility()); - - contents()->UpdateWebContentsVisibility(Visibility::VISIBLE); - EXPECT_TRUE(view->is_showing()); - EXPECT_FALSE(view->is_occluded()); - EXPECT_EQ(Visibility::VISIBLE, contents()->GetVisibility()); - - contents()->UpdateWebContentsVisibility(Visibility::OCCLUDED); - EXPECT_TRUE(view->is_showing()); - EXPECT_TRUE(view->is_occluded()); - EXPECT_EQ(Visibility::OCCLUDED, contents()->GetVisibility()); - - contents()->UpdateWebContentsVisibility(Visibility::HIDDEN); - EXPECT_FALSE(view->is_showing()); - EXPECT_EQ(Visibility::HIDDEN, contents()->GetVisibility()); } -namespace { +TEST_F(WebContentsImplTest, CapturerPreventsOcclusion) { + const gfx::Size original_preferred_size(1024, 768); + contents()->UpdatePreferredSize(original_preferred_size); -void HideOrOccludeWithCapturerTest(WebContentsImpl* contents, - Visibility hidden_or_occluded) { TestRenderWidgetHostView* view = static_cast<TestRenderWidgetHostView*>( - contents->GetRenderWidgetHostView()); + main_test_rfh()->GetRenderViewHost()->GetWidget()->GetView()); - EXPECT_FALSE(view->is_showing()); - - // WebContents must be made visible once before it can be hidden. - contents->UpdateWebContentsVisibility(Visibility::VISIBLE); - EXPECT_TRUE(view->is_showing()); + // With no capturers, setting and un-setting occlusion should change the + // view's occlusion state. EXPECT_FALSE(view->is_occluded()); - EXPECT_EQ(Visibility::VISIBLE, contents->GetVisibility()); - - // Add a capturer when the contents is visible and then hide the contents. - // |view| should remain visible. - contents->IncrementCapturerCount(gfx::Size()); - contents->UpdateWebContentsVisibility(hidden_or_occluded); - EXPECT_TRUE(view->is_showing()); + contents()->WasOccluded(); + EXPECT_TRUE(view->is_occluded()); + contents()->WasUnOccluded(); EXPECT_FALSE(view->is_occluded()); - EXPECT_EQ(hidden_or_occluded, contents->GetVisibility()); + contents()->WasOccluded(); + EXPECT_TRUE(view->is_occluded()); - // Remove the capturer when the contents is hidden/occluded. |view| should be - // hidden/occluded. - contents->DecrementCapturerCount(); - if (hidden_or_occluded == Visibility::HIDDEN) { - EXPECT_FALSE(view->is_showing()); - } else { - EXPECT_TRUE(view->is_showing()); - EXPECT_TRUE(view->is_occluded()); - } - - // Add a capturer when the contents is hidden. |view| should be unoccluded. - contents->IncrementCapturerCount(gfx::Size()); + // Adding a capturer on an occluded WebContents should cause the view to be + // unoccluded. Removing the capturer should cause the view to be occluded + // again. + contents()->IncrementCapturerCount(gfx::Size()); EXPECT_FALSE(view->is_occluded()); - // Show the contents. The view should be visible. - contents->UpdateWebContentsVisibility(Visibility::VISIBLE); - EXPECT_TRUE(view->is_showing()); + contents()->DecrementCapturerCount(); + EXPECT_TRUE(view->is_occluded()); + + // Adding a capturer on an unoccluded WebContents should not change the + // occlusion state of the view. Calling WasOccluded() on an unoccluded + // WebContents() that has a capturer should not change the occlusion state of + // the view. Removing the capturer should cause the view to become occluded. + contents()->WasUnOccluded(); EXPECT_FALSE(view->is_occluded()); - EXPECT_EQ(Visibility::VISIBLE, contents->GetVisibility()); - - // Remove the capturer when the contents is visible. The view should remain - // visible. - contents->DecrementCapturerCount(); - EXPECT_TRUE(view->is_showing()); + contents()->IncrementCapturerCount(gfx::Size()); EXPECT_FALSE(view->is_occluded()); -} -} // namespace + contents()->WasOccluded(); + EXPECT_FALSE(view->is_occluded()); -TEST_F(WebContentsImplTest, HideWithCapturer) { - HideOrOccludeWithCapturerTest(contents(), Visibility::HIDDEN); -} + contents()->DecrementCapturerCount(); + EXPECT_TRUE(view->is_occluded()); -TEST_F(WebContentsImplTest, OccludeWithCapturer) { - HideOrOccludeWithCapturerTest(contents(), Visibility::OCCLUDED); + // Calling WasUnoccluded() on a WebContents with no capturers should cause the + // view to become unoccluded. + contents()->WasUnOccluded(); + EXPECT_FALSE(view->is_occluded()); } // Tests that GetLastActiveTime starts with a real, non-zero time and updates
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc index 13d687ea..5d28247a 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -60,7 +60,6 @@ #include "ui/aura/env.h" #include "ui/aura/window.h" #include "ui/aura/window_observer.h" -#include "ui/aura/window_occlusion_tracker.h" #include "ui/aura/window_tree_host.h" #include "ui/aura/window_tree_host_observer.h" #include "ui/base/clipboard/clipboard.h" @@ -425,10 +424,13 @@ intptr_t old) override { if (key != aura::client::kMirroringEnabledKey) return; - if (window->GetProperty(aura::client::kMirroringEnabledKey)) + if (window->GetProperty(aura::client::kMirroringEnabledKey)) { view_->web_contents_->IncrementCapturerCount(gfx::Size()); - else + view_->web_contents_->UpdateWebContentsVisibility(true); + } else { view_->web_contents_->DecrementCapturerCount(); + view_->web_contents_->UpdateWebContentsVisibility(window->IsVisible()); + } } // Overridden WindowTreeHostObserver: @@ -495,6 +497,7 @@ return; window_observer_.reset(); + window_->RemoveObserver(this); // Window needs a valid delegate during its destructor, so we explicitly // delete it here. @@ -736,6 +739,7 @@ window_->SetType(aura::client::WINDOW_TYPE_CONTROL); window_->SetName("WebContentsViewAura"); window_->Init(ui::LAYER_NOT_DRAWN); + window_->AddObserver(this); aura::Window* root_window = context ? context->GetRootWindow() : nullptr; if (root_window) { // There are places where there is no context currently because object @@ -750,7 +754,6 @@ root_window->GetBoundsInScreen()); } window_->layer()->SetMasksToBounds(true); - aura::WindowOcclusionTracker::Track(window_.get()); // WindowObserver is not interesting and is problematic for Browser Plugin // guests. @@ -1102,16 +1105,6 @@ void WebContentsViewAura::OnWindowTargetVisibilityChanged(bool visible) { } -void WebContentsViewAura::OnWindowOcclusionChanged( - aura::Window::OcclusionState occlusion_state) { - web_contents_->UpdateWebContentsVisibility( - occlusion_state == aura::Window::OcclusionState::VISIBLE - ? content::Visibility::VISIBLE - : (occlusion_state == aura::Window::OcclusionState::OCCLUDED - ? content::Visibility::OCCLUDED - : content::Visibility::HIDDEN)); -} - bool WebContentsViewAura::HasHitTestMask() const { return false; } @@ -1283,6 +1276,19 @@ return ConvertFromWeb(current_drag_op_); } +void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, + bool visible) { + // Ignore any visibility changes in the hierarchy below. + if (window != window_.get() && window_->Contains(window)) + return; + + // |visible| indicates whether |window| (which points to |window_| or one of + // its ancestors) is visible within its parent. What we really need is + // |window_->IsVisible()|, which indicates whether |window_| and all its + // ancestors are visible. + web_contents_->UpdateWebContentsVisibility(window_->IsVisible()); +} + #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) void WebContentsViewAura::ShowPopupMenu(RenderFrameHost* render_frame_host, const gfx::Rect& bounds,
diff --git a/content/browser/web_contents/web_contents_view_aura.h b/content/browser/web_contents/web_contents_view_aura.h index 2371c819..50c22b1 100644 --- a/content/browser/web_contents/web_contents_view_aura.h +++ b/content/browser/web_contents/web_contents_view_aura.h
@@ -19,8 +19,12 @@ #include "content/common/content_export.h" #include "content/common/features.h" #include "ui/aura/client/drag_drop_delegate.h" -#include "ui/aura/window.h" #include "ui/aura/window_delegate.h" +#include "ui/aura/window_observer.h" + +namespace aura { +class Window; +} namespace ui { class DropTargetEvent; @@ -42,7 +46,8 @@ public RenderViewHostDelegateView, public OverscrollControllerDelegate, public aura::WindowDelegate, - public aura::client::DragDropDelegate { + public aura::client::DragDropDelegate, + public aura::WindowObserver { public: WebContentsViewAura(WebContentsImpl* web_contents, WebContentsViewDelegate* delegate); @@ -176,8 +181,6 @@ void OnWindowDestroying(aura::Window* window) override; void OnWindowDestroyed(aura::Window* window) override; void OnWindowTargetVisibilityChanged(bool visible) override; - void OnWindowOcclusionChanged( - aura::Window::OcclusionState occlusion_state) override; bool HasHitTestMask() const override; void GetHitTestMask(gfx::Path* mask) const override; @@ -191,6 +194,9 @@ void OnDragExited() override; int OnPerformDrop(const ui::DropTargetEvent& event) override; + // Overridden from aura::WindowObserver: + void OnWindowVisibilityChanged(aura::Window* window, bool visible) override; + FRIEND_TEST_ALL_PREFIXES(WebContentsViewAuraTest, EnableDisableOverscroll); const bool is_mus_browser_plugin_guest_;
diff --git a/content/browser/web_contents/web_contents_view_aura_browsertest.cc b/content/browser/web_contents/web_contents_view_aura_browsertest.cc index 52de24f..251e045 100644 --- a/content/browser/web_contents/web_contents_view_aura_browsertest.cc +++ b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
@@ -924,6 +924,19 @@ EXPECT_FALSE(controller.CanGoForward()); } +// Verify that hiding a parent of the renderer will hide the content too. +IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, HideContentOnParenHide) { + ASSERT_NO_FATAL_FAILURE(StartTestWithPage("/title1.html")); + WebContentsImpl* web_contents = + static_cast<WebContentsImpl*>(shell()->web_contents()); + aura::Window* content = web_contents->GetNativeView()->parent(); + EXPECT_TRUE(web_contents->should_normally_be_visible()); + content->Hide(); + EXPECT_FALSE(web_contents->should_normally_be_visible()); + content->Show(); + EXPECT_TRUE(web_contents->should_normally_be_visible()); +} + // Ensure that SnapToPhysicalPixelBoundary() is called on WebContentsView parent // change. This is a regression test for http://crbug.com/388908. // Disabled due to flakiness: https://crbug.com/807107.
diff --git a/content/browser/web_contents/web_contents_view_aura_unittest.cc b/content/browser/web_contents/web_contents_view_aura_unittest.cc index 655f084e..fb4d3da 100644 --- a/content/browser/web_contents/web_contents_view_aura_unittest.cc +++ b/content/browser/web_contents/web_contents_view_aura_unittest.cc
@@ -4,24 +4,16 @@ #include "content/browser/web_contents/web_contents_view_aura.h" -#include <memory> - #include "base/command_line.h" #include "base/test/scoped_command_line.h" #include "content/browser/web_contents/web_contents_impl.h" #include "content/public/test/test_renderer_host.h" #include "testing/gtest/include/gtest/gtest.h" -#include "ui/aura/test/test_windows.h" #include "ui/aura/window.h" #include "ui/display/display_switches.h" -#include "ui/gfx/geometry/rect.h" namespace content { -namespace { -constexpr gfx::Rect kBounds = gfx::Rect(0, 0, 20, 20); -} // namespace - class WebContentsViewAuraTest : public RenderViewHostTestHarness { public: WebContentsViewAuraTest() = default; @@ -29,8 +21,6 @@ void SetUp() override { RenderViewHostTestHarness::SetUp(); - root_window()->SetBounds(kBounds); - web_contents()->GetNativeView()->SetBounds(kBounds); web_contents()->GetNativeView()->Show(); root_window()->AddChild(web_contents()->GetNativeView()); } @@ -57,18 +47,4 @@ EXPECT_EQ(web_contents()->GetVisibility(), content::Visibility::VISIBLE); } -TEST_F(WebContentsViewAuraTest, OccludeView) { - // |other_window| occludes |web_contents()| when it's shown. - std::unique_ptr<aura::Window> other_window( - aura::test::CreateTestWindowWithDelegateAndType( - nullptr, aura::client::WINDOW_TYPE_NORMAL, 0, kBounds, root_window(), - false)); - - EXPECT_EQ(web_contents()->GetVisibility(), Visibility::VISIBLE); - other_window->Show(); - EXPECT_EQ(web_contents()->GetVisibility(), Visibility::OCCLUDED); - other_window->Hide(); - EXPECT_EQ(web_contents()->GetVisibility(), Visibility::VISIBLE); -} - } // namespace content
diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm index 6a9ee15..d353359 100644 --- a/content/browser/web_contents/web_contents_view_mac.mm +++ b/content/browser/web_contents/web_contents_view_mac.mm
@@ -8,6 +8,7 @@ #include <string> +#include "base/command_line.h" #import "base/mac/mac_util.h" #import "base/mac/scoped_sending_event.h" #include "base/mac/sdk_forward_declarations.h" @@ -25,6 +26,7 @@ #include "content/public/browser/interstitial_page.h" #include "content/public/browser/web_contents_delegate.h" #include "content/public/browser/web_contents_view_delegate.h" +#include "content/public/common/content_switches.h" #include "skia/ext/skia_utils_mac.h" #import "third_party/mozilla/NSPasteboard+Utils.h" #include "ui/base/clipboard/custom_data_helper.h" @@ -663,12 +665,8 @@ if (!webContents || webContents->IsBeingDestroyed()) return; - if ([self isHiddenOrHasHiddenAncestor] || ![self window]) - webContents->UpdateWebContentsVisibility(content::Visibility::HIDDEN); - else if ([[self window] occlusionState] & NSWindowOcclusionStateVisible) - webContents->UpdateWebContentsVisibility(content::Visibility::VISIBLE); - else - webContents->UpdateWebContentsVisibility(content::Visibility::OCCLUDED); + const bool viewVisible = [self window] && ![self isHiddenOrHasHiddenAncestor]; + webContents->UpdateWebContentsVisibility(viewVisible); } - (void)resizeSubviewsWithOldSize:(NSSize)oldBoundsSize { @@ -689,25 +687,42 @@ - (void)viewWillMoveToWindow:(NSWindow*)newWindow { NSWindow* oldWindow = [self window]; + NSNotificationCenter* notificationCenter = [NSNotificationCenter defaultCenter]; - if (oldWindow) { - [notificationCenter - removeObserver:self - name:NSWindowDidChangeOcclusionStateNotification - object:oldWindow]; - } - if (newWindow) { - [notificationCenter addObserver:self - selector:@selector(windowChangedOcclusionState:) - name:NSWindowDidChangeOcclusionStateNotification - object:newWindow]; + // Occlusion is highly undesirable for browser tests, since it will + // flakily change test behavior. + static bool isDisabled = base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableBackgroundingOccludedWindowsForTesting); + + if (!isDisabled) { + if (oldWindow) { + [notificationCenter + removeObserver:self + name:NSWindowDidChangeOcclusionStateNotification + object:oldWindow]; + } + if (newWindow) { + [notificationCenter + addObserver:self + selector:@selector(windowChangedOcclusionState:) + name:NSWindowDidChangeOcclusionStateNotification + object:newWindow]; + } } } - (void)windowChangedOcclusionState:(NSNotification*)notification { - [self updateWebContentsVisibility]; + NSWindow* window = [notification object]; + WebContentsImpl* webContents = [self webContents]; + if (window && webContents && !webContents->IsBeingDestroyed()) { + if ([window occlusionState] & NSWindowOcclusionStateVisible) { + webContents->WasUnOccluded(); + } else { + webContents->WasOccluded(); + } + } } - (void)viewDidMoveToWindow {
diff --git a/content/browser/web_contents/web_contents_view_mac_unittest.mm b/content/browser/web_contents/web_contents_view_mac_unittest.mm index d18ac92..0b1dd34 100644 --- a/content/browser/web_contents/web_contents_view_mac_unittest.mm +++ b/content/browser/web_contents/web_contents_view_mac_unittest.mm
@@ -5,23 +5,15 @@ #import "content/browser/web_contents/web_contents_view_mac.h" #include "base/mac/scoped_nsobject.h" -#include "base/macros.h" -#include "content/public/browser/web_contents.h" -#include "content/public/test/test_renderer_host.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" -#include "ui/base/test/cocoa_helper.h" #import "ui/base/test/cocoa_helper.h" -namespace content { - namespace { class WebContentsViewCocoaTest : public ui::CocoaTest { }; -} // namespace - TEST_F(WebContentsViewCocoaTest, NonWebDragSourceTest) { base::scoped_nsobject<WebContentsViewCocoa> view( [[WebContentsViewCocoa alloc] init]); @@ -36,40 +28,4 @@ [view draggingSourceOperationMaskForLocal:NO]); } -namespace { - -class WebContentsViewMacTest : public RenderViewHostTestHarness { - protected: - WebContentsViewMacTest() = default; - - void SetUp() override { - RenderViewHostTestHarness::SetUp(); - window_.reset([[CocoaTestHelperWindow alloc] init]); - [[window_ contentView] addSubview:web_contents()->GetNativeView()]; - } - - base::scoped_nsobject<CocoaTestHelperWindow> window_; - - private: - DISALLOW_COPY_AND_ASSIGN(WebContentsViewMacTest); -}; - } // namespace - -TEST_F(WebContentsViewMacTest, ShowHideParent) { - EXPECT_EQ(Visibility::VISIBLE, web_contents()->GetVisibility()); - [[window_ contentView] setHidden:YES]; - EXPECT_EQ(Visibility::HIDDEN, web_contents()->GetVisibility()); - [[window_ contentView] setHidden:NO]; - EXPECT_EQ(Visibility::VISIBLE, web_contents()->GetVisibility()); -} - -TEST_F(WebContentsViewMacTest, OccludeView) { - EXPECT_EQ(Visibility::VISIBLE, web_contents()->GetVisibility()); - [window_ setPretendIsOccluded:YES]; - EXPECT_EQ(Visibility::OCCLUDED, web_contents()->GetVisibility()); - [window_ setPretendIsOccluded:NO]; - EXPECT_EQ(Visibility::VISIBLE, web_contents()->GetVisibility()); -} - -} // namespace content
diff --git a/content/common/view_messages.h b/content/common/view_messages.h index faa5558..4d4d304a 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h
@@ -760,7 +760,14 @@ int /* start_adjust */, int /* end_adjust */) -#if defined(OS_MACOSX) +#if defined(OS_ANDROID) +// Notifies that an unhandled tap has occurred at the specified x,y position +// and that the UI may need to be triggered. +IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowUnhandledTapUIIfNeeded, + int /* x */, + int /* y */) + +#elif defined(OS_MACOSX) // Receives content of a web page as plain text. IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string) #endif
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCoreImpl.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCoreImpl.java index c76074b..b6f5ad5 100644 --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCoreImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCoreImpl.java
@@ -89,7 +89,6 @@ private void resetPopupsAndInput() { ContentViewCoreImpl contentViewCore = mWeakContentViewCore.get(); if (contentViewCore == null) return; - contentViewCore.mIsMobileOptimizedHint = false; contentViewCore.hidePopupsAndClearSelection(); contentViewCore.resetScrollInProgress(); } @@ -155,8 +154,6 @@ // Cached copy of all positions and scales as reported by the renderer. private RenderCoordinates mRenderCoordinates; - private boolean mIsMobileOptimizedHint; - private boolean mPreserveSelectionOnNextLossOfFocus; // Notifies the ContentViewCore when platform closed caption settings have changed @@ -833,9 +830,8 @@ private void updateFrameInfo(float scrollOffsetX, float scrollOffsetY, float pageScaleFactor, float minPageScaleFactor, float maxPageScaleFactor, float contentWidth, float contentHeight, float viewportWidth, float viewportHeight, float topBarShownPix, - boolean topBarChanged, boolean isMobileOptimizedHint) { + boolean topBarChanged) { TraceEvent.begin("ContentViewCore:updateFrameInfo"); - mIsMobileOptimizedHint = isMobileOptimizedHint; final boolean contentSizeChanged = contentWidth != mRenderCoordinates.getContentWidthCss() || contentHeight != mRenderCoordinates.getContentHeightCss(); final boolean scaleLimitsChanged = @@ -913,11 +909,6 @@ settings.getTextTrackTextSize()); } - @Override - public boolean getIsMobileOptimizedHint() { - return mIsMobileOptimizedHint; - } - /** * Reset scroll and fling accounting, notifying listeners as appropriate. * This is useful as a failsafe when the input stream may have been interruped.
diff --git a/content/public/android/java/src/org/chromium/content/browser/remoteobjects/RemoteObjectImpl.java b/content/public/android/java/src/org/chromium/content/browser/remoteobjects/RemoteObjectImpl.java index 2018f89e..5dcd0f8 100644 --- a/content/public/android/java/src/org/chromium/content/browser/remoteobjects/RemoteObjectImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/remoteobjects/RemoteObjectImpl.java
@@ -4,6 +4,8 @@ package org.chromium.content.browser.remoteobjects; +import android.support.annotation.IntDef; + import org.chromium.blink.mojom.RemoteInvocationArgument; import org.chromium.blink.mojom.RemoteInvocationError; import org.chromium.blink.mojom.RemoteInvocationResult; @@ -13,7 +15,10 @@ import org.chromium.mojo_base.mojom.String16; import java.lang.annotation.Annotation; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; import java.lang.ref.WeakReference; +import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; @@ -135,7 +140,7 @@ Class<?>[] parameterTypes = method.getParameterTypes(); Object[] args = new Object[numArguments]; for (int i = 0; i < numArguments; i++) { - args[i] = convertArgument(arguments[i], parameterTypes[i]); + args[i] = convertArgument(arguments[i], parameterTypes[i], StringCoercionMode.COERCE); } Object result = null; @@ -192,7 +197,20 @@ return null; } - private Object convertArgument(RemoteInvocationArgument argument, Class<?> parameterType) { + @IntDef({StringCoercionMode.DO_NOT_COERCE, StringCoercionMode.COERCE}) + @Retention(RetentionPolicy.SOURCE) + private @interface StringCoercionMode { + // Do not coerce non-strings to string; instead produce null. + // Used when coercing arguments inside arrays. + int DO_NOT_COERCE = 0; + + // Coerce into strings more aggressively. Applied when the parameter type is + // java.lang.String exactly. + int COERCE = 1; + } + + private Object convertArgument(RemoteInvocationArgument argument, Class<?> parameterType, + @StringCoercionMode int stringCoercionMode) { switch (argument.which()) { case RemoteInvocationArgument.Tag.NumberValue: // See http://jdk6.java.net/plugin2/liveconnect/#JS_NUMBER_VALUES. @@ -225,9 +243,9 @@ // requires converting to false for 0 or NaN, true otherwise. return false; } else if (parameterType == String.class) { - // TODO(jbroman): Don't coerce to string if this is inside the conversion of an - // array. - return doubleToString(numberValue); + return stringCoercionMode == StringCoercionMode.COERCE + ? doubleToString(numberValue) + : null; } else if (parameterType.isArray()) { // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to null. Spec // requires raising a JavaScript exception. @@ -248,7 +266,9 @@ // non-boolean primitive types. Spec requires converting to 0 or 1. return getPrimitiveZero(parameterType); } else if (parameterType == String.class) { - return Boolean.toString(booleanValue); + return stringCoercionMode == StringCoercionMode.COERCE + ? Boolean.toString(booleanValue) + : null; } else if (parameterType.isArray()) { return null; } else { @@ -281,9 +301,8 @@ if (parameterType == String.class) { // LIVECONNECT_COMPLIANCE: Existing behavior is to convert undefined to // "undefined". Spec requires converting undefined to NULL. - // TODO(jbroman): Don't coerce undefined to string if this is inside the - // conversion of an array. - return argument.getSingletonValue() == SingletonJavaScriptValue.UNDEFINED + return (argument.getSingletonValue() == SingletonJavaScriptValue.UNDEFINED + && stringCoercionMode == StringCoercionMode.COERCE) ? "undefined" : null; } else if (parameterType.isPrimitive()) { @@ -295,6 +314,34 @@ } else { return null; } + case RemoteInvocationArgument.Tag.ArrayValue: + RemoteInvocationArgument[] arrayValue = argument.getArrayValue(); + if (parameterType.isArray()) { + Class<?> componentType = parameterType.getComponentType(); + + // LIVECONNECT_COMPLIANCE: Existing behavior is to return null for + // multi-dimensional and object arrays. Spec requires handling them. + if (!componentType.isPrimitive() && componentType != String.class) { + return null; + } + + Object result = Array.newInstance(componentType, arrayValue.length); + for (int i = 0; i < arrayValue.length; i++) { + Object element = convertArgument( + arrayValue[i], componentType, StringCoercionMode.DO_NOT_COERCE); + Array.set(result, i, element); + } + return result; + } else if (parameterType == String.class) { + return stringCoercionMode == StringCoercionMode.COERCE ? "undefined" : null; + } else if (parameterType.isPrimitive()) { + return getPrimitiveZero(parameterType); + } else { + // LIVECONNECT_COMPLIANCE: Existing behavior is to pass null. Spec requires + // converting if the target type is netscape.javascript.JSObject, otherwise + // raising a JavaScript exception. + return null; + } default: throw new RuntimeException("invalid wire argument type"); }
diff --git a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java index cf91254d..d7275dc1 100644 --- a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java
@@ -1293,6 +1293,14 @@ } @CalledByNative + private void onShowUnhandledTapUIIfNeeded(int x, int y) { + if (x < 0 || y < 0 || mView.getWidth() < x || mView.getHeight() < y) return; + if (mSelectionClient != null) { + mSelectionClient.showUnhandledTapUIIfNeeded(x, y); + } + } + + @CalledByNative private void onSelectWordAroundCaretAck(boolean didSelect, int startAdjust, int endAdjust) { if (mSelectionClient != null) { mSelectionClient.selectWordAroundCaretAck(didSelect, startAdjust, endAdjust);
diff --git a/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionClient.java b/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionClient.java index 8c2aeb18..ba53a73 100644 --- a/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionClient.java +++ b/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionClient.java
@@ -84,6 +84,9 @@ public void onSelectionEvent(int eventType, float posXPix, float posYPix) {} @Override + public void showUnhandledTapUIIfNeeded(int x, int y) {} + + @Override public void selectWordAroundCaretAck(boolean didSelect, int startAdjust, int endAdjust) {} @Override
diff --git a/content/public/android/java/src/org/chromium/content_public/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content_public/browser/ContentViewCore.java index 7be1202a..c4ec663c 100644 --- a/content/public/android/java/src/org/chromium/content_public/browser/ContentViewCore.java +++ b/content/public/android/java/src/org/chromium/content_public/browser/ContentViewCore.java
@@ -319,13 +319,6 @@ */ void preserveSelectionOnNextLossOfFocus(); - /** - * @return Whether the current page seems to be mobile-optimized. This hint is based upon - * rendered frames and may return different values when called multiple times for the - * same page (particularly during page load). - */ - boolean getIsMobileOptimizedHint(); - // Test-only methods /**
diff --git a/content/public/android/java/src/org/chromium/content_public/browser/SelectionClient.java b/content/public/android/java/src/org/chromium/content_public/browser/SelectionClient.java index de94de6..2ef0cafb 100644 --- a/content/public/android/java/src/org/chromium/content_public/browser/SelectionClient.java +++ b/content/public/android/java/src/org/chromium/content_public/browser/SelectionClient.java
@@ -97,6 +97,13 @@ void onSelectionEvent(int eventType, float posXPix, float posYPix); /** + * Requests to show the UI for an unhandled tap, if needed. + * @param x The x coordinate of the tap. + * @param y The y coordinate of the tap. + */ + void showUnhandledTapUIIfNeeded(int x, int y); + + /** * Acknowledges that a selectWordAroundCaret action has completed with the given result. * @param didSelect Whether a word was actually selected or not. * @param startAdjust The adjustment to the selection start offset needed to select the word.
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreSelectionTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreSelectionTest.java index 6016472..ead7bd22 100644 --- a/content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreSelectionTest.java +++ b/content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreSelectionTest.java
@@ -74,6 +74,9 @@ public void onSelectionEvent(int eventType, float posXPix, float poxYPix) {} @Override + public void showUnhandledTapUIIfNeeded(int x, int y) {} + + @Override public void selectWordAroundCaretAck(boolean didSelect, int startAdjust, int endAdjust) {} @Override
diff --git a/content/public/android/junit/src/org/chromium/content/browser/remoteobjects/RemoteObjectImplTest.java b/content/public/android/junit/src/org/chromium/content/browser/remoteobjects/RemoteObjectImplTest.java index ca8b2a6..de91d2c2 100644 --- a/content/public/android/junit/src/org/chromium/content/browser/remoteobjects/RemoteObjectImplTest.java +++ b/content/public/android/junit/src/org/chromium/content/browser/remoteobjects/RemoteObjectImplTest.java
@@ -346,6 +346,14 @@ mConsumer.accept(oa); } @TestJavascriptInterface + public void consumeIntArray(int[] ia) { + mConsumer.accept(ia); + } + @TestJavascriptInterface + public void consumeStringArray(String[] sa) { + mConsumer.accept(sa); + } + @TestJavascriptInterface public void consumeObject(Object o) { mConsumer.accept(o); } @@ -564,6 +572,44 @@ verify(consumer, times(2)).accept(null); } + @Test + public void testArgumentConversionArray() { + final Consumer<Object> consumer = (Consumer<Object>) mock(Consumer.class); + Object target = new VariantConsumer(consumer); + + RemoteObject remoteObject = new RemoteObjectImpl(target, TestJavascriptInterface.class); + RemoteObject.InvokeMethodResponse response = mock(RemoteObject.InvokeMethodResponse.class); + RemoteInvocationArgument args[] = { + arrayArgument(numberArgument(3.14159), booleanArgument(true), + stringArgument("Hello"), arrayArgument(), undefinedArgument())}; + remoteObject.invokeMethod("consumeByte", args, response); + remoteObject.invokeMethod("consumeChar", args, response); + remoteObject.invokeMethod("consumeShort", args, response); + remoteObject.invokeMethod("consumeInt", args, response); + remoteObject.invokeMethod("consumeLong", args, response); + remoteObject.invokeMethod("consumeFloat", args, response); + remoteObject.invokeMethod("consumeDouble", args, response); + remoteObject.invokeMethod("consumeBoolean", args, response); + remoteObject.invokeMethod("consumeString", args, response); + remoteObject.invokeMethod("consumeIntArray", args, response); + remoteObject.invokeMethod("consumeStringArray", args, response); + remoteObject.invokeMethod("consumeObjectArray", args, response); + remoteObject.invokeMethod("consumeObject", args, response); + + verify(consumer).accept((byte) 0); + verify(consumer).accept('\u0000'); + verify(consumer).accept((short) 0); + verify(consumer).accept((int) 0); + verify(consumer).accept((long) 0); + verify(consumer).accept((float) 0); + verify(consumer).accept((double) 0); + verify(consumer).accept(false); + verify(consumer).accept("undefined"); + verify(consumer).accept(aryEq(new int[] {3, 0, 0, 0, 0})); + verify(consumer).accept(aryEq(new String[] {null, null, "Hello", null, null})); + verify(consumer, times(2)).accept(null); + } + private RemoteInvocationResult resultHasError(final int error) { return ArgumentMatchers.argThat(result -> result.error == error); } @@ -606,4 +652,10 @@ argument.setSingletonValue(SingletonJavaScriptValue.UNDEFINED); return argument; } + + private RemoteInvocationArgument arrayArgument(RemoteInvocationArgument... elements) { + RemoteInvocationArgument argument = new RemoteInvocationArgument(); + argument.setArrayValue(elements); + return argument; + } }
diff --git a/content/public/android/junit/src/org/chromium/content/browser/selection/SelectionPopupControllerTest.java b/content/public/android/junit/src/org/chromium/content/browser/selection/SelectionPopupControllerTest.java index e75a1686..0b089ab 100644 --- a/content/public/android/junit/src/org/chromium/content/browser/selection/SelectionPopupControllerTest.java +++ b/content/public/android/junit/src/org/chromium/content/browser/selection/SelectionPopupControllerTest.java
@@ -79,6 +79,9 @@ public void onSelectionEvent(int eventType, float posXPix, float poxYPix) {} @Override + public void showUnhandledTapUIIfNeeded(int x, int y) {} + + @Override public void selectWordAroundCaretAck(boolean didSelect, int startAdjust, int endAdjust) {} @Override
diff --git a/content/public/app/mojo/content_browser_manifest.json b/content/public/app/mojo/content_browser_manifest.json index 77af8b2..ded026c 100644 --- a/content/public/app/mojo/content_browser_manifest.json +++ b/content/public/app/mojo/content_browser_manifest.json
@@ -148,7 +148,6 @@ "blink::mojom::PresentationService", "blink::mojom::QuotaDispatcherHost", "blink::mojom::TextSuggestionHost", - "blink::mojom::UnhandledTapNotifier", "blink::mojom::WebBluetoothService", "blink::mojom::WebSocket",
diff --git a/content/public/app/mojo/content_renderer_manifest.json b/content/public/app/mojo/content_renderer_manifest.json index e8d2800c..59fa6ec 100644 --- a/content/public/app/mojo/content_renderer_manifest.json +++ b/content/public/app/mojo/content_renderer_manifest.json
@@ -92,14 +92,6 @@ "path": "assets/natives_blob.bin", "platform": "android" } - ], - "v8_snapshot_32_data" : [{ - "path": "assets/snapshot_blob_32.bin", - "platform": "android" - }], - "v8_snapshot_64_data" : [{ - "path": "assets/snapshot_blob_64.bin", - "platform": "android" - }] + ] } }
diff --git a/content/public/app/mojo/content_utility_manifest.json b/content/public/app/mojo/content_utility_manifest.json index 7676e217..e5cc53c9 100644 --- a/content/public/app/mojo/content_utility_manifest.json +++ b/content/public/app/mojo/content_utility_manifest.json
@@ -43,14 +43,6 @@ "path": "assets/natives_blob.bin", "platform": "android" } - ], - "v8_snapshot_32_data" : [{ - "path": "assets/snapshot_blob_32.bin", - "platform": "android" - }], - "v8_snapshot_64_data" : [{ - "path": "assets/snapshot_blob_64.bin", - "platform": "android" - }] + ] } }
diff --git a/content/public/app/mojo/context_snapshot_manifest.json b/content/public/app/mojo/context_snapshot_manifest.json index 9cf904bf..8849750 100644 --- a/content/public/app/mojo/context_snapshot_manifest.json +++ b/content/public/app/mojo/context_snapshot_manifest.json
@@ -3,7 +3,14 @@ "v8_context_snapshot_data" : [{ "path": "v8_context_snapshot.bin", "platform": "linux" + }], + "v8_snapshot_32_data" : [{ + "path": "assets/v8_context_snapshot_32.bin", + "platform": "android" + }], + "v8_snapshot_64_data" : [{ + "path": "assets/v8_context_snapshot_64.bin", + "platform": "android" }] } } -
diff --git a/content/public/app/mojo/snapshot_blob_manifest.json b/content/public/app/mojo/snapshot_blob_manifest.json index a9202b0..552e18a 100644 --- a/content/public/app/mojo/snapshot_blob_manifest.json +++ b/content/public/app/mojo/snapshot_blob_manifest.json
@@ -3,6 +3,14 @@ "v8_snapshot_data" : [{ "path": "snapshot_blob.bin", "platform": "linux" + }], + "v8_snapshot_32_data" : [{ + "path": "assets/snapshot_blob_32.bin", + "platform": "android" + }], + "v8_snapshot_64_data" : [{ + "path": "assets/snapshot_blob_64.bin", + "platform": "android" }] } }
diff --git a/content/public/browser/render_widget_host_view.h b/content/public/browser/render_widget_host_view.h index e967efe..71f3b3c 100644 --- a/content/public/browser/render_widget_host_view.h +++ b/content/public/browser/render_widget_host_view.h
@@ -116,7 +116,9 @@ // Indicates if the view is currently occluded (e.g, not visible because it's // covered up by other windows), and as a result the view's renderer may be - // suspended. Calling Show()/Hide() overrides the state set by these methods. + // suspended. If Show() is called on a view then its state should be re-set to + // being un-occluded (an explicit WasUnOccluded call will not be made for + // that). These calls are not necessarily made in pairs. virtual void WasUnOccluded() = 0; virtual void WasOccluded() = 0;
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h index 2dfd249..a13db5f 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h
@@ -430,10 +430,11 @@ virtual void WasShown() = 0; virtual void WasHidden() = 0; - // Invoked when the WebContents becomes occluded. An occluded WebContents - // isn't painted on the screen, except in a window switching feature (e.g. - // Alt-Tab). + // Invoked when the WebContents becomes occluded/unoccluded. An occluded + // WebContents isn't painted on the screen, except in a window switching + // feature (e.g. Alt-Tab). virtual void WasOccluded() = 0; + virtual void WasUnOccluded() = 0; // Returns the visibility of the WebContents' view. virtual Visibility GetVisibility() const = 0;
diff --git a/content/public/common/common_param_traits_macros.h b/content/public/common/common_param_traits_macros.h index 6b1fa1ce..e760942 100644 --- a/content/public/common/common_param_traits_macros.h +++ b/content/public/common/common_param_traits_macros.h
@@ -199,7 +199,6 @@ IPC_STRUCT_TRAITS_MEMBER(force_enable_zoom) IPC_STRUCT_TRAITS_MEMBER(fullscreen_supported) IPC_STRUCT_TRAITS_MEMBER(double_tap_to_zoom_enabled) - IPC_STRUCT_TRAITS_MEMBER(picture_in_picture_enabled) IPC_STRUCT_TRAITS_MEMBER(media_playback_gesture_whitelist_scope) IPC_STRUCT_TRAITS_MEMBER(default_video_poster_url) IPC_STRUCT_TRAITS_MEMBER(support_deprecated_target_density_dpi) @@ -234,6 +233,7 @@ IPC_STRUCT_TRAITS_MEMBER(do_not_update_selection_on_mutating_selection_range) IPC_STRUCT_TRAITS_MEMBER(autoplay_policy) IPC_STRUCT_TRAITS_MEMBER(low_priority_iframes_threshold) + IPC_STRUCT_TRAITS_MEMBER(picture_in_picture_enabled) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(blink::mojom::WindowFeatures)
diff --git a/content/public/common/web_preferences.cc b/content/public/common/web_preferences.cc index e1470563..d8bbd388 100644 --- a/content/public/common/web_preferences.cc +++ b/content/public/common/web_preferences.cc
@@ -220,7 +220,8 @@ media_controls_enabled(true), do_not_update_selection_on_mutating_selection_range(false), autoplay_policy(AutoplayPolicy::kDocumentUserActivationRequired), - low_priority_iframes_threshold(net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN) { + low_priority_iframes_threshold(net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN), + picture_in_picture_enabled(false) { standard_font_family_map[kCommonScript] = base::ASCIIToUTF16("Times New Roman"); fixed_font_family_map[kCommonScript] = base::ASCIIToUTF16("Courier New");
diff --git a/content/public/common/web_preferences.h b/content/public/common/web_preferences.h index 43606a7..7e08a2c5 100644 --- a/content/public/common/web_preferences.h +++ b/content/public/common/web_preferences.h
@@ -219,7 +219,6 @@ bool force_enable_zoom; bool fullscreen_supported; bool double_tap_to_zoom_enabled; - bool picture_in_picture_enabled; std::string media_playback_gesture_whitelist_scope; GURL default_video_poster_url; bool support_deprecated_target_density_dpi; @@ -290,6 +289,9 @@ // lowest priority. net::EffectiveConnectionType low_priority_iframes_threshold; + // Whether Picture-in-Picture is enabled. + bool picture_in_picture_enabled; + // We try to keep the default values the same as the default values in // chrome, except for the cases where it would require lots of extra work for // the embedder to use the same default value.
diff --git a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestContentViewCore.java b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestContentViewCore.java index e7d8f40..ced38bb 100644 --- a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestContentViewCore.java +++ b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestContentViewCore.java
@@ -189,11 +189,6 @@ } @Override - public boolean getIsMobileOptimizedHint() { - return false; - } - - @Override public int getTopControlsShrinkBlinkHeightForTesting() { return 0; }
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index 8fed7e2..5504d1d 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc
@@ -330,6 +330,10 @@ const PreviewsState kDisabledPreviewsBits = PREVIEWS_OFF | PREVIEWS_NO_TRANSFORM; +// Print up to |kMaxCertificateWarningMessages| console messages per frame +// about certificates that will be distrusted in future. +const uint32_t kMaxCertificateWarningMessages = 10; + typedef std::map<int, RenderFrameImpl*> RoutingIDFrameMap; static base::LazyInstance<RoutingIDFrameMap>::DestructorAtExit g_routing_id_frame_map = LAZY_INSTANCE_INITIALIZER; @@ -3214,6 +3218,15 @@ RenderFrameImpl::PrepareRenderViewForNavigation(common_params.url, request_params); + // Log a console message for subframe loads that failed due to a legacy + // Symantec certificate that has been distrusted or is slated for distrust + // soon. Most failed resource loads are logged in Blink, but Blink doesn't get + // notified when a subframe resource fails to load like other resources, so + // log it here. + if (frame_->Parent() && error_code == net::ERR_CERT_SYMANTEC_LEGACY) { + ReportLegacySymantecCert(common_params.url, true /* did_fail */); + } + GetContentClient()->SetActiveURL( common_params.url, frame_->Top()->GetSecurityOrigin().ToString().Utf8()); @@ -4319,6 +4332,10 @@ // Check whether we have new encoding name. UpdateEncoding(frame_, frame_->View()->PageEncoding().Utf8()); + + // Reset certificate warning state that prevents log spam. + num_certificate_warning_messages_ = 0; + certificate_warning_origins_.clear(); } void RenderFrameImpl::DidCreateNewDocument() { @@ -4990,16 +5007,81 @@ Send(new FrameHostMsg_DidRunContentWithCertificateErrors(routing_id_)); } -bool RenderFrameImpl::OverrideLegacySymantecCertConsoleMessage( - const blink::WebURL& url, - blink::WebString* console_message) { - std::string console_message_string; - if (GetContentClient()->renderer()->OverrideLegacySymantecCertConsoleMessage( - GURL(url), &console_message_string)) { - *console_message = blink::WebString::FromASCII(console_message_string); - return true; +void RenderFrameImpl::ReportLegacySymantecCert(const blink::WebURL& url, + bool did_fail) { + url::Origin origin = url::Origin::Create(GURL(url)); + // To prevent log spam, only log the message once per origin. + if (certificate_warning_origins_.find(origin) != + certificate_warning_origins_.end()) { + return; } - return false; + + // After |kMaxCertificateWarningMessages| warnings, stop printing messages to + // the console. At exactly |kMaxCertificateWarningMessages| warnings, print a + // message that additional resources on the page use legacy certificates + // without specifying which exact resources. Before + // |kMaxCertificateWarningMessages| messages, print the exact resource URL in + // the message to help the developer pinpoint the problematic resources. + if (num_certificate_warning_messages_ > kMaxCertificateWarningMessages) + return; + + std::string console_message; + + if (num_certificate_warning_messages_ == kMaxCertificateWarningMessages) { + if (did_fail) { + console_message = + "Additional resources on this page were loaded with " + "SSL certificates that have been " + "distrusted. See " + "https://g.co/chrome/symantecpkicerts for " + "more information."; + } else { + console_message = + "Additional resources on this page were loaded with " + "SSL certificates that will be " + "distrusted in the future. " + "Once distrusted, users will be prevented from " + "loading these resources. See " + "https://g.co/chrome/symantecpkicerts for " + "more information."; + } + } else { + // The embedder is given a chance to override the message for certs that + // will be distrusted in future, but not for certs that have already been + // distrusted. (This is because there is no embedder-specific release + // information in the message for certs that have already been distrusted.) + if (did_fail) { + console_message = base::StringPrintf( + "The SSL certificate used to load resources from %s" + " has been distrusted. See " + "https://g.co/chrome/symantecpkicerts for " + "more information.", + origin.Serialize().c_str()); + } else if (!GetContentClient() + ->renderer() + ->OverrideLegacySymantecCertConsoleMessage( + GURL(url), &console_message)) { + console_message = base::StringPrintf( + "The SSL certificate used to load resources from %s" + " will be " + "distrusted in the future. " + "Once distrusted, users will be prevented from " + "loading these resources. See " + "https://g.co/chrome/symantecpkicerts for " + "more information.", + origin.Serialize().c_str()); + } + } + num_certificate_warning_messages_++; + certificate_warning_origins_.insert(origin); + // To avoid spamming the console, use Verbose message level for subframe + // resources and for certificates that will be distrusted in future, and only + // use the warning level for main-frame resources or resources that have + // already been distrusted. + AddMessageToConsole((frame_->Parent() && !did_fail) + ? CONSOLE_MESSAGE_LEVEL_VERBOSE + : CONSOLE_MESSAGE_LEVEL_WARNING, + console_message); } void RenderFrameImpl::DidChangePerformanceTiming() {
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h index 2e62aea..c67c9882 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h
@@ -696,9 +696,8 @@ const blink::WebURL& target) override; void DidDisplayContentWithCertificateErrors() override; void DidRunContentWithCertificateErrors() override; - bool OverrideLegacySymantecCertConsoleMessage( - const blink::WebURL& url, - blink::WebString* console_message) override; + void ReportLegacySymantecCert(const blink::WebURL& url, + bool did_fail) override; void DidChangePerformanceTiming() override; void DidObserveLoadingBehavior( blink::WebLoadingBehaviorFlag behavior) override; @@ -1692,6 +1691,13 @@ blink::mojom::ClipboardHostPtr clipboard_host_; #endif + // Used to cap the number of console messages that are printed to warn about + // legacy certificates that will be distrusted in future or have already been + // distrusted. + uint32_t num_certificate_warning_messages_ = 0; + // The origins for which a legacy certificate warning has been printed. + std::set<url::Origin> certificate_warning_origins_; + base::WeakPtrFactory<RenderFrameImpl> weak_factory_; DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index 687f610..affc7ad 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc
@@ -2437,10 +2437,8 @@ static_cast<blink::WebMemoryPressureLevel>(memory_pressure_level)); } if (memory_pressure_level == - base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL) { + base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL) ReleaseFreeMemory(); - ClearMemory(); - } } void RenderThreadImpl::OnMemoryStateChange(base::MemoryState state) { @@ -2465,7 +2463,6 @@ OnTrimMemoryImmediately(); ReleaseFreeMemory(); - ClearMemory(); if (blink_platform_impl_) blink::WebMemoryCoordinator::OnPurgeMemory(); } @@ -2482,14 +2479,6 @@ mbytes); } -void RenderThreadImpl::ClearMemory() { - // Do not call into blink if it is not initialized. - if (blink_platform_impl_) { - // Purge Skia font cache, resource cache, and image filter. - SkGraphics::PurgeAllCaches(); - } -} - scoped_refptr<base::TaskRunner> RenderThreadImpl::GetFileThreadTaskRunner() { return blink_platform_impl_->BaseFileTaskRunner(); } @@ -2607,8 +2596,12 @@ base::allocator::ReleaseFreeMemory(); discardable_shared_memory_manager_->ReleaseFreeMemory(); - if (blink_platform_impl_) + // Do not call into blink if it is not initialized. + if (blink_platform_impl_) { + // Purge Skia font cache, resource cache, and image filter. + SkGraphics::PurgeAllCaches(); blink::DecommitFreeableMemory(); + } } RenderThreadImpl::PendingFrameCreate::PendingFrameCreate(
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h index 1fd04f4..56957145 100644 --- a/content/renderer/render_thread_impl.h +++ b/content/renderer/render_thread_impl.h
@@ -564,8 +564,6 @@ void RecordPurgeMemory(RendererMemoryMetrics before); - void ClearMemory(); - void Init( const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue);
diff --git a/content/renderer/render_thread_impl_browsertest.cc b/content/renderer/render_thread_impl_browsertest.cc index c53d8cf..d06cf4f 100644 --- a/content/renderer/render_thread_impl_browsertest.cc +++ b/content/renderer/render_thread_impl_browsertest.cc
@@ -20,7 +20,6 @@ #include "base/test/scoped_feature_list.h" #include "base/threading/sequenced_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h" -#include "build/build_config.h" #include "content/app/mojo/mojo_init.h" #include "content/common/in_process_child_thread_params.h" #include "content/common/service_manager/child_connection.h" @@ -37,10 +36,8 @@ #include "content/public/test/test_browser_thread_bundle.h" #include "content/public/test/test_content_client_initializer.h" #include "content/public/test/test_launcher.h" -#include "content/public/test/test_navigation_observer.h" #include "content/public/test/test_service_manager_context.h" #include "content/renderer/render_process_impl.h" -#include "content/shell/browser/shell.h" #include "content/test/mock_render_process.h" #include "gpu/GLES2/gl2extchromium.h" #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" @@ -50,11 +47,9 @@ #include "ipc/ipc_channel_mojo.h" #include "mojo/edk/embedder/embedder.h" #include "mojo/edk/embedder/outgoing_broker_client_invitation.h" -#include "net/dns/mock_host_resolver.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h" #include "third_party/WebKit/public/platform/scheduler/test/renderer_scheduler_test_support.h" -#include "third_party/skia/include/core/SkGraphics.h" #include "ui/base/ui_base_switches.h" #include "ui/gfx/buffer_format_util.h" @@ -418,38 +413,5 @@ gfx::BufferFormat::RGBA_8888, gfx::BufferFormat::BGRA_8888, gfx::BufferFormat::YVU_420))); - -class RenderThreadImplClearMemoryBrowserTest : public ContentBrowserTest { - protected: - void SetUpOnMainThread() override { - host_resolver()->AddRule("*", "127.0.0.1"); - ASSERT_TRUE(embedded_test_server()->Start()); - } -}; - -#if defined(OS_ANDROID) || defined(OS_MACOSX) || defined(IS_CHROMECAST) -#define MAYBE_ClearMemory DISABLED_ClearMemory -#else -#define MAYBE_ClearMemory ClearMemory -#endif - -IN_PROC_BROWSER_TEST_F(RenderThreadImplClearMemoryBrowserTest, - MAYBE_ClearMemory) { - TestNavigationObserver observer(shell()->web_contents()); - GURL url(embedded_test_server()->GetURL("/simple_page.html")); - NavigateToURL(shell(), url); - - EXPECT_GT(static_cast<int>(SkGraphics::GetFontCacheUsed()), 0); - EXPECT_GT(SkGraphics::GetFontCacheCountUsed(), 0); - - // TODO(gyuyoung): How to call RenderThreadImpl::ClearMemory() from here? - // Instead we call same function that RenderThreadImpl::ClearMemory() calls at - // the moment. - SkGraphics::PurgeAllCaches(); - - EXPECT_EQ(static_cast<int>(SkGraphics::GetFontCacheUsed()), 0); - EXPECT_EQ(SkGraphics::GetFontCacheCountUsed(), 0); -} - } // namespace } // namespace content
diff --git a/content/renderer/render_thread_impl_discardable_memory_browsertest.cc b/content/renderer/render_thread_impl_discardable_memory_browsertest.cc index 2875aba5a..2d9635f 100644 --- a/content/renderer/render_thread_impl_discardable_memory_browsertest.cc +++ b/content/renderer/render_thread_impl_discardable_memory_browsertest.cc
@@ -14,6 +14,7 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/memory/discardable_memory.h" +#include "base/memory/memory_pressure_listener.h" #include "base/time/time.h" #include "build/build_config.h" #include "components/discardable_memory/client/client_discardable_shared_memory_manager.h" @@ -22,6 +23,7 @@ #include "content/public/common/content_switches.h" #include "content/public/test/content_browser_test.h" #include "content/public/test/content_browser_test_utils.h" +#include "content/public/test/test_utils.h" #include "content/shell/browser/shell.h" #include "gpu/ipc/client/gpu_memory_buffer_impl.h" #include "ui/gfx/buffer_format_util.h" @@ -138,5 +140,33 @@ EXPECT_LT(base::TimeTicks::Now(), end); } +IN_PROC_BROWSER_TEST_F(RenderThreadImplDiscardableMemoryBrowserTest, + ReleaseFreeMemory) { + const size_t kSize = 1024 * 1024; // 1MiB. + + std::unique_ptr<base::DiscardableMemory> memory = + child_discardable_shared_memory_manager() + ->AllocateLockedDiscardableMemory(kSize); + + EXPECT_TRUE(memory); + memory.reset(); + + EXPECT_GE(BrowserMainLoop::GetInstance() + ->discardable_shared_memory_manager() + ->GetBytesAllocated(), + kSize); + + // Call RenderThreadImpl::ReleaseFreeMemory through a fake memory pressure + // notification. + base::MemoryPressureListener::SimulatePressureNotification( + base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL); + base::RunLoop().RunUntilIdle(); + RunAllTasksUntilIdle(); + + EXPECT_EQ(0U, BrowserMainLoop::GetInstance() + ->discardable_shared_memory_manager() + ->GetBytesAllocated()); +} + } // namespace } // namespace content
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index f4dc9be..b440ee4 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc
@@ -239,6 +239,7 @@ using blink::WebSettings; using blink::WebSize; using blink::WebString; +using blink::WebTappedInfo; using blink::WebTextDirection; using blink::WebTouchEvent; using blink::WebURL; @@ -504,7 +505,8 @@ void RenderViewImpl::Initialize( mojom::CreateViewParamsPtr params, - const RenderWidget::ShowCallback& show_callback) { + const RenderWidget::ShowCallback& show_callback, + scoped_refptr<base::SingleThreadTaskRunner> task_runner) { bool was_created_by_renderer = !show_callback.is_null(); #if defined(OS_ANDROID) // TODO(sgurun): crbug.com/325351 Needed only for android webview's deprecated @@ -621,6 +623,9 @@ GetContentClient()->renderer()->RenderViewCreated(this); page_zoom_level_ = params->page_zoom_level; + + nav_state_sync_timer_.SetTaskRunner(task_runner); + check_preferred_size_timer_.SetTaskRunner(std::move(task_runner)); } RenderViewImpl::~RenderViewImpl() { @@ -862,7 +867,6 @@ web_view->SetIgnoreViewportTagScaleLimits(prefs.force_enable_zoom); settings->SetAutoZoomFocusedNodeToLegibleScale(true); settings->SetDoubleTapToZoomEnabled(prefs.double_tap_to_zoom_enabled); - settings->SetPictureInPictureEnabled(prefs.picture_in_picture_enabled); settings->SetMediaPlaybackGestureWhitelistScope( blink::WebString::FromUTF8(prefs.media_playback_gesture_whitelist_scope)); settings->SetDefaultVideoPosterURL( @@ -969,6 +973,8 @@ static_cast<blink::WebEffectiveConnectionType>( prefs.low_priority_iframes_threshold)); + settings->SetPictureInPictureEnabled(prefs.picture_in_picture_enabled); + #if defined(OS_MACOSX) settings->SetDoubleTapToZoomEnabled(true); web_view->SetMaximumLegibleScale(prefs.default_maximum_page_scale_factor); @@ -992,7 +998,8 @@ else render_view = new RenderViewImpl(compositor_deps, *params, task_runner); - render_view->Initialize(std::move(params), show_callback); + render_view->Initialize(std::move(params), show_callback, + std::move(task_runner)); return render_view; } @@ -1728,6 +1735,11 @@ RenderWidget::SetTouchAction(touchAction); } +void RenderViewImpl::ShowUnhandledTapUIIfNeeded( + const blink::WebTappedInfo& tappedInfo) { + RenderWidget::ShowUnhandledTapUIIfNeeded(tappedInfo); +} + blink::WebWidgetClient* RenderViewImpl::WidgetClient() { return static_cast<RenderWidget*>(this); }
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h index b74e4d4..6f222635 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h
@@ -268,6 +268,8 @@ void SetToolTipText(const blink::WebString&, blink::WebTextDirection hint) override; void SetTouchAction(cc::TouchAction touchAction) override; + void ShowUnhandledTapUIIfNeeded( + const blink::WebTappedInfo& tappedInfo) override; blink::WebWidgetClient* WidgetClient() override; // blink::WebViewClient implementation -------------------------------------- @@ -390,7 +392,8 @@ scoped_refptr<base::SingleThreadTaskRunner> task_runner); void Initialize(mojom::CreateViewParamsPtr params, - const RenderWidget::ShowCallback& show_callback); + const RenderWidget::ShowCallback& show_callback, + scoped_refptr<base::SingleThreadTaskRunner> task_runner); void SetScreenMetricsEmulationParameters( bool enabled, const blink::WebDeviceEmulationParams& params) override;
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 6979462..8e92115 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc
@@ -93,6 +93,7 @@ #include "third_party/WebKit/public/web/WebPopupMenuInfo.h" #include "third_party/WebKit/public/web/WebRange.h" #include "third_party/WebKit/public/web/WebSettings.h" +#include "third_party/WebKit/public/web/WebTappedInfo.h" #include "third_party/WebKit/public/web/WebView.h" #include "third_party/WebKit/public/web/WebWidget.h" #include "third_party/skia/include/core/SkShader.h" @@ -148,6 +149,7 @@ using blink::WebRect; using blink::WebSize; using blink::WebString; +using blink::WebTappedInfo; using blink::WebTextDirection; using blink::WebTouchEvent; using blink::WebTouchPoint; @@ -2511,6 +2513,28 @@ return web_screen_info; } +#if defined(OS_ANDROID) +void RenderWidget::ShowUnhandledTapUIIfNeeded( + const WebTappedInfo& tapped_info) { + // Unpack tapped_info. TODO(donnd): inline unpacking. + bool page_changed = tapped_info.PageChanged(); + const WebNode& tapped_node = tapped_info.GetNode(); + const WebPoint& tapped_position = tapped_info.Position(); + bool should_trigger = !page_changed && tapped_node.IsTextNode() && + !tapped_node.IsContentEditable() && + !tapped_node.IsInsideFocusableElementOrARIAWidget(); + if (should_trigger) { + float x_px = IsUseZoomForDSFEnabled() + ? tapped_position.x + : tapped_position.x * device_scale_factor_; + float y_px = IsUseZoomForDSFEnabled() + ? tapped_position.y + : tapped_position.y * device_scale_factor_; + Send(new ViewHostMsg_ShowUnhandledTapUIIfNeeded(routing_id_, x_px, y_px)); + } +} +#endif + void RenderWidget::DidHandleGestureEvent(const WebGestureEvent& event, bool event_cancelled) { #if defined(OS_ANDROID) || defined(USE_AURA)
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h index c3fe65d..3e8c9df5 100644 --- a/content/renderer/render_widget.h +++ b/content/renderer/render_widget.h
@@ -84,6 +84,7 @@ class WebInputMethodController; class WebLocalFrame; class WebMouseEvent; +class WebTappedInfo; struct WebPoint; } // namespace blink @@ -333,6 +334,15 @@ // position. virtual ui::TextInputType GetTextInputType(); +#if defined(OS_ANDROID) + // Notifies that a tap was not consumed, so showing a UI for the unhandled + // tap may be needed. + // Performs various checks on the given WebTappedInfo to apply heuristics to + // determine if triggering is appropriate. + void ShowUnhandledTapUIIfNeeded( + const blink::WebTappedInfo& tapped_info) override; +#endif + // Begins the compositor's scheduler to start producing frames. void StartCompositor();
diff --git a/content/shell/android/BUILD.gn b/content/shell/android/BUILD.gn index bfb3df4f..c15d4fd 100644 --- a/content/shell/android/BUILD.gn +++ b/content/shell/android/BUILD.gn
@@ -6,6 +6,7 @@ import("//build/config/android/config.gni") import("//build/config/android/rules.gni") import("//third_party/icu/config.gni") +import("//tools/v8_context_snapshot/v8_context_snapshot.gni") content_shell_manifest = "$target_gen_dir/content_shell_manifest/AndroidManifest.xml" @@ -143,8 +144,12 @@ deps = [ "//content/shell:pak", "//third_party/icu:icu_assets", - "//v8:v8_external_startup_data_assets", ] + if (use_v8_context_snapshot) { + deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ] + } else { + deps += [ "//v8:v8_external_startup_data_assets" ] + } } android_apk("content_shell_apk") {
diff --git a/content/shell/browser/shell.cc b/content/shell/browser/shell.cc index 371c3195..20c1331 100644 --- a/content/shell/browser/shell.cc +++ b/content/shell/browser/shell.cc
@@ -86,14 +86,8 @@ hide_toolbar_(false) { web_contents_->SetDelegate(this); - if (switches::IsRunLayoutTestSwitchPresent()) { + if (switches::IsRunLayoutTestSwitchPresent()) headless_ = true; - // In a headless shell, disable occlusion tracking. Otherwise, WebContents - // would always behave as if they were occluded, i.e. would not render - // frames and would not receive input events. - base::CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kDisableBackgroundingOccludedWindowsForTesting); - } if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kContentShellHideToolbar))
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn index 0ce0d3f9..aaadd7fe 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn
@@ -17,6 +17,7 @@ import("//services/service_manager/public/service_manifest.gni") import("//testing/test.gni") import("//third_party/WebKit/public/public_features.gni") +import("//tools/v8_context_snapshot/v8_context_snapshot.gni") import("//v8/gni/v8.gni") # Use a static library here because many test binaries depend on this but don't @@ -1976,9 +1977,14 @@ "//media/capture/content/android", "//media/capture/content/android:screen_capture_java", "//ui/android:android", - "//v8:v8_external_startup_data_assets", ] + if (use_v8_context_snapshot) { + deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ] + } else { + deps += [ "//v8:v8_external_startup_data_assets" ] + } + defines += [ "APPCACHE_USE_SIMPLE_CACHE" ] } else { # Non-Android.
diff --git a/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py index ceba054..ea095b2 100644 --- a/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py +++ b/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
@@ -88,6 +88,8 @@ 'texturelodoffset.html', bug=794335) + self.Fail('conformance2/sync/sync-webgl-specific.html', + ['mac', 'win'], bug=818336) self.Fail('conformance2/textures/misc/copy-texture-image-same-texture.html', ['mac', 'linux'], bug=809233) self.Fail('conformance2/textures/misc/copy-texture-image-same-texture.html', @@ -1249,7 +1251,6 @@ self.Fail('conformance2/textures/image_data/' + 'tex-3d-rgb5_a1-rgba-unsigned_byte.html', ['linux', ('amd', 0x6613)], bug=701138) - # Conflicting expectations to test that the # "Expectations have no collisions" unittest works. # page_name = 'conformance/glsl/constructors/glsl-construct-ivec4.html'
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_revision.txt b/content/test/gpu/gpu_tests/webgl_conformance_revision.txt index 1155e5d..7a8a9355 100644 --- a/content/test/gpu/gpu_tests/webgl_conformance_revision.txt +++ b/content/test/gpu/gpu_tests/webgl_conformance_revision.txt
@@ -1,3 +1,3 @@ # AUTOGENERATED FILE - DO NOT EDIT # SEE roll_webgl_conformance.py -Current webgl revision a182a9ad3078aca566d8355eabf2d9f56f70ee82 +Current webgl revision 3c1cb0203b6cfc10389e85a350b2ea6ca29d01ce
diff --git a/extensions/browser/content_hash_fetcher_unittest.cc b/extensions/browser/content_hash_fetcher_unittest.cc index d81b0b74..e6ddc7ab 100644 --- a/extensions/browser/content_hash_fetcher_unittest.cc +++ b/extensions/browser/content_hash_fetcher_unittest.cc
@@ -71,13 +71,12 @@ result_->force = force; result_->mismatch_paths = mismatch_paths; if (run_loop_quit_) - base::ResetAndReturn(&run_loop_quit_).Run(); + std::move(run_loop_quit_).Run(); } - base::Closure run_loop_quit_; + base::OnceClosure run_loop_quit_; std::unique_ptr<ContentHashFetcherResult> result_; base::WeakPtrFactory<ContentHashFetcherWaiter> weak_factory_; - DISALLOW_COPY_AND_ASSIGN(ContentHashFetcherWaiter); }; @@ -94,6 +93,69 @@ } ~ContentHashFetcherTest() override {} + bool LoadTestExtension() { + test_dir_base_ = GetTestPath( + base::FilePath(FILE_PATH_LITERAL("missing_verified_contents"))); + + // We unzip the extension source to a temp directory to simulate it being + // installed there, because the ContentHashFetcher will create the + // _metadata/ directory within the extension install dir and write the + // fetched verified_contents.json file there. + extension_ = + UnzipToTempDirAndLoad(test_dir_base_.AppendASCII("source.zip")); + if (!extension_.get()) + return false; + + // Make sure there isn't already a verified_contents.json file there. + EXPECT_FALSE(VerifiedContentsFileExists()); + delegate_ = std::make_unique<MockContentVerifierDelegate>(); + fetch_url_ = delegate_->GetSignatureFetchUrl(extension_->id(), + extension_->version()); + return true; + } + + std::unique_ptr<ContentHashFetcherResult> DoHashFetch() { + if (!extension_.get() || !delegate_.get()) { + ADD_FAILURE() << "No valid extension_ or delegate_, " + "did you forget to call LoadTestExtension()?"; + return nullptr; + } + + ContentHashFetcherWaiter waiter; + ContentHashFetcher fetcher(request_context(), delegate_.get(), + waiter.GetCallback()); + fetcher.DoFetch(extension_.get(), true /* force */); + return waiter.WaitForCallback(); + } + const GURL& fetch_url() { return fetch_url_; } + + const base::FilePath& extension_root() { return extension_->path(); } + + bool VerifiedContentsFileExists() const { + return base::PathExists( + file_util::GetVerifiedContentsPath(extension_->path())); + } + + base::FilePath GetResourcePath(const std::string& resource_filename) const { + return test_dir_base_.AppendASCII(resource_filename); + } + + // Registers interception of requests for |url| to respond with the contents + // of the file at |response_path|. + void RegisterInterception(const GURL& url, + const base::FilePath& response_path) { + ASSERT_TRUE(base::PathExists(response_path)); + ASSERT_FALSE(interceptor_); + interceptor_ = std::make_unique<net::TestURLRequestInterceptor>( + url.scheme(), url.host(), + content::BrowserThread::GetTaskRunnerForThread( + content::BrowserThread::IO), + base::CreateTaskRunnerWithTraits( + {base::MayBlock(), base::TaskPriority::BACKGROUND})); + interceptor_->SetResponse(url, response_path); + } + + private: net::URLRequestContextGetter* request_context() { return request_context_.get(); } @@ -122,55 +184,27 @@ return extension; } - // Registers interception of requests for |url| to respond with the contents - // of the file at |response_path|. - void RegisterInterception(const GURL& url, - const base::FilePath& response_path) { - interceptor_ = std::make_unique<net::TestURLRequestInterceptor>( - url.scheme(), url.host(), - content::BrowserThread::GetTaskRunnerForThread( - content::BrowserThread::IO), - base::CreateTaskRunnerWithTraits( - {base::MayBlock(), base::TaskPriority::BACKGROUND})); - interceptor_->SetResponse(url, response_path); - } - - protected: std::unique_ptr<net::TestURLRequestInterceptor> interceptor_; scoped_refptr<net::TestURLRequestContextGetter> request_context_; base::ScopedTempDir temp_dir_; + + GURL fetch_url_; + base::FilePath test_dir_base_; + std::unique_ptr<MockContentVerifierDelegate> delegate_; + scoped_refptr<Extension> extension_; + + DISALLOW_COPY_AND_ASSIGN(ContentHashFetcherTest); }; // This tests our ability to successfully fetch, parse, and validate a missing // verified_contents.json file for an extension. TEST_F(ContentHashFetcherTest, MissingVerifiedContents) { - // We unzip the extension source to a temp directory to simulate it being - // installed there, because the ContentHashFetcher will create the _metadata/ - // directory within the extension install dir and write the fetched - // verified_contents.json file there. - base::FilePath test_dir_base = GetTestPath( - base::FilePath(FILE_PATH_LITERAL("missing_verified_contents"))); - scoped_refptr<Extension> extension = - UnzipToTempDirAndLoad(test_dir_base.AppendASCII("source.zip")); + ASSERT_TRUE(LoadTestExtension()); - // Make sure there isn't already a verified_contents.json file there. - EXPECT_FALSE( - base::PathExists(file_util::GetVerifiedContentsPath(extension->path()))); - - MockContentVerifierDelegate delegate; - ContentHashFetcherWaiter waiter; - GURL fetch_url = - delegate.GetSignatureFetchUrl(extension->id(), extension->version()); - - RegisterInterception(fetch_url, - test_dir_base.AppendASCII("verified_contents.json")); - - ContentHashFetcher fetcher(request_context(), &delegate, - waiter.GetCallback()); - fetcher.DoFetch(extension.get(), true /* force */); + RegisterInterception(fetch_url(), GetResourcePath("verified_contents.json")); // Make sure the fetch was successful. - std::unique_ptr<ContentHashFetcherResult> result = waiter.WaitForCallback(); + std::unique_ptr<ContentHashFetcherResult> result = DoHashFetch(); ASSERT_TRUE(result.get()); EXPECT_TRUE(result->success); EXPECT_TRUE(result->force); @@ -178,37 +212,69 @@ // Make sure the verified_contents.json file was written into the extension's // install dir. - EXPECT_TRUE( - base::PathExists(file_util::GetVerifiedContentsPath(extension->path()))); + EXPECT_TRUE(VerifiedContentsFileExists()); +} + +// Tests that if the network fetches invalid verified_contents.json, failure +// happens correctly. +TEST_F(ContentHashFetcherTest, FetchInvalidVerifiedContents) { + ASSERT_TRUE(LoadTestExtension()); + + // Simulate invalid verified_contents.json fetch by providing a modified and + // incorrect json file. + // invalid_verified_contents.json is a modified version of + // verified_contents.json, with one hash character garbled. + RegisterInterception(fetch_url(), + GetResourcePath("invalid_verified_contents.json")); + + std::unique_ptr<ContentHashFetcherResult> result = DoHashFetch(); + ASSERT_TRUE(result.get()); + EXPECT_FALSE(result->success); + EXPECT_TRUE(result->force); + EXPECT_TRUE(result->mismatch_paths.empty()); + + // TODO(lazyboy): This should be EXPECT_FALSE, we shouldn't be writing + // verified_contents.json file if it didn't succeed. + //// Make sure the verified_contents.json file was *not* written into the + //// extension's install dir. + // EXPECT_FALSE(VerifiedContentsFileExists()); + EXPECT_TRUE(VerifiedContentsFileExists()); +} + +// Tests that if the verified_contents.json network request 404s, failure +// happens as expected. +TEST_F(ContentHashFetcherTest, Fetch404VerifiedContents) { + ASSERT_TRUE(LoadTestExtension()); + + // NOTE: No RegisterInterception(), hash fetch will result in 404. + + // Make sure the fetch was *not* successful. + std::unique_ptr<ContentHashFetcherResult> result = DoHashFetch(); + ASSERT_TRUE(result.get()); + EXPECT_FALSE(result->success); + EXPECT_TRUE(result->force); + EXPECT_TRUE(result->mismatch_paths.empty()); + + // Make sure the verified_contents.json file was *not* written into the + // extension's install dir. + EXPECT_FALSE(VerifiedContentsFileExists()); } // Similar to MissingVerifiedContents, but tests the case where the extension // actually has corruption. TEST_F(ContentHashFetcherTest, MissingVerifiedContentsAndCorrupt) { - base::FilePath test_dir_base = - GetTestPath(base::FilePath()).AppendASCII("missing_verified_contents"); - scoped_refptr<Extension> extension = - UnzipToTempDirAndLoad(test_dir_base.AppendASCII("source.zip")); + ASSERT_TRUE(LoadTestExtension()); // Tamper with a file in the extension. - base::FilePath script_path = extension->path().AppendASCII("script.js"); + base::FilePath script_path = extension_root().AppendASCII("script.js"); std::string addition = "//hello world"; ASSERT_TRUE( base::AppendToFile(script_path, addition.c_str(), addition.size())); - MockContentVerifierDelegate delegate; - ContentHashFetcherWaiter waiter; - GURL fetch_url = - delegate.GetSignatureFetchUrl(extension->id(), extension->version()); - RegisterInterception(fetch_url, - test_dir_base.AppendASCII("verified_contents.json")); - - ContentHashFetcher fetcher(request_context(), &delegate, - waiter.GetCallback()); - fetcher.DoFetch(extension.get(), true /* force */); + RegisterInterception(fetch_url(), GetResourcePath("verified_contents.json")); // Make sure the fetch was *not* successful. - std::unique_ptr<ContentHashFetcherResult> result = waiter.WaitForCallback(); + std::unique_ptr<ContentHashFetcherResult> result = DoHashFetch(); ASSERT_NE(nullptr, result.get()); EXPECT_TRUE(result->success); EXPECT_TRUE(result->force); @@ -217,8 +283,7 @@ // Make sure the verified_contents.json file was written into the extension's // install dir. - EXPECT_TRUE( - base::PathExists(file_util::GetVerifiedContentsPath(extension->path()))); + EXPECT_TRUE(VerifiedContentsFileExists()); } } // namespace extensions
diff --git a/extensions/browser/extension_function_histogram_value.h b/extensions/browser/extension_function_histogram_value.h index 0bc56f7..3bf4201 100644 --- a/extensions/browser/extension_function_histogram_value.h +++ b/extensions/browser/extension_function_histogram_value.h
@@ -1283,6 +1283,7 @@ ENTERPRISE_DEVICEATTRIBUTES_GETDEVICEASSETID, ENTERPRISE_DEVICEATTRIBUTES_GETDEVICEANNOTATEDLOCATION, PASSWORDSPRIVATE_CANCELEXPORTPASSWORDS, + FILEMANAGERPRIVATE_MARKCACHEASMOUNTED, // Last entry: Add new entries above, then run: // python tools/metrics/histograms/update_extension_histograms.py ENUM_BOUNDARY
diff --git a/extensions/test/data/content_hash_fetcher/missing_verified_contents/README.txt b/extensions/test/data/content_hash_fetcher/missing_verified_contents/README.txt index cbd41d7..5f8f498 100644 --- a/extensions/test/data/content_hash_fetcher/missing_verified_contents/README.txt +++ b/extensions/test/data/content_hash_fetcher/missing_verified_contents/README.txt
@@ -4,5 +4,7 @@ them into a source.zip file, and pulling out the _metadata/verified_contents.json file to be standalone in this directory. +invalid_verified_contents.json is a file copied from verified_contents.json and +has one char modified in it so that it isn't a valid verified_contents anymore. * https://chrome.google.com/webstore/detail/jmllhlobpjcnnomjlipadejplhmheiif
diff --git a/extensions/test/data/content_hash_fetcher/missing_verified_contents/invalid_verified_contents.json b/extensions/test/data/content_hash_fetcher/missing_verified_contents/invalid_verified_contents.json new file mode 100644 index 0000000..2786fabe --- /dev/null +++ b/extensions/test/data/content_hash_fetcher/missing_verified_contents/invalid_verified_contents.json
@@ -0,0 +1 @@ +[{"description":"treehash per file","signed_content":{"payload":"EyJjb250ZW50X2hhc2hlcyI6W3siYmxvY2tfc2l6ZSI6NDA5NiwiZGlnZXN0Ijoic2hhMjU2IiwiZmlsZXMiOlt7ImNhbm9uaWNhbF9qc29uX3Jvb3RfaGFzaCI6IllyZkpZUl94ZjNTa0RZNW1JZWJRdmU0VHlpSUtOR3drbm84clB4dG5fR0UiLCJwYXRoIjoibWFuaWZlc3QuanNvbiIsInJvb3RfaGFzaCI6InppS0Z6dUpsd1dTZ0hwdS0zWGJNb2FrX3ZLdGV6X19VdklFOUx6b1h0N00ifSx7InBhdGgiOiJzY3JpcHQuanMiLCJyb290X2hhc2giOiI1WHFkOHJld3hmU0sweFJRb0pIRmZXZ1owV1JfMW1HY2hkSE04azJpWmJRIn1dLCJmb3JtYXQiOiJ0cmVlaGFzaCIsImhhc2hfYmxvY2tfc2l6ZSI6NDA5Nn1dLCJpdGVtX2lkIjoiam1sbGhsb2JwamNubm9tamxpcGFkZWpwbGhtaGVpaWYiLCJpdGVtX3ZlcnNpb24iOiIwLjgiLCJwcm90b2NvbF92ZXJzaW9uIjoxfQ","signatures":[{"header":{"kid":"publisher"},"protected":"eyJhbGciOiJSUzI1NiJ9","signature":"wk06r54DG_zobXdASPU6xggGPyekrkvwssRS76_LaHvNBIjthLtUZ3zoTmAsb4aELj-5n5Nk4rT1_wpDvkOKoKCeBHNx_yiP9kTuPW_c7D_9BKrCrj5-gRL-YanX18b4G4uHCbpfKoCyVgUUU0spr21Fa-kkf8IqSSrzYfJHRnYAhFKI5NTX-EhRWvwFOI5V8U2332q1VCKMxfuUjNFbVTrI2eQ9LrvSjvtXTygTCC4MDlKlsFThoPXK_H_eZDLjfV45FGtuXlK8yd8hixXXm_nTLSb5UL_Ul-g95bONg5ywXSWsFMoXC1r80dsecZXdPxxi3ELLyMZlp4EwgGQcgA"},{"header":{"kid":"webstore"},"protected":"eyJhbGciOiJSUzI1NiJ9","signature":"WUvXcOJ0_evMh-g4wdSlsNJl_TRISiKGbyb2G7yXwKcHo-HXdk4bfnZyu9dI_ao4qBLJH3DAcRJDEj-UvTn_J1Ctpwv6p4yWc2OlVG6hyI5zQtA2DgNTsBPAXcUNG1Z4crE0nNJeyXZjjNb3RpjJViKaaqlkUkkqPpUwAgeGIRgn9d0tFVEpFACLqtprEahO4EgjXkLgT5r2oVqgQrItbvtVv23Kb8eaK7ZX97pVhsicNfKiNGtJL4yk1UdOVUxGr_4zBp0CaGWfCqkC3ZApdI2RQy_CyaOYlviLQ35TxQ8JGO6k9Tb0IxxRVjF_in8qhYt6R0ATjTnzEBUEscDLGg"}]}}]
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc index 9e0df626..7c1d44ce 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc
@@ -70,19 +70,23 @@ LAZY_INSTANCE_INITIALIZER; const char kNativesFileName[] = "natives_blob.bin"; -const char kV8ContextSnapshotFileName[] = "v8_context_snapshot.bin"; #if defined(OS_ANDROID) +const char kV8ContextSnapshotFileName64[] = "v8_context_snapshot_64.bin"; +const char kV8ContextSnapshotFileName32[] = "v8_context_snapshot_32.bin"; const char kSnapshotFileName64[] = "snapshot_blob_64.bin"; const char kSnapshotFileName32[] = "snapshot_blob_32.bin"; #if defined(__LP64__) +#define kV8ContextSnapshotFileName kV8ContextSnapshotFileName64 #define kSnapshotFileName kSnapshotFileName64 #else +#define kV8ContextSnapshotFileName kV8ContextSnapshotFileName32 #define kSnapshotFileName kSnapshotFileName32 #endif #else // defined(OS_ANDROID) +const char kV8ContextSnapshotFileName[] = "v8_context_snapshot.bin"; const char kSnapshotFileName[] = "snapshot_blob.bin"; #endif // defined(OS_ANDROID) @@ -380,9 +384,23 @@ } // static -base::FilePath V8Initializer::GetSnapshotFilePath(bool abi_32_bit) { +base::FilePath V8Initializer::GetSnapshotFilePath( + bool abi_32_bit, + V8SnapshotFileType snapshot_file_type) { base::FilePath path; - GetV8FilePath(abi_32_bit ? kSnapshotFileName32 : kSnapshotFileName64, &path); + const char* filename = nullptr; + switch (snapshot_file_type) { + case V8Initializer::V8SnapshotFileType::kDefault: + filename = abi_32_bit ? kSnapshotFileName32 : kSnapshotFileName64; + break; + case V8Initializer::V8SnapshotFileType::kWithAdditionalContext: + filename = abi_32_bit ? kV8ContextSnapshotFileName32 + : kV8ContextSnapshotFileName64; + break; + } + CHECK(filename); + + GetV8FilePath(filename, &path); return path; } #endif // defined(OS_ANDROID)
diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h index e427c21..6f3265b 100644 --- a/gin/v8_initializer.h +++ b/gin/v8_initializer.h
@@ -67,7 +67,9 @@ #if defined(OS_ANDROID) static base::FilePath GetNativesFilePath(); - static base::FilePath GetSnapshotFilePath(bool abi_32_bit); + static base::FilePath GetSnapshotFilePath( + bool abi_32_bit, + V8SnapshotFileType snapshot_file_type); #endif #endif // V8_USE_EXTERNAL_STARTUP_DATA
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 6937c933..0275bf1 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -20542,6 +20542,9 @@ sk_surface_->prepareForExternalIO(); sk_surface_.reset(); + // It is important to reset state after each RasterCHROMIUM since skia can + // change the GL state which can invalidate the tracking done in this + // decoder. RestoreState(nullptr); }
diff --git a/headless/BUILD.gn b/headless/BUILD.gn index 36d947b..f75cb36 100644 --- a/headless/BUILD.gn +++ b/headless/BUILD.gn
@@ -587,8 +587,6 @@ "public/util/error_reporter_unittest.cc", "public/util/expedited_dispatcher_test.cc", "public/util/generic_url_request_job_test.cc", - "public/util/testing/generic_url_request_mocks.cc", - "public/util/testing/generic_url_request_mocks.h", "public/util/testing/test_in_memory_protocol_handler.cc", "public/util/testing/test_in_memory_protocol_handler.h", "public/util/throttled_dispatcher_test.cc", @@ -723,8 +721,6 @@ "public/util/compositor_controller_browsertest.cc", "public/util/testing/fake_managed_dispatch_url_request_job.cc", "public/util/testing/fake_managed_dispatch_url_request_job.h", - "public/util/testing/generic_url_request_mocks.cc", - "public/util/testing/generic_url_request_mocks.h", "public/util/testing/test_in_memory_protocol_handler.cc", "public/util/testing/test_in_memory_protocol_handler.h", "test/headless_browser_test.cc", @@ -771,6 +767,7 @@ deps = [ ":headless_renderer", + ":headless_test_support", "//base", "//components/security_state/content", "//content/test:test_support",
diff --git a/headless/lib/browser/headless_devtools_manager_delegate.cc b/headless/lib/browser/headless_devtools_manager_delegate.cc index 06f915be..4cbe49e 100644 --- a/headless/lib/browser/headless_devtools_manager_delegate.cc +++ b/headless/lib/browser/headless_devtools_manager_delegate.cc
@@ -8,9 +8,11 @@ #include <utility> #include "base/base64.h" +#include "base/base_switches.h" #include "base/command_line.h" #include "base/json/json_writer.h" #include "build/build_config.h" +#include "cc/base/switches.h" #include "components/viz/common/frame_sinks/begin_frame_args.h" #include "components/viz/common/switches.h" #include "content/public/browser/browser_thread.h" @@ -18,10 +20,12 @@ #include "content/public/browser/devtools_frontend_host.h" #include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/web_contents.h" +#include "content/public/common/content_switches.h" #include "headless/grit/headless_lib_resources.h" #include "headless/lib/browser/headless_browser_context_impl.h" #include "headless/lib/browser/headless_browser_impl.h" #include "headless/lib/browser/headless_web_contents_impl.h" +#include "headless/public/devtools/domains/headless_experimental.h" #include "headless/public/devtools/domains/target.h" #include "printing/units.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -285,43 +289,48 @@ : browser_(std::move(browser)) { // TODO(eseckler): Use third_party/inspector_protocol to generate harnesses // for commands, rather than binding commands here manually. - command_map_["Target.createTarget"] = base::Bind( + command_map_["Target.createTarget"] = base::BindRepeating( &HeadlessDevToolsManagerDelegate::CreateTarget, base::Unretained(this)); - command_map_["Target.closeTarget"] = base::Bind( + command_map_["Target.closeTarget"] = base::BindRepeating( &HeadlessDevToolsManagerDelegate::CloseTarget, base::Unretained(this)); - command_map_["Target.createBrowserContext"] = - base::Bind(&HeadlessDevToolsManagerDelegate::CreateBrowserContext, - base::Unretained(this)); - command_map_["Target.disposeBrowserContext"] = - base::Bind(&HeadlessDevToolsManagerDelegate::DisposeBrowserContext, - base::Unretained(this)); - command_map_["Browser.close"] = base::Bind( + command_map_["Target.createBrowserContext"] = base::BindRepeating( + &HeadlessDevToolsManagerDelegate::CreateBrowserContext, + base::Unretained(this)); + command_map_["Target.disposeBrowserContext"] = base::BindRepeating( + &HeadlessDevToolsManagerDelegate::DisposeBrowserContext, + base::Unretained(this)); + command_map_["Browser.close"] = base::BindRepeating( &HeadlessDevToolsManagerDelegate::Close, base::Unretained(this)); command_map_["Browser.getWindowForTarget"] = - base::Bind(&HeadlessDevToolsManagerDelegate::GetWindowForTarget, - base::Unretained(this)); + base::BindRepeating(&HeadlessDevToolsManagerDelegate::GetWindowForTarget, + base::Unretained(this)); command_map_["Browser.getWindowBounds"] = - base::Bind(&HeadlessDevToolsManagerDelegate::GetWindowBounds, - base::Unretained(this)); + base::BindRepeating(&HeadlessDevToolsManagerDelegate::GetWindowBounds, + base::Unretained(this)); command_map_["Browser.setWindowBounds"] = - base::Bind(&HeadlessDevToolsManagerDelegate::SetWindowBounds, - base::Unretained(this)); - command_map_["HeadlessExperimental.enable"] = - base::Bind(&HeadlessDevToolsManagerDelegate::EnableHeadlessExperimental, - base::Unretained(this)); - command_map_["HeadlessExperimental.disable"] = - base::Bind(&HeadlessDevToolsManagerDelegate::DisableHeadlessExperimental, - base::Unretained(this)); + base::BindRepeating(&HeadlessDevToolsManagerDelegate::SetWindowBounds, + base::Unretained(this)); + command_map_["HeadlessExperimental.enterDeterministicMode"] = + base::BindRepeating( + &HeadlessDevToolsManagerDelegate::EnterDeterministicMode, + base::Unretained(this)); + command_map_["HeadlessExperimental.enable"] = base::BindRepeating( + &HeadlessDevToolsManagerDelegate::EnableHeadlessExperimental, + base::Unretained(this)); + command_map_["HeadlessExperimental.disable"] = base::BindRepeating( + &HeadlessDevToolsManagerDelegate::DisableHeadlessExperimental, + base::Unretained(this)); unhandled_command_map_["Network.emulateNetworkConditions"] = - base::Bind(&HeadlessDevToolsManagerDelegate::EmulateNetworkConditions, - base::Unretained(this)); - unhandled_command_map_["Network.disable"] = base::Bind( + base::BindRepeating( + &HeadlessDevToolsManagerDelegate::EmulateNetworkConditions, + base::Unretained(this)); + unhandled_command_map_["Network.disable"] = base::BindRepeating( &HeadlessDevToolsManagerDelegate::NetworkDisable, base::Unretained(this)); - async_command_map_["Page.printToPDF"] = base::Bind( + async_command_map_["Page.printToPDF"] = base::BindRepeating( &HeadlessDevToolsManagerDelegate::PrintToPDF, base::Unretained(this)); - async_command_map_["HeadlessExperimental.beginFrame"] = base::Bind( + async_command_map_["HeadlessExperimental.beginFrame"] = base::BindRepeating( &HeadlessDevToolsManagerDelegate::BeginFrame, base::Unretained(this)); } @@ -462,7 +471,7 @@ } HeadlessPrintManager::FromWebContents(web_contents) ->GetPDFContents(rfh, settings, - base::Bind(&PDFCreated, callback, command_id)); + base::BindRepeating(&PDFCreated, callback, command_id)); #else callback.Run(CreateErrorResponse(command_id, kErrorServerError, "Printing is not enabled")); @@ -584,6 +593,25 @@ } std::unique_ptr<base::DictionaryValue> +HeadlessDevToolsManagerDelegate::EnterDeterministicMode( + content::DevToolsAgentHost* agent_host, + content::DevToolsAgentHostClient* client, + int command_id, + const base::DictionaryValue* params) { + if (const base::Value* initial_date = params->FindKey("initialDate")) { + browser_->options()->initial_virtual_time = + base::Time::FromDoubleT(initial_date->GetDouble()); + } else { + browser_->options()->initial_virtual_time = base::nullopt; + } + std::unique_ptr<base::Value> result( + headless_experimental::EnterDeterministicModeResult::Builder() + .Build() + ->Serialize()); + return CreateSuccessResponse(command_id, std::move(result)); +} + +std::unique_ptr<base::DictionaryValue> HeadlessDevToolsManagerDelegate::DisposeBrowserContext( content::DevToolsAgentHost* agent_host, content::DevToolsAgentHostClient* client, @@ -963,10 +991,11 @@ "single BeginFrame should be active at the same time."; } - headless_contents->BeginFrame(frame_timeticks, deadline, interval, - no_display_updates, capture_screenshot, - base::Bind(&OnBeginFrameFinished, command_id, - callback, encoding, quality)); + headless_contents->BeginFrame( + frame_timeticks, deadline, interval, no_display_updates, + capture_screenshot, + base::BindRepeating(&OnBeginFrameFinished, command_id, callback, encoding, + quality)); } } // namespace headless
diff --git a/headless/lib/browser/headless_devtools_manager_delegate.h b/headless/lib/browser/headless_devtools_manager_delegate.h index 612105ba..a332431 100644 --- a/headless/lib/browser/headless_devtools_manager_delegate.h +++ b/headless/lib/browser/headless_devtools_manager_delegate.h
@@ -118,6 +118,12 @@ int command_id, const base::DictionaryValue* params); + std::unique_ptr<base::DictionaryValue> EnterDeterministicMode( + content::DevToolsAgentHost* agent_host, + content::DevToolsAgentHostClient* client, + int command_id, + const base::DictionaryValue* params); + void SetNetworkConditions( std::vector<HeadlessBrowserContext*> browser_contexts, HeadlessNetworkConditions conditions);
diff --git a/headless/public/util/compositor_controller_browsertest.cc b/headless/public/util/compositor_controller_browsertest.cc index dca8a62..5a0aabd 100644 --- a/headless/public/util/compositor_controller_browsertest.cc +++ b/headless/public/util/compositor_controller_browsertest.cc
@@ -236,27 +236,6 @@ EXPECT_SCOPED(ExpectAdditionalFrameCounts(1, 1)); } - void CaptureDoubleScreenshot( - const base::RepeatingCallback<void(const std::string&)>& - screenshot_captured_callback) { - compositor_controller_->CaptureScreenshot( - headless_experimental::ScreenshotParamsFormat::PNG, 100, - base::BindRepeating( - &CompositorControllerBrowserTest::OnFirstScreenshotCaptured, - base::Unretained(this), screenshot_captured_callback)); - } - - void OnFirstScreenshotCaptured( - const base::RepeatingCallback<void(const std::string&)>& - screenshot_captured_callback, - const std::string& screenshot_data) { - // Ignore result of first screenshot because of crbug.com/817364. - // TODO(crbug.com/817364): Remove the second screenshot once bug is fixed. - compositor_controller_->CaptureScreenshot( - headless_experimental::ScreenshotParamsFormat::PNG, 100, - screenshot_captured_callback); - } - void FinishCompositorControllerTest() { render_frame_submission_observer_.reset(); FinishAsynchronousTest(); @@ -339,14 +318,15 @@ EXPECT_EQ(kNumFrames, result->GetResult()->GetValue()->GetInt()); - CaptureDoubleScreenshot( + compositor_controller_->CaptureScreenshot( + headless_experimental::ScreenshotParamsFormat::PNG, 100, base::BindRepeating(&CompositorControllerRafBrowserTest::OnScreenshot, base::Unretained(this))); } void OnScreenshot(const std::string& screenshot_data) { - // Screenshot should have incurred two new CompositorFrames from renderer. - EXPECT_SCOPED(ExpectAdditionalFrameCounts(2, 2)); + // Screenshot should have incurred a new CompositorFrame from renderer. + EXPECT_SCOPED(ExpectAdditionalFrameCounts(1, 1)); EXPECT_LT(0U, screenshot_data.length()); if (screenshot_data.length()) { @@ -356,8 +336,8 @@ EXPECT_EQ(800, result_bitmap.width()); EXPECT_EQ(600, result_bitmap.height()); SkColor actual_color = result_bitmap.getColor(200, 200); - // Screenshot was the fifth frame, so background color should be #500. - SkColor expected_color = SkColorSetRGB(0x55, 0x00, 0x00); + // Screenshot was the forth frame, so background color should be #400. + SkColor expected_color = SkColorSetRGB(0x44, 0x00, 0x00); EXPECT_EQ(expected_color, actual_color); } @@ -426,16 +406,16 @@ // first screenshot is taken. EXPECT_SCOPED(ExpectAdditionalFrameCounts(kNumFramesFirstIteration, 0)); - CaptureDoubleScreenshot( + compositor_controller_->CaptureScreenshot( + headless_experimental::ScreenshotParamsFormat::PNG, 100, base::BindRepeating(&CompositorControllerImageAnimationBrowserTest:: OnScreenshotAfterFirstIteration, base::Unretained(this))); } void OnScreenshotAfterFirstIteration(const std::string& screenshot_data) { - // Screenshot should have incurred one new CompositorFrame from renderer, - // but two new BeginFrames. - EXPECT_SCOPED(ExpectAdditionalFrameCounts(2, 1)); + // Screenshot should have incurred a new CompositorFrame from renderer. + EXPECT_SCOPED(ExpectAdditionalFrameCounts(1, 1)); EXPECT_LT(0U, screenshot_data.length()); if (screenshot_data.length()) { @@ -469,16 +449,16 @@ EXPECT_SCOPED( ExpectAdditionalFrameCounts(kNumFramesSecondIteration - 1, 0)); - CaptureDoubleScreenshot( + compositor_controller_->CaptureScreenshot( + headless_experimental::ScreenshotParamsFormat::PNG, 100, base::BindRepeating(&CompositorControllerImageAnimationBrowserTest:: OnScreenshotAfterSecondIteration, base::Unretained(this))); } void OnScreenshotAfterSecondIteration(const std::string& screenshot_data) { - // Screenshot should have incurred one new CompositorFrame from renderer, - // but two new BeginFrames. - EXPECT_SCOPED(ExpectAdditionalFrameCounts(2, 1)); + // Screenshot should have incurred a new CompositorFrame from renderer. + EXPECT_SCOPED(ExpectAdditionalFrameCounts(1, 1)); EXPECT_LT(0U, screenshot_data.length()); @@ -512,7 +492,8 @@ // the first animation frame is skipped because of the prior screenshot. EXPECT_SCOPED(ExpectAdditionalFrameCounts(kNumFramesThirdIteration - 1, 0)); - CaptureDoubleScreenshot( + compositor_controller_->CaptureScreenshot( + headless_experimental::ScreenshotParamsFormat::PNG, 100, base::BindRepeating(&CompositorControllerImageAnimationBrowserTest:: OnScreenshotAfterThirdIteration, base::Unretained(this))); @@ -520,8 +501,8 @@ void OnScreenshotAfterThirdIteration(const std::string& screenshot_data) { // Screenshot should have incurred no new CompositorFrame from renderer - // since animation frame didn't change, but two new BeginFrames. - EXPECT_SCOPED(ExpectAdditionalFrameCounts(2, 0)); + // since animation frame didn't change, but a new BeginFrame. + EXPECT_SCOPED(ExpectAdditionalFrameCounts(1, 0)); EXPECT_LT(0U, screenshot_data.length()); if (screenshot_data.length()) {
diff --git a/infra/config/global/cr-buildbucket.cfg b/infra/config/global/cr-buildbucket.cfg index ad993369..e2db0ef 100644 --- a/infra/config/global/cr-buildbucket.cfg +++ b/infra/config/global/cr-buildbucket.cfg
@@ -300,7 +300,7 @@ dimensions: "cores:8" } builders { - name: "Mac10.9 Tests (dbg)" + name: "Mac10.13 Tests (dbg)" mixins: "mac-ci" dimensions: "cpu:x86-64" dimensions: "cores:8"
diff --git a/infra/config/global/luci-milo-dev.cfg b/infra/config/global/luci-milo-dev.cfg index 1163555..9613275e 100644 --- a/infra/config/global/luci-milo-dev.cfg +++ b/infra/config/global/luci-milo-dev.cfg
@@ -339,9 +339,9 @@ short_name: "bld" } builders: { - name: "buildbot/chromium.mac/Mac10.9 Tests" + name: "buildbot/chromium.mac/Mac10.13 Tests" category: "chromium.mac|release|tester" - short_name: "9" + short_name: "13" } builders: { name: "buildbot/chromium.mac/Mac10.10 Tests" @@ -364,9 +364,9 @@ short_name: "bld" } builders: { - name: "buildbot/chromium.mac/Mac10.9 Tests (dbg)" + name: "buildbot/chromium.mac/Mac10.13 Tests (dbg)" category: "chromium.mac|debug" - short_name: "9" + short_name: "13" } builders: { name: "buildbot/chromium.mac/ios-device" @@ -785,9 +785,9 @@ short_name: "bld" } builders: { - name: "buildbot/chromium.mac/Mac10.9 Tests" + name: "buildbot/chromium.mac/Mac10.13 Tests" category: "release|tester" - short_name: "9" + short_name: "13" } builders: { name: "buildbot/chromium.mac/Mac10.10 Tests" @@ -810,9 +810,9 @@ short_name: "bld" } builders: { - name: "buildbot/chromium.mac/Mac10.9 Tests (dbg)" + name: "buildbot/chromium.mac/Mac10.13 Tests (dbg)" category: "debug" - short_name: "9" + short_name: "13" } builders: { name: "buildbot/chromium.mac/ios-device"
diff --git a/infra/config/global/luci-milo.cfg b/infra/config/global/luci-milo.cfg index a2280b8..92486b5 100644 --- a/infra/config/global/luci-milo.cfg +++ b/infra/config/global/luci-milo.cfg
@@ -339,9 +339,9 @@ short_name: "bld" } builders: { - name: "buildbot/chromium.mac/Mac10.9 Tests" + name: "buildbot/chromium.mac/Mac10.13 Tests" category: "chromium.mac|release|tester" - short_name: "9" + short_name: "13" } builders: { name: "buildbot/chromium.mac/Mac10.10 Tests" @@ -365,10 +365,10 @@ short_name: "bld" } builders: { - name: "buildbot/chromium.mac/Mac10.9 Tests (dbg)" - name: "buildbucket/luci.chromium.ci/Mac10.9 Tests (dbg)" + name: "buildbot/chromium.mac/Mac10.13 Tests (dbg)" + name: "buildbucket/luci.chromium.ci/Mac10.13 Tests (dbg)" category: "chromium.mac|debug" - short_name: "9" + short_name: "13" } builders: { name: "buildbot/chromium.mac/ios-device" @@ -789,9 +789,9 @@ short_name: "bld" } builders: { - name: "buildbot/chromium.mac/Mac10.9 Tests" + name: "buildbot/chromium.mac/Mac10.13 Tests" category: "release|tester" - short_name: "9" + short_name: "13" } builders: { name: "buildbot/chromium.mac/Mac10.10 Tests" @@ -815,10 +815,10 @@ short_name: "bld" } builders: { - name: "buildbot/chromium.mac/Mac10.9 Tests (dbg)" - name: "buildbucket/luci.chromium.ci/Mac10.9 Tests (dbg)" + name: "buildbot/chromium.mac/Mac10.13 Tests (dbg)" + name: "buildbucket/luci.chromium.ci/Mac10.13 Tests (dbg)" category: "debug" - short_name: "9" + short_name: "13" } builders: { name: "buildbot/chromium.mac/ios-device" @@ -1562,13 +1562,13 @@ } builders: { - name: "buildbucket/luci.chromium.ci/Mac10.9 Tests (dbg)" - category: "mac|debug|tester|10.9" + name: "buildbucket/luci.chromium.ci/Mac10.13 Tests (dbg)" + category: "mac|debug|tester|10.13" short_name: "ci" } builders: { - name: "buildbot/chromium.mac/Mac10.9 Tests (dbg)" - category: "mac|debug|tester|10.9" + name: "buildbot/chromium.mac/Mac10.13 Tests (dbg)" + category: "mac|debug|tester|10.13" short_name: "bb" }
diff --git a/infra/config/global/luci-scheduler.cfg b/infra/config/global/luci-scheduler.cfg index 0c6e158..816af71 100644 --- a/infra/config/global/luci-scheduler.cfg +++ b/infra/config/global/luci-scheduler.cfg
@@ -262,13 +262,13 @@ } job { - id: "Mac10.9 Tests (dbg)" + id: "Mac10.13 Tests (dbg)" # Triggered by "Mac Builder (dbg)". acl_sets: "triggered-by-parent-builders" buildbucket: { server: "cr-buildbucket.appspot.com" bucket: "luci.chromium.ci" - builder: "Mac10.9 Tests (dbg)" + builder: "Mac10.13 Tests (dbg)" } }
diff --git a/mash/simple_wm/simple_wm.cc b/mash/simple_wm/simple_wm.cc index 2ea6ae5..7c2e931 100644 --- a/mash/simple_wm/simple_wm.cc +++ b/mash/simple_wm/simple_wm.cc
@@ -373,10 +373,9 @@ context()->QuitNow(); return; } - window_tree_client_ = std::make_unique<aura::WindowTreeClient>( + window_tree_client_ = aura::WindowTreeClient::CreateForWindowManager( context()->connector(), this, this); aura::Env::GetInstance()->SetWindowTreeClient(window_tree_client_.get()); - window_tree_client_->ConnectAsWindowManager(); } ////////////////////////////////////////////////////////////////////////////////
diff --git a/media/audio/audio_debug_recording_helper.cc b/media/audio/audio_debug_recording_helper.cc index 52fc81a3..a1d2b7d 100644 --- a/media/audio/audio_debug_recording_helper.cc +++ b/media/audio/audio_debug_recording_helper.cc
@@ -31,14 +31,15 @@ } void AudioDebugRecordingHelper::EnableDebugRecording( - const base::FilePath& file_name_suffix, + AudioDebugRecordingStreamType stream_type, + uint32_t id, CreateWavFileCallback create_file_callback) { DCHECK(task_runner_->BelongsToCurrentThread()); DCHECK(!debug_writer_); debug_writer_ = CreateAudioDebugFileWriter(params_); std::move(create_file_callback) - .Run(file_name_suffix, + .Run(stream_type, id, base::BindOnce(&AudioDebugRecordingHelper::StartDebugRecordingToFile, weak_factory_.GetWeakPtr())); }
diff --git a/media/audio/audio_debug_recording_helper.h b/media/audio/audio_debug_recording_helper.h index 3947fd7..91f297c 100644 --- a/media/audio/audio_debug_recording_helper.h +++ b/media/audio/audio_debug_recording_helper.h
@@ -18,7 +18,6 @@ namespace base { class File; -class FilePath; class SingleThreadTaskRunner; } @@ -26,6 +25,8 @@ class AudioBus; +enum class AudioDebugRecordingStreamType { kInput = 0, kOutput = 1 }; + // Interface for feeding data to a recorder. class AudioDebugRecorder { public: @@ -51,7 +52,8 @@ class MEDIA_EXPORT AudioDebugRecordingHelper : public AudioDebugRecorder { public: using CreateWavFileCallback = base::OnceCallback<void( - const base::FilePath&, + AudioDebugRecordingStreamType stream_type, + uint32_t id, base::OnceCallback<void(base::File)> reply_callback)>; AudioDebugRecordingHelper( @@ -62,7 +64,8 @@ // Enable debug recording. Creates |debug_writer_| and runs // |create_file_callback| to create debug recording file. - virtual void EnableDebugRecording(const base::FilePath& file_name_suffix, + virtual void EnableDebugRecording(AudioDebugRecordingStreamType stream_type, + uint32_t id, CreateWavFileCallback create_file_callback); // Disable debug recording. Destroys |debug_writer_|.
diff --git a/media/audio/audio_debug_recording_helper_unittest.cc b/media/audio/audio_debug_recording_helper_unittest.cc index eeee9d4..d93475e 100644 --- a/media/audio/audio_debug_recording_helper_unittest.cc +++ b/media/audio/audio_debug_recording_helper_unittest.cc
@@ -12,13 +12,10 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" -#include "base/logging.h" #include "base/memory/ptr_util.h" #include "base/run_loop.h" #include "base/single_thread_task_runner.h" -#include "base/strings/string_number_conversions.h" #include "base/test/scoped_task_environment.h" -#include "base/test/test_message_loop.h" #include "media/base/audio_bus.h" #include "media/base/audio_sample_types.h" #include "testing/gmock/include/gmock/gmock.h" @@ -27,23 +24,12 @@ using testing::_; using testing::Return; -#if defined(OS_WIN) -#define IntToStringType base::IntToString16 -#else -#define IntToStringType base::IntToString -#endif - namespace media { namespace { -const base::FilePath::CharType kBaseFileName[] = - FILE_PATH_LITERAL("debug_recording"); - -const base::FilePath::CharType kFileNameSuffix[] = - FILE_PATH_LITERAL("output.1"); - -const base::FilePath::CharType kWavExtension[] = FILE_PATH_LITERAL("wav"); +const base::FilePath::CharType kFileName[] = + FILE_PATH_LITERAL("debug_recording.output.1.wav"); } // namespace @@ -116,12 +102,9 @@ DISALLOW_COPY_AND_ASSIGN(AudioDebugRecordingHelperUnderTest); }; -// The test fixture. class AudioDebugRecordingHelperTest : public ::testing::Test { public: - AudioDebugRecordingHelperTest() - : file_name_suffix_(base::FilePath(kFileNameSuffix)) {} - + AudioDebugRecordingHelperTest() {} ~AudioDebugRecordingHelperTest() override = default; // Helper function that creates a recording helper. @@ -137,30 +120,30 @@ // Bound and passed to AudioDebugRecordingHelper::EnableDebugRecording as // AudioDebugRecordingHelper::CreateWavFileCallback. - void CreateWavFile(const base::FilePath& file_name_suffix, + void CreateWavFile(AudioDebugRecordingStreamType stream_type, + uint32_t id, base::OnceCallback<void(base::File)> reply_callback) { - // Check that AudioDebugRecordingHelper::EnableDebugRecording adds file - // extension to file name suffix. - EXPECT_EQ(file_name_suffix_, file_name_suffix); + // Check that AudioDebugRecordingHelper::EnableDebugRecording calls + // CreateWavFileCallback with expected stream type and id. + EXPECT_EQ(stream_type_, stream_type); + EXPECT_EQ(id_, id); base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - base::FilePath base_file_path( - temp_dir.GetPath().Append(base::FilePath(kBaseFileName))); - base::FilePath file_path = - base_file_path.AddExtension(file_name_suffix.value()) - .AddExtension(kWavExtension); + base::FilePath path(temp_dir.GetPath().Append(base::FilePath(kFileName))); base::File debug_file( - file_path, base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE); + path, base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE); // Run |reply_callback| with a valid file for expected // MockAudioDebugFileWriter::Start mocked call to happen. std::move(reply_callback).Run(std::move(debug_file)); // File can be removed right away because MockAudioDebugFileWriter::Start is // called synchronously. - ASSERT_TRUE(base::DeleteFile(file_path, false)); + ASSERT_TRUE(base::DeleteFile(path, false)); } protected: - base::FilePath file_name_suffix_; + const AudioDebugRecordingStreamType stream_type_ = + AudioDebugRecordingStreamType::kInput; + const uint32_t id_ = 1; // The test task environment. base::test::ScopedTaskEnvironment scoped_task_environment_; @@ -196,7 +179,7 @@ CreateRecordingHelper(params, base::OnceClosure()); recording_helper->EnableDebugRecording( - file_name_suffix_, + stream_type_, id_, base::BindOnce(&AudioDebugRecordingHelperTest::CreateWavFile, base::Unretained(this))); EXPECT_CALL(*static_cast<MockAudioDebugFileWriter*>( @@ -205,7 +188,7 @@ recording_helper->DisableDebugRecording(); recording_helper->EnableDebugRecording( - file_name_suffix_, + stream_type_, id_, base::BindOnce(&AudioDebugRecordingHelperTest::CreateWavFile, base::Unretained(this))); EXPECT_CALL(*static_cast<MockAudioDebugFileWriter*>( @@ -239,7 +222,7 @@ recording_helper->OnData(audio_bus.get()); recording_helper->EnableDebugRecording( - file_name_suffix_, + stream_type_, id_, base::BindOnce(&AudioDebugRecordingHelperTest::CreateWavFile, base::Unretained(this))); MockAudioDebugFileWriter* mock_audio_file_writer = @@ -261,7 +244,7 @@ // running the message loop until after disabling, and one call after // disabling. recording_helper->EnableDebugRecording( - file_name_suffix_, + stream_type_, id_, base::BindOnce(&AudioDebugRecordingHelperTest::CreateWavFile, base::Unretained(this))); mock_audio_file_writer = static_cast<MockAudioDebugFileWriter*>(
diff --git a/media/audio/audio_debug_recording_manager.cc b/media/audio/audio_debug_recording_manager.cc index 7d8ebc5..510f6b6 100644 --- a/media/audio/audio_debug_recording_manager.cc +++ b/media/audio/audio_debug_recording_manager.cc
@@ -7,34 +7,17 @@ #include <memory> #include "base/bind.h" -#include "base/files/file_path.h" #include "base/memory/ptr_util.h" #include "base/single_thread_task_runner.h" -#include "base/strings/string_number_conversions.h" #include "base/task_runner_util.h" namespace media { namespace { - // Running id recording sources. -int g_next_stream_id = 1; - -#if defined(OS_WIN) -#define IntToStringType base::IntToString16 -#else -#define IntToStringType base::IntToString -#endif - -// Returns file name suffix created by appending |id| to |stream_type|. -base::FilePath GetDebugRecordingFileNameSuffix( - const base::FilePath::StringType& stream_type, - int id) { - return base::FilePath(stream_type).AddExtension(IntToStringType(id)); +uint32_t g_next_stream_id = 1; } -} // namespace - AudioDebugRecordingManager::AudioDebugRecordingManager( scoped_refptr<base::SingleThreadTaskRunner> task_runner) : task_runner_(std::move(task_runner)), weak_factory_(this) {} @@ -48,12 +31,11 @@ create_file_callback_ = std::move(create_file_callback); for (const auto& it : debug_recording_helpers_) { - int id = it.first; + uint32_t id = it.first; AudioDebugRecordingHelper* recording_helper = it.second.first; - const base::FilePath::StringType& stream_type = it.second.second; - recording_helper->EnableDebugRecording( - GetDebugRecordingFileNameSuffix(stream_type, id), - create_file_callback_); + AudioDebugRecordingStreamType stream_type = it.second.second; + recording_helper->EnableDebugRecording(stream_type, id, + create_file_callback_); } } @@ -69,11 +51,11 @@ std::unique_ptr<AudioDebugRecorder> AudioDebugRecordingManager::RegisterDebugRecordingSource( - const base::FilePath::StringType& stream_type, + AudioDebugRecordingStreamType stream_type, const AudioParameters& params) { DCHECK(task_runner_->BelongsToCurrentThread()); - const int id = g_next_stream_id++; + const uint32_t id = g_next_stream_id++; // Normally, the manager will outlive the one who registers and owns the // returned recorder. But to not require this we use a weak pointer. @@ -85,9 +67,8 @@ weak_factory_.GetWeakPtr(), id)); if (IsDebugRecordingEnabled()) { - recording_helper->EnableDebugRecording( - GetDebugRecordingFileNameSuffix(stream_type, id), - create_file_callback_); + recording_helper->EnableDebugRecording(stream_type, id, + create_file_callback_); } debug_recording_helpers_[id] = @@ -96,7 +77,7 @@ return base::WrapUnique<AudioDebugRecorder>(recording_helper.release()); } -void AudioDebugRecordingManager::UnregisterDebugRecordingSource(int id) { +void AudioDebugRecordingManager::UnregisterDebugRecordingSource(uint32_t id) { DCHECK(task_runner_->BelongsToCurrentThread()); auto it = debug_recording_helpers_.find(id); DCHECK(it != debug_recording_helpers_.end());
diff --git a/media/audio/audio_debug_recording_manager.h b/media/audio/audio_debug_recording_manager.h index e05f68c..1852eea 100644 --- a/media/audio/audio_debug_recording_manager.h +++ b/media/audio/audio_debug_recording_manager.h
@@ -11,7 +11,6 @@ #include <utility> #include "base/callback.h" -#include "base/files/file_path.h" #include "base/gtest_prod_util.h" #include "base/memory/weak_ptr.h" #include "base/threading/thread_checker.h" @@ -20,7 +19,6 @@ #include "media/base/media_export.h" namespace base { -class FilePath; class SingleThreadTaskRunner; } @@ -58,7 +56,8 @@ class MEDIA_EXPORT AudioDebugRecordingManager { public: using CreateWavFileCallback = base::RepeatingCallback<void( - const base::FilePath&, + AudioDebugRecordingStreamType stream_type, + uint32_t id, base::OnceCallback<void(base::File)> reply_callback)>; AudioDebugRecordingManager( @@ -72,7 +71,7 @@ // Registers a source and returns a wrapped recorder. |stream_type| is added // to the base filename, along with a unique running ID. std::unique_ptr<AudioDebugRecorder> RegisterDebugRecordingSource( - const base::FilePath::StringType& stream_type, + AudioDebugRecordingStreamType stream_type, const AudioParameters& params); protected: @@ -97,11 +96,11 @@ // Map type from source id to recorder and stream type (input/output). using DebugRecordingHelperMap = std::map< - int, - std::pair<AudioDebugRecordingHelper*, base::FilePath::StringType>>; + uint32_t, + std::pair<AudioDebugRecordingHelper*, AudioDebugRecordingStreamType>>; // Unregisters a source. - void UnregisterDebugRecordingSource(int id); + void UnregisterDebugRecordingSource(uint32_t id); bool IsDebugRecordingEnabled();
diff --git a/media/audio/audio_debug_recording_manager_unittest.cc b/media/audio/audio_debug_recording_manager_unittest.cc index dad3e14..014491b5 100644 --- a/media/audio/audio_debug_recording_manager_unittest.cc +++ b/media/audio/audio_debug_recording_manager_unittest.cc
@@ -8,10 +8,7 @@ #include <vector> #include "base/bind.h" -#include "base/files/file_path.h" -#include "base/logging.h" #include "base/single_thread_task_runner.h" -#include "base/strings/string_number_conversions.h" #include "base/test/scoped_task_environment.h" #include "media/audio/audio_debug_recording_helper.h" #include "testing/gmock/include/gmock/gmock.h" @@ -19,18 +16,13 @@ using testing::_; -#if defined(OS_WIN) -#define IntToStringType base::IntToString16 -#else -#define IntToStringType base::IntToString -#endif - namespace media { namespace { // The stream type expected to be added to file name. -const base::FilePath::CharType kStreamType[] = FILE_PATH_LITERAL("output"); +const AudioDebugRecordingStreamType kStreamType( + AudioDebugRecordingStreamType::kOutput); // Used to be able to set call expectations in the MockAudioDebugRecordingHelper // ctor. See also comment on the test EnableRegisterDisable. @@ -51,7 +43,8 @@ // Function bound and passed to AudioDebugRecordingManager::EnableDebugRecording // as AudioDebugRecordingManager::CreateWavFileCallback. -void CreateWavFile(const base::FilePath& file_path, +void CreateWavFile(AudioDebugRecordingStreamType stream_type, + uint32_t id, base::OnceCallback<void(base::File)>) {} } // namespace @@ -68,7 +61,7 @@ base::OnceClosure()), on_destruction_closure_in_mock_(std::move(on_destruction_closure)) { if (g_expect_enable_after_create_helper) - EXPECT_CALL(*this, DoEnableDebugRecording(_)); + EXPECT_CALL(*this, DoEnableDebugRecording(_, _)); } ~MockAudioDebugRecordingHelper() override { @@ -76,11 +69,13 @@ std::move(on_destruction_closure_in_mock_).Run(); } - MOCK_METHOD1(DoEnableDebugRecording, void(const base::FilePath&)); - void EnableDebugRecording(const base::FilePath& file_name_suffix, + MOCK_METHOD2(DoEnableDebugRecording, + void(AudioDebugRecordingStreamType, uint32_t)); + void EnableDebugRecording(AudioDebugRecordingStreamType stream_type, + uint32_t id, AudioDebugRecordingHelper::CreateWavFileCallback create_file_callback) override { - DoEnableDebugRecording(file_name_suffix); + DoEnableDebugRecording(stream_type, id); } MOCK_METHOD0(DisableDebugRecording, void()); @@ -139,13 +134,13 @@ // The expected next source id the manager will assign. It's static since the // manager uses a global running id, thus doesn't restart at each // instantiation. - static int expected_next_source_id_; + static uint32_t expected_next_source_id_; private: DISALLOW_COPY_AND_ASSIGN(AudioDebugRecordingManagerTest); }; -int AudioDebugRecordingManagerTest::expected_next_source_id_ = 1; +uint32_t AudioDebugRecordingManagerTest::expected_next_source_id_ = 1; // Shouldn't do anything but store the CreateWavFileCallback, i.e. no calls to // recorders. @@ -176,7 +171,7 @@ TEST_F(AudioDebugRecordingManagerTest, RegisterEnableDisable) { // Store away the extected id for the next source to use after registering all // sources. - int expected_id = expected_next_source_id_; + uint32_t expected_id = expected_next_source_id_; const AudioParameters params; std::vector<std::unique_ptr<AudioDebugRecorder>> recorders; @@ -189,11 +184,8 @@ for (const auto& recorder : recorders) { MockAudioDebugRecordingHelper* mock_recording_helper = static_cast<MockAudioDebugRecordingHelper*>(recorder.get()); - base::FilePath expected_file_path = - base::FilePath(kStreamType) - .AddExtension(IntToStringType(expected_id++)); EXPECT_CALL(*mock_recording_helper, - DoEnableDebugRecording(expected_file_path)); + DoEnableDebugRecording(kStreamType, expected_id++)); EXPECT_CALL(*mock_recording_helper, DisableDebugRecording()); }
diff --git a/media/audio/audio_debug_recording_session_impl.cc b/media/audio/audio_debug_recording_session_impl.cc index cf20ada..1718174 100644 --- a/media/audio/audio_debug_recording_session_impl.cc +++ b/media/audio/audio_debug_recording_session_impl.cc
@@ -10,8 +10,10 @@ #include "base/files/file.h" #include "base/files/file_path.h" #include "base/single_thread_task_runner.h" +#include "base/strings/string_number_conversions.h" #include "base/task_scheduler/post_task.h" #include "base/task_scheduler/task_traits.h" +#include "build/build_config.h" #include "media/audio/audio_debug_recording_manager.h" #include "media/audio/audio_manager.h" @@ -21,13 +23,41 @@ // AudioManager::Shutdown() (called before AudioManager destruction) shuts down // AudioManager thread. +// TODO(https://crbug.com/788657) remove this file after switching to mojo +// implementation. + namespace { -const base::FilePath::CharType kWavExtension[] = FILE_PATH_LITERAL("wav"); +#if defined(OS_WIN) +#define IntToStringType base::IntToString16 +#else +#define IntToStringType base::IntToString +#endif + +bool StreamTypeToStringType(AudioDebugRecordingStreamType stream_type, + base::FilePath::StringType* out) { + switch (stream_type) { + case AudioDebugRecordingStreamType::kInput: + *out = FILE_PATH_LITERAL("input"); + return true; + case AudioDebugRecordingStreamType::kOutput: + *out = FILE_PATH_LITERAL("output"); + return true; + } + NOTREACHED(); + return false; +} void CreateWavFile(const base::FilePath& debug_recording_file_path, - const base::FilePath& file_name_suffix, + AudioDebugRecordingStreamType stream_type, + uint32_t id, base::OnceCallback<void(base::File)> reply_callback) { + base::FilePath::StringType stream_type_str; + if (!StreamTypeToStringType(stream_type, &stream_type_str)) { + std::move(reply_callback).Run(base::File()); + return; + } + base::PostTaskWithTraitsAndReplyWithResult( FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND, @@ -37,8 +67,9 @@ return base::File(file_name, base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE); }, - debug_recording_file_path.AddExtension(file_name_suffix.value()) - .AddExtension(kWavExtension)), + debug_recording_file_path.AddExtension(stream_type_str) + .AddExtension(IntToStringType(id)) + .AddExtension(FILE_PATH_LITERAL("wav"))), std::move(reply_callback)); }
diff --git a/media/audio/audio_debug_recording_session_impl_unittest.cc b/media/audio/audio_debug_recording_session_impl_unittest.cc index 70eac86..cc69925 100644 --- a/media/audio/audio_debug_recording_session_impl_unittest.cc +++ b/media/audio/audio_debug_recording_session_impl_unittest.cc
@@ -9,7 +9,9 @@ #include "base/bind.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/strings/string_number_conversions.h" #include "base/test/scoped_task_environment.h" +#include "build/build_config.h" #include "media/audio/audio_debug_recording_test.h" #include "media/audio/mock_audio_debug_recording_manager.h" #include "media/audio/mock_audio_manager.h" @@ -19,13 +21,18 @@ namespace { +#if defined(OS_WIN) +#define IntToStringType base::IntToString16 +#else +#define IntToStringType base::IntToString +#endif + const base::FilePath::CharType kBaseFileName[] = FILE_PATH_LITERAL("debug_recording"); +const base::FilePath::CharType kInput[] = FILE_PATH_LITERAL("input"); +const base::FilePath::CharType kOutput[] = FILE_PATH_LITERAL("output"); +const int kId = 1; const base::FilePath::CharType kWavExtension[] = FILE_PATH_LITERAL("wav"); -const base::FilePath::CharType kInputFileNameSuffix[] = - FILE_PATH_LITERAL("input.1"); -const base::FilePath::CharType kOutputFileNameSuffix[] = - FILE_PATH_LITERAL("output.1"); void OnFileCreated(base::File debug_file) {} @@ -35,9 +42,9 @@ void CreateInputOutputDebugRecordingFiles( const AudioDebugRecordingManager::CreateWavFileCallback& create_file_callback) { - create_file_callback.Run(base::FilePath(kInputFileNameSuffix), + create_file_callback.Run(AudioDebugRecordingStreamType::kInput, kId, base::BindOnce(&OnFileCreated)); - create_file_callback.Run(base::FilePath(kOutputFileNameSuffix), + create_file_callback.Run(AudioDebugRecordingStreamType::kOutput, kId, base::BindOnce(&OnFileCreated)); } @@ -45,7 +52,10 @@ class AudioDebugRecordingSessionImplTest : public AudioDebugRecordingTest { public: - AudioDebugRecordingSessionImplTest() { SetBaseFilePath(); } + AudioDebugRecordingSessionImplTest() { + CHECK(temp_dir_.CreateUniqueTempDir()); + base_file_path_ = temp_dir_.GetPath().Append(base::FilePath(kBaseFileName)); + } protected: void CreateDebugRecordingSession() { @@ -58,14 +68,16 @@ audio_debug_recording_session_impl_.reset(); } + base::FilePath GetFileName(const base::FilePath::StringType& stream_type, + uint32_t id) { + return base_file_path_.AddExtension(stream_type) + .AddExtension(IntToStringType(id)) + .AddExtension(kWavExtension); + } + base::FilePath base_file_path_; private: - void SetBaseFilePath() { - CHECK(temp_dir_.CreateUniqueTempDir()); - base_file_path_ = temp_dir_.GetPath().Append(base::FilePath(kBaseFileName)); - } - base::ScopedTempDir temp_dir_; std::unique_ptr<AudioDebugRecordingSessionImpl> audio_debug_recording_session_impl_; @@ -116,12 +128,8 @@ scoped_task_environment_.RunUntilIdle(); // Check that expected files were created. - base::FilePath input_recording_filename( - base_file_path_.AddExtension(kInputFileNameSuffix) - .AddExtension(kWavExtension)); - base::FilePath output_recording_filename( - base_file_path_.AddExtension(kOutputFileNameSuffix) - .AddExtension(kWavExtension)); + base::FilePath input_recording_filename(GetFileName(kInput, kId)); + base::FilePath output_recording_filename(GetFileName(kOutput, kId)); EXPECT_TRUE(base::PathExists(output_recording_filename)); EXPECT_TRUE(base::PathExists(input_recording_filename));
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc index 328ebe8f..83a1239 100644 --- a/media/audio/audio_manager_base.cc +++ b/media/audio/audio_manager_base.cc
@@ -302,7 +302,7 @@ base::BindRepeating( &AudioDebugRecordingManager::RegisterDebugRecordingSource, base::Unretained(debug_recording_manager_.get()), - FILE_PATH_LITERAL("input"), params), + AudioDebugRecordingStreamType::kInput, params), stream); } #endif // BUILDFLAG(ENABLE_WEBRTC) @@ -424,7 +424,7 @@ ? base::BindRepeating( &AudioDebugRecordingManager::RegisterDebugRecordingSource, base::Unretained(debug_recording_manager_.get()), - FILE_PATH_LITERAL("output")) + AudioDebugRecordingStreamType::kOutput) : base::BindRepeating(&GetNullptrAudioDebugRecorder)); } else { dispatcher = std::make_unique<AudioOutputDispatcherImpl>(
diff --git a/media/audio/fuchsia/audio_manager_fuchsia.cc b/media/audio/fuchsia/audio_manager_fuchsia.cc index 7e7a96a..05b9f8dd 100644 --- a/media/audio/fuchsia/audio_manager_fuchsia.cc +++ b/media/audio/fuchsia/audio_manager_fuchsia.cc
@@ -18,7 +18,9 @@ : AudioManagerBase(std::move(audio_thread), audio_log_factory), fuchsia_audio_manager_(fuchsia_audio_manager_create()) {} -AudioManagerFuchsia::~AudioManagerFuchsia() {} +AudioManagerFuchsia::~AudioManagerFuchsia() { + fuchsia_audio_manager_free(fuchsia_audio_manager_); +} bool AudioManagerFuchsia::HasAudioOutputDevices() { return fuchsia_audio_manager_get_output_devices(fuchsia_audio_manager_,
diff --git a/media/audio/mock_audio_debug_recording_manager.h b/media/audio/mock_audio_debug_recording_manager.h index 97ec53c..797f88b 100644 --- a/media/audio/mock_audio_debug_recording_manager.h +++ b/media/audio/mock_audio_debug_recording_manager.h
@@ -18,11 +18,9 @@ ~MockAudioDebugRecordingManager() override; - MOCK_METHOD1( - EnableDebugRecording, - void(base::RepeatingCallback<void(const base::FilePath&, - base::OnceCallback<void(base::File)>)> - create_file_callback)); + MOCK_METHOD1(EnableDebugRecording, + void(AudioDebugRecordingManager::CreateWavFileCallback + create_file_callback)); MOCK_METHOD0(DisableDebugRecording, void()); private:
diff --git a/media/blink/BUILD.gn b/media/blink/BUILD.gn index fb93f24..21a9ddb 100644 --- a/media/blink/BUILD.gn +++ b/media/blink/BUILD.gn
@@ -4,6 +4,7 @@ import("//media/media_options.gni") import("//testing/test.gni") +import("//tools/v8_context_snapshot/v8_context_snapshot.gni") component("blink") { output_name = "media_blink" @@ -157,9 +158,11 @@ ] if (is_android) { - deps += [ - "//media/base/android:media_java", - "//v8:v8_external_startup_data_assets", - ] + deps += [ "//media/base/android:media_java" ] + if (use_v8_context_snapshot) { + deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ] + } else { + deps += [ "//v8:v8_external_startup_data_assets" ] + } } }
diff --git a/net/quic/core/congestion_control/bbr_sender.cc b/net/quic/core/congestion_control/bbr_sender.cc index 05266e3..bef1e5cd 100644 --- a/net/quic/core/congestion_control/bbr_sender.cc +++ b/net/quic/core/congestion_control/bbr_sender.cc
@@ -412,6 +412,11 @@ const AckedPacketVector& acked_packets) { QuicTime::Delta sample_min_rtt = QuicTime::Delta::Infinite(); for (const auto& packet : acked_packets) { + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2) && + packet.bytes_acked == 0) { + // Skip acked packets with 0 in flight bytes when updating bandwidth. + continue; + } BandwidthSample bandwidth_sample = sampler_->OnPacketAcknowledged(now, packet.packet_number); last_sample_is_app_limited_ = bandwidth_sample.is_app_limited;
diff --git a/net/quic/core/quic_connection.cc b/net/quic/core/quic_connection.cc index c8e6c5d..8f43ec8 100644 --- a/net/quic/core/quic_connection.cc +++ b/net/quic/core/quic_connection.cc
@@ -828,7 +828,8 @@ return false; } - sent_packet_manager_.OnAckFrameStart(largest_acked, ack_delay_time); + sent_packet_manager_.OnAckFrameStart(largest_acked, ack_delay_time, + time_of_last_received_packet_); return true; } @@ -845,11 +846,11 @@ return true; } - sent_packet_manager_.OnAckRange(start, end, last_range, - time_of_last_received_packet_); + sent_packet_manager_.OnAckRange(start, end); if (!last_range) { return true; } + sent_packet_manager_.OnAckFrameEnd(time_of_last_received_packet_); if (send_alarm_->IsSet()) { send_alarm_->Cancel(); }
diff --git a/net/quic/core/quic_connection_test.cc b/net/quic/core/quic_connection_test.cc index eb05bac..64c9b9c 100644 --- a/net/quic/core/quic_connection_test.cc +++ b/net/quic/core/quic_connection_test.cc
@@ -2640,6 +2640,9 @@ // Now, ack the previous transmission. EXPECT_CALL(*loss_algorithm_, DetectLosses(_, _, _, _, _)); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + EXPECT_CALL(*send_algorithm_, OnCongestionEvent(false, _, _, _, _)); + } QuicAckFrame ack_all = InitAckFrame(3); ProcessAckPacket(&ack_all);
diff --git a/net/quic/core/quic_flags_list.h b/net/quic/core/quic_flags_list.h index 53c55c2f..5c469a9 100644 --- a/net/quic/core/quic_flags_list.h +++ b/net/quic/core/quic_flags_list.h
@@ -174,7 +174,12 @@ // and also allow IETF style TLP. QUIC_FLAG(bool, FLAGS_quic_reloadable_flag_quic_max_ack_delay2, false) +// If true, MemSlices in the send buffer is freed out of order. +QUIC_FLAG(bool, + FLAGS_quic_reloadable_flag_quic_free_mem_slice_out_of_order, + false) + // If true, framer will process and report ack frame incrementally. QUIC_FLAG(bool, - FLAGS_quic_reloadable_flag_quic_use_incremental_ack_processing, + FLAGS_quic_reloadable_flag_quic_use_incremental_ack_processing2, false) \ No newline at end of file
diff --git a/net/quic/core/quic_framer.cc b/net/quic/core/quic_framer.cc index 45e6035..75bcf35 100644 --- a/net/quic/core/quic_framer.cc +++ b/net/quic/core/quic_framer.cc
@@ -183,9 +183,9 @@ last_timestamp_(QuicTime::Delta::Zero()), data_producer_(nullptr), use_incremental_ack_processing_( - GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { + GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { if (use_incremental_ack_processing_) { - QUIC_FLAG_COUNT(quic_reloadable_flag_quic_use_incremental_ack_processing); + QUIC_FLAG_COUNT(quic_reloadable_flag_quic_use_incremental_ack_processing2); } DCHECK(!supported_versions.empty()); version_ = supported_versions_[0]; @@ -1091,7 +1091,7 @@ ((frame_type & kQuicFrameTypeSpecialMask) == kQuicFrameTypeAckMask))) { // TODO(fayang): Remove frame when deprecating - // quic_reloadable_flag_quic_use_incremental_ack_processing. + // quic_reloadable_flag_quic_use_incremental_ack_processing2. QuicAckFrame frame; if (!ProcessAckFrame(reader, frame_type, &frame)) { return RaiseError(QUIC_INVALID_ACK_DATA);
diff --git a/net/quic/core/quic_framer.h b/net/quic/core/quic_framer.h index c08750b..1e30193 100644 --- a/net/quic/core/quic_framer.h +++ b/net/quic/core/quic_framer.h
@@ -612,7 +612,7 @@ // owned. TODO(fayang): Consider add data producer to framer's constructor. QuicStreamFrameDataProducer* data_producer_; - // Latched value of quic_reloadable_flag_quic_use_incremental_ack_processing. + // Latched value of quic_reloadable_flag_quic_use_incremental_ack_processing2. const bool use_incremental_ack_processing_; DISALLOW_COPY_AND_ASSIGN(QuicFramer);
diff --git a/net/quic/core/quic_sent_packet_manager.cc b/net/quic/core/quic_sent_packet_manager.cc index 12c16c7..6d51479f3 100644 --- a/net/quic/core/quic_sent_packet_manager.cc +++ b/net/quic/core/quic_sent_packet_manager.cc
@@ -90,7 +90,8 @@ handshake_confirmed_(false), largest_packet_peer_knows_is_acked_(0), delayed_ack_time_( - QuicTime::Delta::FromMilliseconds(kDefaultDelayedAckTimeMs)) { + QuicTime::Delta::FromMilliseconds(kDefaultDelayedAckTimeMs)), + rtt_updated_(false) { SetSendAlgorithm(congestion_control_type); } @@ -247,12 +248,22 @@ unacked_packets_.IncreaseLargestObserved(LargestAcked(ack_frame)); HandleAckForSentPackets(ack_frame); + PostProcessAfterMarkingPacketHandled(ack_frame, ack_receive_time, rtt_updated, + prior_in_flight); +} + +void QuicSentPacketManager::PostProcessAfterMarkingPacketHandled( + const QuicAckFrame& ack_frame, + QuicTime ack_receive_time, + bool rtt_updated, + QuicByteCount prior_bytes_in_flight) { InvokeLossDetection(ack_receive_time); // Ignore losses in RTO mode. if (consecutive_rto_count_ > 0 && !use_new_rto_) { packets_lost_.clear(); } - MaybeInvokeCongestionEvent(rtt_updated, prior_in_flight, ack_receive_time); + MaybeInvokeCongestionEvent(rtt_updated, prior_bytes_in_flight, + ack_receive_time); unacked_packets_.RemoveObsoletePackets(); sustained_bandwidth_recorder_.RecordEstimate( @@ -1036,22 +1047,96 @@ } void QuicSentPacketManager::OnAckFrameStart(QuicPacketNumber largest_acked, - QuicTime::Delta ack_delay_time) { - last_ack_frame_.largest_acked = largest_acked; + QuicTime::Delta ack_delay_time, + QuicTime ack_receive_time) { + DCHECK(packets_acked_.empty()); + DCHECK_LE(largest_acked, unacked_packets_.largest_sent_packet()); + rtt_updated_ = + MaybeUpdateRTT(largest_acked, ack_delay_time, ack_receive_time); + DCHECK_GE(largest_acked, unacked_packets_.largest_observed()); last_ack_frame_.ack_delay_time = ack_delay_time; } void QuicSentPacketManager::OnAckRange(QuicPacketNumber start, - QuicPacketNumber end, - bool last_range, - QuicTime ack_receive_time) { - last_ack_frame_.packets.AddRange(start, end); - if (!last_range) { + QuicPacketNumber end) { + if (end > last_ack_frame_.largest_acked + 1) { + // Optimization for the first range. We believe most newly acked packets are + // in the first ack range and larger than all previous acked packets. + QuicPacketNumber newly_acked_start = + std::max(start, last_ack_frame_.largest_acked + 1); + unacked_packets_.IncreaseLargestObserved(end - 1); + last_ack_frame_.largest_acked = end - 1; + all_packets_acked_.Add(newly_acked_start, end); + for (QuicPacketNumber acked = end - 1; acked >= newly_acked_start; + --acked) { + // Add sent packets in descending order. + packets_acked_.push_back(AckedPacket(acked, 0, QuicTime::Zero())); + } + } + QuicPacketNumber least_unacked = unacked_packets_.GetLeastUnacked(); + // Exit if there are no newly acked packets in this ack range. + if (end <= least_unacked || + all_packets_acked_.Contains(std::max(start, least_unacked), end)) { return; } - OnIncomingAck(last_ack_frame_, ack_receive_time); - // Clear last_ack_frame_. - last_ack_frame_.Clear(); + // Execute the slow path if newly acked packets fill in existing holes. + QuicIntervalSet<QuicPacketNumber> newly_acked(std::max(start, least_unacked), + end); + newly_acked.Difference(all_packets_acked_); + all_packets_acked_.Add(newly_acked); + for (auto it = newly_acked.rbegin(); it != newly_acked.rend(); ++it) { + for (QuicPacketNumber acked = it->max() - 1; acked >= it->min(); --acked) { + // Add sent packets in descending order. + packets_acked_.push_back(AckedPacket(acked, 0, QuicTime::Zero())); + } + } +} + +void QuicSentPacketManager::OnAckFrameEnd(QuicTime ack_receive_time) { + QuicByteCount prior_bytes_in_flight = unacked_packets_.bytes_in_flight(); + // Reverse packets_acked_ so that it is in ascending order. + reverse(packets_acked_.begin(), packets_acked_.end()); + for (AckedPacket& acked_packet : packets_acked_) { + QuicTransmissionInfo* info = + unacked_packets_.GetMutableTransmissionInfo(acked_packet.packet_number); + if (!QuicUtils::IsAckable(info->state)) { + if (info->state == ACKED) { + QUIC_BUG << "Trying to ack an already acked packet: " + << acked_packet.packet_number; + } else { + QUIC_PEER_BUG << "Received ack for unackable packet: " + << acked_packet.packet_number << " with state: " + << QuicUtils::SentPacketStateToString(info->state); + } + continue; + } + QUIC_DVLOG(1) << ENDPOINT << "Got an ack for packet " + << acked_packet.packet_number; + last_ack_frame_.packets.Add(acked_packet.packet_number); + if (info->largest_acked > 0) { + largest_packet_peer_knows_is_acked_ = + std::max(largest_packet_peer_knows_is_acked_, info->largest_acked); + } + // If data is associated with the most recent transmission of this + // packet, then inform the caller. + if (info->in_flight) { + acked_packet.bytes_acked = info->bytes_sent; + } else { + // Unackable packets are skipped earlier. + largest_newly_acked_ = acked_packet.packet_number; + } + MarkPacketHandled(acked_packet.packet_number, info, + last_ack_frame_.ack_delay_time); + } + + PostProcessAfterMarkingPacketHandled(last_ack_frame_, ack_receive_time, + rtt_updated_, prior_bytes_in_flight); + // TODO(fayang): Move these two lines to PostProcessAfterMarkingPacketHandled + // when deprecating quic_reloadable_flag_quic_use_incremental_ack_processing2. + // Remove packets below least unacked from all_packets_acked_ and + // last_ack_frame_. + last_ack_frame_.packets.RemoveUpTo(unacked_packets_.GetLeastUnacked()); + all_packets_acked_.Difference(0, unacked_packets_.GetLeastUnacked()); } void QuicSentPacketManager::SetDebugDelegate(DebugDelegate* debug_delegate) {
diff --git a/net/quic/core/quic_sent_packet_manager.h b/net/quic/core/quic_sent_packet_manager.h index 0daf0da..f401c52 100644 --- a/net/quic/core/quic_sent_packet_manager.h +++ b/net/quic/core/quic_sent_packet_manager.h
@@ -218,13 +218,15 @@ // Called when an ack frame is initially parsed. void OnAckFrameStart(QuicPacketNumber largest_acked, - QuicTime::Delta ack_delay_time); + QuicTime::Delta ack_delay_time, + QuicTime ack_receive_time); - // Called when ack range [start, end) is received. - void OnAckRange(QuicPacketNumber start, - QuicPacketNumber end, - bool last_range, - QuicTime ack_receive_time); + // Called when ack range [start, end) is received. Populates packets_acked_ + // with newly acked packets. + void OnAckRange(QuicPacketNumber start, QuicPacketNumber end); + + // Called when an ack frame is parsed completely. + void OnAckFrameEnd(QuicTime ack_receive_time); // Called to enable/disable letting session decide what to write. void SetSessionDecideWhatToWrite(bool session_decides_what_to_write); @@ -347,6 +349,13 @@ void MarkForRetransmission(QuicPacketNumber packet_number, TransmissionType transmission_type); + // Called after packets have been marked handled with last received ack frame. + void PostProcessAfterMarkingPacketHandled( + const QuicAckFrame& ack_frame, + QuicTime ack_receive_time, + bool rtt_updated, + QuicByteCount prior_bytes_in_flight); + // Notify observers that packet with QuicTransmissionInfo |info| is a spurious // retransmission. It is caller's responsibility to guarantee the packet with // QuicTransmissionInfo |info| is a spurious retransmission before calling @@ -461,6 +470,17 @@ // Latest received ack frame. QuicAckFrame last_ack_frame_; + // Record whether RTT gets updated by last largest acked. This is only used + // when quic_reloadable_flag_quic_use_incremental_ack_processing2 is true. + bool rtt_updated_; + + // Packets that have been acked. This interval set only stores packets above + // least_unacked. This is only used when + // quic_reloadable_flag_quic_use_incremental_ack_processing2 is true. + // TODO(fayang): This is redundant with packets in last_ack_frame_. Remove + // this once we use optimized QuicIntervalSet in last_ack_frame. + QuicIntervalSet<QuicPacketNumber> all_packets_acked_; + DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); };
diff --git a/net/quic/core/quic_sent_packet_manager_test.cc b/net/quic/core/quic_sent_packet_manager_test.cc index 49ae651f..ebcfeed7 100644 --- a/net/quic/core/quic_sent_packet_manager_test.cc +++ b/net/quic/core/quic_sent_packet_manager_test.cc
@@ -357,9 +357,10 @@ QuicAckFrame ack_frame = InitAckFrame({{2, 3}}); ExpectAck(2); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(2, QuicTime::Delta::Infinite()); - manager_.OnAckRange(2, 3, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(2, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(2, 3); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -391,9 +392,10 @@ // Ack 1. QuicAckFrame ack_frame = InitAckFrame(1); ExpectAck(1); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -448,9 +450,10 @@ // Ack 1 but not 2. ExpectAck(1); QuicAckFrame ack_frame = InitAckFrame(1); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -467,9 +470,10 @@ EXPECT_CALL(notifier_, OnFrameAcked(_, _)).WillOnce(Return(false)); ExpectAck(2); QuicAckFrame ack_frame2 = InitAckFrame(2); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(2, QuicTime::Delta::Infinite()); - manager_.OnAckRange(1, 3, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(2, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(1, 3); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame2, clock_.ApproximateNow()); } @@ -487,9 +491,10 @@ // First, ACK packet 1 which makes packet 2 non-retransmittable. ExpectAck(1); QuicAckFrame ack_frame = InitAckFrame(1); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -503,20 +508,22 @@ ack_frame = InitAckFrame({{1, 2}, {3, 4}}); ExpectAck(3); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(3, QuicTime::Delta::Infinite()); - manager_.OnAckRange(3, 4, /*last_range=*/false, clock_.ApproximateNow()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(3, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(3, 4); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } ack_frame = InitAckFrame({{1, 2}, {3, 5}}); ExpectAck(4); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(4, QuicTime::Delta::Infinite()); - manager_.OnAckRange(3, 5, /*last_range=*/false, clock_.ApproximateNow()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(4, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(3, 5); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -527,10 +534,11 @@ // Frames in all packets are acked. EXPECT_CALL(notifier_, IsFrameOutstanding(_)).WillRepeatedly(Return(false)); } - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(5, QuicTime::Delta::Infinite()); - manager_.OnAckRange(3, 6, /*last_range=*/false, clock_.ApproximateNow()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(5, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(3, 6); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -562,9 +570,10 @@ QuicAckFrame ack_frame = InitAckFrame(1); ExpectUpdatedRtt(1); EXPECT_CALL(*send_algorithm_, RevertRetransmissionTimeout()); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -602,9 +611,10 @@ // Ack 1 but not 2 or 3. ExpectAck(1); QuicAckFrame ack_frame = InitAckFrame(1); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -632,10 +642,11 @@ ack_frame = InitAckFrame({{1, 2}, {3, 5}}); QuicPacketNumber acked[] = {3, 4}; ExpectAcksAndLosses(true, acked, QUIC_ARRAYSIZE(acked), nullptr, 0); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(4, QuicTime::Delta::Infinite()); - manager_.OnAckRange(3, 5, /*last_range=*/false, clock_.ApproximateNow()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(4, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(3, 5); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -652,10 +663,11 @@ // Frames in all packetss are acked. EXPECT_CALL(notifier_, IsFrameOutstanding(_)).WillRepeatedly(Return(false)); } - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(5, QuicTime::Delta::Infinite()); - manager_.OnAckRange(3, 6, /*last_range=*/false, clock_.ApproximateNow()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(5, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(3, 6); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -684,9 +696,10 @@ QuicAckFrame ack_frame = InitAckFrame(1); ExpectAck(1); EXPECT_CALL(*loss_algorithm, DetectLosses(_, _, _, _, _)); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -699,10 +712,11 @@ QuicAckFrame ack_frame = InitAckFrame({{1, 2}, {4, 5}}); ExpectAck(4); EXPECT_CALL(*loss_algorithm, DetectLosses(_, _, _, _, _)); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(4, QuicTime::Delta::Infinite()); - manager_.OnAckRange(4, 5, /*last_range=*/false, clock_.Now()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(4, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(4, 5); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -711,13 +725,18 @@ // Ack 3, which causes SpuriousRetransmitDetected to be called. { + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + QuicPacketNumber acked[] = {3}; + ExpectAcksAndLosses(false, acked, QUIC_ARRAYSIZE(acked), nullptr, 0); + } QuicAckFrame ack_frame = InitAckFrame({{1, 2}, {3, 5}}); EXPECT_CALL(*loss_algorithm, DetectLosses(_, _, _, _, _)); EXPECT_CALL(*loss_algorithm, SpuriousRetransmitDetected(_, _, _, 5)); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(4, QuicTime::Delta::Infinite()); - manager_.OnAckRange(3, 5, /*last_range=*/false, clock_.Now()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(4, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(3, 5); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -729,10 +748,11 @@ EXPECT_CALL(*loss_algorithm, DetectLosses(_, _, _, _, _)); EXPECT_CALL(notifier_, OnFrameAcked(_, _)).WillOnce(Return(false)); QuicAckFrame ack_frame2 = InitAckFrame({{1, 2}, {3, 6}}); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(5, QuicTime::Delta::Infinite()); - manager_.OnAckRange(3, 6, /*last_range=*/false, clock_.Now()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(5, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(3, 6); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame2, clock_.Now()); } @@ -758,10 +778,17 @@ QuicAckFrame ack_frame = InitAckFrame(2); ack_frame.ack_delay_time = QuicTime::Delta::FromMilliseconds(5); - ExpectAck(1); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(2, QuicTime::Delta::FromMilliseconds(5)); - manager_.OnAckRange(1, 3, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + QuicPacketNumber acked[] = {1, 2}; + ExpectAcksAndLosses(true, acked, QUIC_ARRAYSIZE(acked), nullptr, 0); + } else { + ExpectAck(1); + } + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(2, QuicTime::Delta::FromMilliseconds(5), + clock_.Now()); + manager_.OnAckRange(1, 3); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -771,10 +798,16 @@ // Now ack the ack and expect only an RTT update. ack_frame = InitAckFrame(3); - ExpectUpdatedRtt(3); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(3, QuicTime::Delta::Infinite()); - manager_.OnAckRange(1, 4, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + QuicPacketNumber acked[] = {3}; + ExpectAcksAndLosses(true, acked, QUIC_ARRAYSIZE(acked), nullptr, 0); + } else { + ExpectUpdatedRtt(3); + } + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(3, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(1, 4); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -789,9 +822,10 @@ ExpectAck(packet_number); QuicAckFrame ack_frame = InitAckFrame(packet_number); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -810,9 +844,11 @@ ExpectAck(packet_number); QuicAckFrame ack_frame = InitAckFrame(packet_number); ack_frame.ack_delay_time = QuicTime::Delta::FromMilliseconds(11); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(1, QuicTime::Delta::FromMilliseconds(11)); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(1, QuicTime::Delta::FromMilliseconds(11), + clock_.Now()); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -830,9 +866,10 @@ ExpectAck(packet_number); QuicAckFrame ack_frame = InitAckFrame(packet_number); ack_frame.ack_delay_time = QuicTime::Delta::Infinite(); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -850,9 +887,10 @@ ExpectAck(packet_number); QuicAckFrame ack_frame = InitAckFrame(packet_number); ack_frame.ack_delay_time = QuicTime::Delta::Zero(); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(1, QuicTime::Delta::Zero()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(1, QuicTime::Delta::Zero(), clock_.Now()); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -904,9 +942,10 @@ ExpectAck(3); QuicAckFrame ack_frame = InitAckFrame({{3, 4}}); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(3, QuicTime::Delta::Infinite()); - manager_.OnAckRange(3, 4, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(3, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(3, 4); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -925,9 +964,10 @@ // Frames in all packets are acked. EXPECT_CALL(notifier_, IsFrameOutstanding(_)).WillRepeatedly(Return(false)); } - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(5, QuicTime::Delta::Infinite()); - manager_.OnAckRange(3, 6, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(5, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(3, 6); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -1038,9 +1078,10 @@ // Packets 1, 2 and [4, 102] are lost. EXPECT_CALL(notifier_, OnFrameLost(_)).Times(101); } - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(103, QuicTime::Delta::Infinite()); - manager_.OnAckRange(103, 104, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(103, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(103, 104); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -1106,10 +1147,11 @@ EXPECT_CALL(notifier_, HasPendingCryptoData()) .WillRepeatedly(Return(false)); } - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(9, QuicTime::Delta::Infinite()); - manager_.OnAckRange(8, 10, /*last_range=*/false, clock_.ApproximateNow()); - manager_.OnAckRange(3, 6, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(9, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(8, 10); + manager_.OnAckRange(3, 6); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -1179,9 +1221,10 @@ QuicPacketNumber acked[] = {8, 9}; ExpectAcksAndLosses(true, acked, QUIC_ARRAYSIZE(acked), nullptr, 0); QuicAckFrame ack_frame = InitAckFrame({{8, 10}}); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(9, QuicTime::Delta::Infinite()); - manager_.OnAckRange(8, 10, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(9, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(8, 10); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -1219,16 +1262,22 @@ // Now ack the second crypto packet, and ensure the first gets removed, but // the third does not. - ExpectUpdatedRtt(2); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + QuicPacketNumber acked[] = {2}; + ExpectAcksAndLosses(true, acked, QUIC_ARRAYSIZE(acked), nullptr, 0); + } else { + ExpectUpdatedRtt(2); + } QuicAckFrame ack_frame = InitAckFrame({{2, 3}}); if (manager_.session_decides_what_to_write()) { EXPECT_CALL(notifier_, HasPendingCryptoData()) .WillRepeatedly(Return(false)); EXPECT_CALL(notifier_, IsFrameOutstanding(_)).WillRepeatedly(Return(false)); } - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(2, QuicTime::Delta::Infinite()); - manager_.OnAckRange(2, 3, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(2, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(2, 3); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -1347,10 +1396,16 @@ // Ensure both packets get discarded when packet 2 is acked. QuicAckFrame ack_frame = InitAckFrame({{3, 4}}); - ExpectUpdatedRtt(3); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(3, QuicTime::Delta::Infinite()); - manager_.OnAckRange(3, 4, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + QuicPacketNumber acked[] = {3}; + ExpectAcksAndLosses(true, acked, QUIC_ARRAYSIZE(acked), nullptr, 0); + } else { + ExpectUpdatedRtt(3); + } + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(3, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(3, 4); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -1420,9 +1475,10 @@ // retransmittable frames as packet 102 is acked. EXPECT_CALL(notifier_, OnFrameLost(_)).Times(98); } - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(102, QuicTime::Delta::Zero()); - manager_.OnAckRange(102, 103, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(102, QuicTime::Delta::Zero(), clock_.Now()); + manager_.OnAckRange(102, 103); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -1495,9 +1551,10 @@ // retransmittable frames as packet 102 is acked. EXPECT_CALL(notifier_, OnFrameLost(_)).Times(98); } - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(102, QuicTime::Delta::Zero()); - manager_.OnAckRange(102, 103, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(102, QuicTime::Delta::Zero(), clock_.Now()); + manager_.OnAckRange(102, 103); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -1548,9 +1605,10 @@ QuicAckFrame ack_frame = InitAckFrame({{2, 3}}); ack_frame.ack_delay_time = QuicTime::Delta::Zero(); ExpectAck(2); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(2, QuicTime::Delta::Zero()); - manager_.OnAckRange(2, 3, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(2, QuicTime::Delta::Zero(), clock_.Now()); + manager_.OnAckRange(2, 3); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -1605,9 +1663,10 @@ QuicAckFrame ack_frame = InitAckFrame({{3, 4}}); ack_frame.ack_delay_time = QuicTime::Delta::Zero(); ExpectAck(3); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(3, QuicTime::Delta::Zero()); - manager_.OnAckRange(3, 4, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(3, QuicTime::Delta::Zero(), clock_.Now()); + manager_.OnAckRange(3, 4); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -1811,9 +1870,10 @@ // original value and OnRetransmissionTimeout is not called or reverted. QuicAckFrame ack_frame = InitAckFrame({{2, 3}}); ExpectAck(2); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(2, QuicTime::Delta::Infinite()); - manager_.OnAckRange(2, 3, /*last_range=*/true, clock_.ApproximateNow()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(2, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(2, 3); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow()); } @@ -1941,9 +2001,10 @@ ExpectAck(2); EXPECT_CALL(*loss_algorithm, DetectLosses(_, _, _, _, _)); QuicAckFrame ack_frame = InitAckFrame({{2, 3}}); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(2, QuicTime::Delta::Infinite()); - manager_.OnAckRange(2, 3, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(2, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(2, 3); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); } @@ -2454,9 +2515,10 @@ EXPECT_CALL(*network_change_visitor_, OnPathMtuIncreased(kDefaultLength + 100)); QuicAckFrame ack_frame = InitAckFrame(1); - if (GetQuicReloadableFlag(quic_use_incremental_ack_processing)) { - manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite()); - manager_.OnAckRange(1, 2, /*last_range=*/true, clock_.Now()); + if (GetQuicReloadableFlag(quic_use_incremental_ack_processing2)) { + manager_.OnAckFrameStart(1, QuicTime::Delta::Infinite(), clock_.Now()); + manager_.OnAckRange(1, 2); + manager_.OnAckFrameEnd(clock_.Now()); } else { manager_.OnIncomingAck(ack_frame, clock_.Now()); }
diff --git a/net/quic/core/quic_stream_send_buffer.cc b/net/quic/core/quic_stream_send_buffer.cc index d92205c4..df147826 100644 --- a/net/quic/core/quic_stream_send_buffer.cc +++ b/net/quic/core/quic_stream_send_buffer.cc
@@ -15,6 +15,16 @@ namespace net { +namespace { + +struct CompareOffset { + bool operator()(const BufferedSlice& slice, QuicStreamOffset offset) const { + return slice.offset + slice.slice.length() < offset; + } +}; + +} // namespace + BufferedSlice::BufferedSlice(QuicMemSlice mem_slice, QuicStreamOffset offset) : slice(std::move(mem_slice)), offset(offset) {} @@ -35,7 +45,9 @@ stream_bytes_written_(0), stream_bytes_outstanding_(0), write_index_(-1), - use_write_index_(GetQuicReloadableFlag(quic_use_write_index)) {} + use_write_index_(GetQuicReloadableFlag(quic_use_write_index)), + free_mem_slice_out_of_order_( + GetQuicReloadableFlag(quic_free_mem_slice_out_of_order)) {} QuicStreamSendBuffer::~QuicStreamSendBuffer() {} @@ -183,6 +195,35 @@ stream_bytes_outstanding_ -= *newly_acked_length; bytes_acked_.Add(offset, offset + data_length); pending_retransmissions_.Difference(offset, offset + data_length); + if (free_mem_slice_out_of_order_) { + if (newly_acked.Empty()) { + return true; + } + if (!FreeMemSlices(newly_acked.begin()->min(), + newly_acked.rbegin()->max())) { + return false; + } + while (!buffered_slices_.empty() && + buffered_slices_.front().slice.empty()) { + // Remove data which stops waiting for acks. Please note, mem slices can + // be released out of order, but send buffer is cleaned up in order. + if (use_write_index_) { + QUIC_BUG_IF(write_index_ == 0) + << "Fail to advance current_write_slice_. It points to the slice " + "whose data has all be written and ACK'ed or ignored. " + "current_write_slice_ offset " + << buffered_slices_[write_index_].offset << " length " + << buffered_slices_[write_index_].slice.length(); + if (write_index_ > 0) { + // If write index is pointing to any slice, reduce the index as the + // slices are all shifted to the left by one. + --write_index_; + } + } + buffered_slices_.pop_front(); + } + return true; + } while (!buffered_slices_.empty() && bytes_acked_.Contains(buffered_slices_.front().offset, buffered_slices_.front().offset + @@ -247,6 +288,30 @@ return {0, 0}; } +bool QuicStreamSendBuffer::FreeMemSlices(QuicStreamOffset start, + QuicStreamOffset end) { + DCHECK(free_mem_slice_out_of_order_); + // Find it, such that buffered_slices_[it - 1].end < start <= + // buffered_slices_[it].end. + auto it = std::lower_bound(buffered_slices_.begin(), buffered_slices_.end(), + start, CompareOffset()); + if (it == buffered_slices_.end() || it->slice.empty()) { + QUIC_DLOG(ERROR) << "Offset " << start + << " does not exist or it has already been acked."; + return false; + } + for (; it != buffered_slices_.end(); ++it) { + if (it->offset >= end) { + break; + } + if (!it->slice.empty() && + bytes_acked_.Contains(it->offset, it->offset + it->slice.length())) { + it->slice.Reset(); + } + } + return true; +} + bool QuicStreamSendBuffer::IsStreamDataOutstanding( QuicStreamOffset offset, QuicByteCount data_length) const {
diff --git a/net/quic/core/quic_stream_send_buffer.h b/net/quic/core/quic_stream_send_buffer.h index 30a1270..5bf0d6a3 100644 --- a/net/quic/core/quic_stream_send_buffer.h +++ b/net/quic/core/quic_stream_send_buffer.h
@@ -132,6 +132,11 @@ QuicByteCount data_length, QuicDataWriter* writer); + // Called when data within offset [start, end) gets acked. Frees fully + // acked buffered slices if any. Returns false if the corresponding data does + // not exist or has been acked. + bool FreeMemSlices(QuicStreamOffset start, QuicStreamOffset end); + QuicDeque<BufferedSlice> buffered_slices_; // Offset of next inserted byte. @@ -157,6 +162,9 @@ // Latched value of quic_reloadable_flag_quic_stream_send_buffer_write_index. const bool use_write_index_; + + // Latched value of quic_reloadable_flag_quic_free_mem_slice_out_of_order. + const bool free_mem_slice_out_of_order_; }; } // namespace net
diff --git a/net/quic/core/quic_stream_send_buffer_test.cc b/net/quic/core/quic_stream_send_buffer_test.cc index fc7abc2..79fca92 100644 --- a/net/quic/core/quic_stream_send_buffer_test.cc +++ b/net/quic/core/quic_stream_send_buffer_test.cc
@@ -188,6 +188,40 @@ EXPECT_FALSE(send_buffer_.OnStreamDataAcked(4000, 100, &newly_acked_length)); } +TEST_F(QuicStreamSendBufferTest, AckStreamDataOutOfOrder) { + WriteAllData(); + QuicByteCount newly_acked_length; + EXPECT_TRUE(send_buffer_.OnStreamDataAcked(500, 1000, &newly_acked_length)); + EXPECT_EQ(1000u, newly_acked_length); + EXPECT_EQ(4u, send_buffer_.size()); + EXPECT_EQ(3840u, QuicStreamSendBufferPeer::TotalLength(&send_buffer_)); + + EXPECT_TRUE(send_buffer_.OnStreamDataAcked(1200, 1000, &newly_acked_length)); + EXPECT_EQ(700u, newly_acked_length); + EXPECT_EQ(4u, send_buffer_.size()); + if (GetQuicReloadableFlag(quic_free_mem_slice_out_of_order)) { + // Slice 2 gets fully acked. + EXPECT_EQ(2816u, QuicStreamSendBufferPeer::TotalLength(&send_buffer_)); + } else { + EXPECT_EQ(3840u, QuicStreamSendBufferPeer::TotalLength(&send_buffer_)); + } + + EXPECT_TRUE(send_buffer_.OnStreamDataAcked(2000, 1840, &newly_acked_length)); + EXPECT_EQ(1640u, newly_acked_length); + EXPECT_EQ(4u, send_buffer_.size()); + if (GetQuicReloadableFlag(quic_free_mem_slice_out_of_order)) { + // Slices 3 and 4 get fully acked. + EXPECT_EQ(1024u, QuicStreamSendBufferPeer::TotalLength(&send_buffer_)); + } else { + EXPECT_EQ(3840u, QuicStreamSendBufferPeer::TotalLength(&send_buffer_)); + } + + EXPECT_TRUE(send_buffer_.OnStreamDataAcked(0, 1000, &newly_acked_length)); + EXPECT_EQ(500u, newly_acked_length); + EXPECT_EQ(0u, send_buffer_.size()); + EXPECT_EQ(0u, QuicStreamSendBufferPeer::TotalLength(&send_buffer_)); +} + TEST_F(QuicStreamSendBufferTest, PendingRetransmission) { WriteAllData(); EXPECT_TRUE(send_buffer_.IsStreamDataOutstanding(0, 3840));
diff --git a/net/quic/core/quic_utils.cc b/net/quic/core/quic_utils.cc index 49ec219..fca544d 100644 --- a/net/quic/core/quic_utils.cc +++ b/net/quic/core/quic_utils.cc
@@ -175,6 +175,21 @@ return "INVALID_ADDRESS_CHANGE_TYPE"; } +const char* QuicUtils::SentPacketStateToString(SentPacketState state) { + switch (state) { + RETURN_STRING_LITERAL(OUTSTANDING); + RETURN_STRING_LITERAL(NEVER_SENT); + RETURN_STRING_LITERAL(ACKED); + RETURN_STRING_LITERAL(UNACKABLE); + RETURN_STRING_LITERAL(HANDSHAKE_RETRANSMITTED); + RETURN_STRING_LITERAL(LOST); + RETURN_STRING_LITERAL(TLP_RETRANSMITTED); + RETURN_STRING_LITERAL(RTO_RETRANSMITTED); + RETURN_STRING_LITERAL(PROBE_RETRANSMITTED); + } + return "INVALID_SENT_PACKET_STATE"; +} + // static AddressChangeType QuicUtils::DetermineAddressChangeType( const QuicSocketAddress& old_address,
diff --git a/net/quic/core/quic_utils.h b/net/quic/core/quic_utils.h index 9790c41f..3602dfc 100644 --- a/net/quic/core/quic_utils.h +++ b/net/quic/core/quic_utils.h
@@ -54,6 +54,9 @@ // Returns AddressChangeType as a std::string. static QuicString AddressChangeTypeToString(AddressChangeType type); + // Returns SentPacketState as a char*. + static const char* SentPacketStateToString(SentPacketState state); + // Determines and returns change type of address change from |old_address| to // |new_address|. static AddressChangeType DetermineAddressChangeType(
diff --git a/net/quic/platform/api/quic_mem_slice.h b/net/quic/platform/api/quic_mem_slice.h index 11205af5..ba0c03bb 100644 --- a/net/quic/platform/api/quic_mem_slice.h +++ b/net/quic/platform/api/quic_mem_slice.h
@@ -41,6 +41,10 @@ ~QuicMemSlice() = default; + // Release the underlying reference. Further access the memory will result in + // undefined behavior. + void Reset() { impl_.Reset(); } + // Returns a const char pointer to underlying data buffer. const char* data() const { return impl_.data(); } // Returns the length of underlying data buffer.
diff --git a/net/quic/platform/impl/quic_mem_slice_impl.cc b/net/quic/platform/impl/quic_mem_slice_impl.cc index 5fdeb24a..e82fcf1 100644 --- a/net/quic/platform/impl/quic_mem_slice_impl.cc +++ b/net/quic/platform/impl/quic_mem_slice_impl.cc
@@ -34,6 +34,11 @@ QuicMemSliceImpl::~QuicMemSliceImpl() = default; +void QuicMemSliceImpl::Reset() { + io_buffer_ = nullptr; + length_ = 0; +} + const char* QuicMemSliceImpl::data() const { if (io_buffer_ == nullptr) { return nullptr;
diff --git a/net/quic/platform/impl/quic_mem_slice_impl.h b/net/quic/platform/impl/quic_mem_slice_impl.h index 43b9aad..1acf9f7 100644 --- a/net/quic/platform/impl/quic_mem_slice_impl.h +++ b/net/quic/platform/impl/quic_mem_slice_impl.h
@@ -34,6 +34,10 @@ ~QuicMemSliceImpl(); + // Release the underlying reference. Further access the memory will result in + // undefined behavior. + void Reset(); + // Returns a char pointer to underlying data buffer. const char* data() const; // Returns the length of underlying data buffer.
diff --git a/net/quic/test_tools/quic_stream_send_buffer_peer.cc b/net/quic/test_tools/quic_stream_send_buffer_peer.cc index 5ca41adb..7bb4410 100644 --- a/net/quic/test_tools/quic_stream_send_buffer_peer.cc +++ b/net/quic/test_tools/quic_stream_send_buffer_peer.cc
@@ -23,6 +23,17 @@ } return &send_buffer->buffered_slices_[send_buffer->write_index_]; } + +// static +QuicByteCount QuicStreamSendBufferPeer::TotalLength( + QuicStreamSendBuffer* send_buffer) { + QuicByteCount length = 0; + for (const auto& slice : send_buffer->buffered_slices_) { + length += slice.slice.length(); + } + return length; +} + } // namespace test } // namespace net
diff --git a/net/quic/test_tools/quic_stream_send_buffer_peer.h b/net/quic/test_tools/quic_stream_send_buffer_peer.h index 6b8b115..54c53e9 100644 --- a/net/quic/test_tools/quic_stream_send_buffer_peer.h +++ b/net/quic/test_tools/quic_stream_send_buffer_peer.h
@@ -18,6 +18,8 @@ static const BufferedSlice* CurrentWriteSlice( QuicStreamSendBuffer* send_buffer); + + static QuicByteCount TotalLength(QuicStreamSendBuffer* send_buffer); }; } // namespace test
diff --git a/net/websockets/websocket_basic_handshake_stream.cc b/net/websockets/websocket_basic_handshake_stream.cc index b7c212bda..189b72a0 100644 --- a/net/websockets/websocket_basic_handshake_stream.cc +++ b/net/websockets/websocket_basic_handshake_stream.cc
@@ -342,8 +342,8 @@ HttpRequestHeaders enriched_headers; enriched_headers.CopyFrom(headers); std::string handshake_challenge; - if (handshake_challenge_for_testing_) { - handshake_challenge = *handshake_challenge_for_testing_; + if (handshake_challenge_for_testing_.has_value()) { + handshake_challenge = handshake_challenge_for_testing_.value(); handshake_challenge_for_testing_.reset(); } else { handshake_challenge = GenerateHandshakeChallenge(); @@ -361,8 +361,8 @@ ComputeSecWebSocketAccept(handshake_challenge); DCHECK(connect_delegate_); - std::unique_ptr<WebSocketHandshakeRequestInfo> request( - new WebSocketHandshakeRequestInfo(url_, base::Time::Now())); + auto request = + std::make_unique<WebSocketHandshakeRequestInfo>(url_, base::Time::Now()); request->headers.CopyFrom(enriched_headers); connect_delegate_->OnStartOpeningHandshake(std::move(request)); @@ -497,10 +497,9 @@ extension_params_->deflate_parameters.client_context_take_over_mode(), WebSocketDeflater::NUM_CONTEXT_TAKEOVER_MODE_TYPES); - return std::unique_ptr<WebSocketStream>(new WebSocketDeflateStream( + return std::make_unique<WebSocketDeflateStream>( std::move(basic_stream), extension_params_->deflate_parameters, - std::unique_ptr<WebSocketDeflatePredictor>( - new WebSocketDeflatePredictorImpl))); + std::make_unique<WebSocketDeflatePredictorImpl>()); } else { return basic_stream; } @@ -508,7 +507,7 @@ void WebSocketBasicHandshakeStream::SetWebSocketKeyForTesting( const std::string& key) { - handshake_challenge_for_testing_.reset(new std::string(key)); + handshake_challenge_for_testing_ = key; } void WebSocketBasicHandshakeStream::ReadResponseHeadersCallback( @@ -585,7 +584,7 @@ int WebSocketBasicHandshakeStream::ValidateUpgradeResponse( const HttpResponseHeaders* headers) { - extension_params_.reset(new WebSocketExtensionParams); + extension_params_ = std::make_unique<WebSocketExtensionParams>(); std::string failure_message; if (ValidateUpgrade(headers, &failure_message) && ValidateSecWebSocketAccept(
diff --git a/net/websockets/websocket_basic_handshake_stream.h b/net/websockets/websocket_basic_handshake_stream.h index d325f31..00d606d 100644 --- a/net/websockets/websocket_basic_handshake_stream.h +++ b/net/websockets/websocket_basic_handshake_stream.h
@@ -12,7 +12,7 @@ #include <vector> #include "base/macros.h" -#include "base/memory/ref_counted.h" +#include "base/optional.h" #include "net/base/completion_once_callback.h" #include "net/base/net_export.h" #include "net/http/http_basic_state.h" @@ -122,7 +122,7 @@ // The key to be sent in the next Sec-WebSocket-Key header. Usually NULL (the // key is generated on the fly). - std::unique_ptr<std::string> handshake_challenge_for_testing_; + base::Optional<std::string> handshake_challenge_for_testing_; // The required value for the Sec-WebSocket-Accept header. std::string handshake_challenge_response_;
diff --git a/net/websockets/websocket_basic_stream.cc b/net/websockets/websocket_basic_stream.cc index 22d0c68..31267ba 100644 --- a/net/websockets/websocket_basic_stream.cc +++ b/net/websockets/websocket_basic_stream.cc
@@ -99,7 +99,7 @@ const scoped_refptr<GrowableIOBuffer>& http_read_buffer, const std::string& sub_protocol, const std::string& extensions) - : read_buffer_(new IOBufferWithSize(kReadBufferSize)), + : read_buffer_(base::MakeRefCounted<IOBufferWithSize>(kReadBufferSize)), connection_(std::move(connection)), http_read_buffer_(http_read_buffer), sub_protocol_(sub_protocol), @@ -166,8 +166,7 @@ // // First calculate the size of the buffer we need to allocate. int total_size = CalculateSerializedSizeAndTurnOnMaskBit(frames); - scoped_refptr<IOBufferWithSize> combined_buffer( - new IOBufferWithSize(total_size)); + auto combined_buffer = base::MakeRefCounted<IOBufferWithSize>(total_size); char* dest = combined_buffer->data(); int remaining_size = total_size; @@ -195,8 +194,8 @@ } DCHECK_EQ(0, remaining_size) << "Buffer size calculation was wrong; " << remaining_size << " bytes left over."; - scoped_refptr<DrainableIOBuffer> drainable_buffer( - new DrainableIOBuffer(combined_buffer.get(), total_size)); + auto drainable_buffer = base::MakeRefCounted<DrainableIOBuffer>( + combined_buffer.get(), total_size); return WriteEverything(drainable_buffer, callback); } @@ -348,7 +347,8 @@ AddToIncompleteControlFrameBody(data_buffer); } else { DVLOG(3) << "Creating new storage for an incomplete control frame."; - incomplete_control_frame_body_ = new GrowableIOBuffer(); + incomplete_control_frame_body_ = + base::MakeRefCounted<GrowableIOBuffer>(); // This method checks for oversize control frames above, so as long as // the frame parser is working correctly, this won't overflow. If a bug // does cause it to overflow, it will CHECK() in @@ -364,7 +364,7 @@ const int body_size = incomplete_control_frame_body_->offset(); DCHECK_EQ(body_size, static_cast<int>(current_frame_header_->payload_length)); - scoped_refptr<IOBufferWithSize> body = new IOBufferWithSize(body_size); + auto body = base::MakeRefCounted<IOBufferWithSize>(body_size); memcpy(body->data(), incomplete_control_frame_body_->StartOfBuffer(), body_size); @@ -402,7 +402,7 @@ if (is_final_chunk_in_message || data_size > 0 || current_frame_header_->opcode != WebSocketFrameHeader::kOpCodeContinuation) { - result_frame.reset(new WebSocketFrame(opcode)); + result_frame = std::make_unique<WebSocketFrame>(opcode); result_frame->header.CopyFrom(*current_frame_header_); result_frame->header.final = is_final_chunk_in_message; result_frame->header.payload_length = data_size;
diff --git a/net/websockets/websocket_basic_stream.h b/net/websockets/websocket_basic_stream.h index 97fe554..6064d62 100644 --- a/net/websockets/websocket_basic_stream.h +++ b/net/websockets/websocket_basic_stream.h
@@ -9,7 +9,7 @@ #include <string> #include <vector> -#include "base/memory/ref_counted.h" +#include "base/memory/scoped_refptr.h" #include "net/base/completion_callback.h" #include "net/base/net_export.h" #include "net/traffic_annotation/network_traffic_annotation.h"
diff --git a/net/websockets/websocket_basic_stream_test.cc b/net/websockets/websocket_basic_stream_test.cc index a1dea4a..e7c8d74 100644 --- a/net/websockets/websocket_basic_stream_test.cc +++ b/net/websockets/websocket_basic_stream_test.cc
@@ -125,13 +125,12 @@ size_t reads_count, MockWrite writes[], size_t writes_count) { - socket_data_.reset(new StrictStaticSocketDataProvider( - reads, reads_count, writes, writes_count, expect_all_io_to_complete_)); + socket_data_ = std::make_unique<StrictStaticSocketDataProvider>( + reads, reads_count, writes, writes_count, expect_all_io_to_complete_); socket_data_->set_connect_data(MockConnect(SYNCHRONOUS, OK)); factory_.AddSocketDataProvider(socket_data_.get()); - std::unique_ptr<ClientSocketHandle> transport_socket( - new ClientSocketHandle); + auto transport_socket = std::make_unique<ClientSocketHandle>(); scoped_refptr<MockTransportSocketParams> params; transport_socket->Init("a", params, MEDIUM, SocketTag(), ClientSocketPool::RespectLimits::ENABLED, @@ -140,7 +139,7 @@ } void SetHttpReadBuffer(const char* data, size_t size) { - http_read_buffer_ = new GrowableIOBuffer; + http_read_buffer_ = base::MakeRefCounted<GrowableIOBuffer>(); http_read_buffer_->SetCapacity(size); memcpy(http_read_buffer_->data(), data, size); http_read_buffer_->set_offset(size); @@ -244,12 +243,12 @@ // Creates a WebSocketFrame with a wire format matching kWriteFrame and adds // it to |frames_|. void PrepareWriteFrame() { - std::unique_ptr<WebSocketFrame> frame( - new WebSocketFrame(WebSocketFrameHeader::kOpCodeText)); + auto frame = + std::make_unique<WebSocketFrame>(WebSocketFrameHeader::kOpCodeText); const size_t payload_size = kWriteFrameSize - (WebSocketFrameHeader::kBaseHeaderSize + WebSocketFrameHeader::kMaskingKeyLength); - frame->data = new IOBuffer(payload_size); + frame->data = base::MakeRefCounted<IOBuffer>(payload_size); memcpy(frame->data->data(), kWriteFrame + kWriteFrameSize - payload_size, payload_size); @@ -918,8 +917,8 @@ MockWrite(SYNCHRONOUS, kMaskedEmptyPong, kMaskedEmptyPongSize)}; CreateWriteOnly(writes); - std::unique_ptr<WebSocketFrame> frame( - new WebSocketFrame(WebSocketFrameHeader::kOpCodePong)); + auto frame = + std::make_unique<WebSocketFrame>(WebSocketFrameHeader::kOpCodePong); WebSocketFrameHeader& header = frame->header; header.final = true; header.masked = true; @@ -939,11 +938,11 @@ generator_ = &GenerateNonNulMaskingKey; CreateStream(NULL, 0, writes, arraysize(writes)); - std::unique_ptr<WebSocketFrame> frame( - new WebSocketFrame(WebSocketFrameHeader::kOpCodeText)); + auto frame = + std::make_unique<WebSocketFrame>(WebSocketFrameHeader::kOpCodeText); const std::string unmasked_payload = "graphics"; const size_t payload_size = unmasked_payload.size(); - frame->data = new IOBuffer(payload_size); + frame->data = base::MakeRefCounted<IOBuffer>(payload_size); memcpy(frame->data->data(), unmasked_payload.data(), payload_size); WebSocketFrameHeader& header = frame->header; header.final = true;
diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc index d3c02e6..2d79b23 100644 --- a/net/websockets/websocket_channel.cc +++ b/net/websockets/websocket_channel.cc
@@ -16,7 +16,6 @@ #include "base/containers/circular_deque.h" #include "base/location.h" #include "base/macros.h" -#include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/metrics/histogram_macros.h" #include "base/numerics/safe_conversions.h" @@ -355,7 +354,7 @@ has_received_close_frame_(false), received_close_code_(0), state_(FRESHLY_CONSTRUCTED), - notification_sender_(new HandshakeNotificationSender(this)), + notification_sender_(std::make_unique<HandshakeNotificationSender>(this)), sending_text_message_(false), receiving_text_message_(false), expecting_to_handle_continuation_(false), @@ -479,7 +478,8 @@ const bool final = front.final() && data_size == bytes_to_send; scoped_refptr<IOBuffer> buffer_to_pass; if (front.data()) { - buffer_to_pass = new DependentIOBuffer(front.data(), front.offset()); + buffer_to_pass = + base::MakeRefCounted<DependentIOBuffer>(front.data(), front.offset()); } else { DCHECK(!bytes_to_send) << "Non empty data should not be null."; } @@ -617,11 +617,9 @@ return; } socket_url_ = socket_url; - std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate( - new ConnectDelegate(this)); - std::unique_ptr<WebSocketHandshakeStreamCreateHelper> create_helper( - new WebSocketHandshakeStreamCreateHelper(connect_delegate.get(), - requested_subprotocols)); + auto connect_delegate = std::make_unique<ConnectDelegate>(this); + auto create_helper = std::make_unique<WebSocketHandshakeStreamCreateHelper>( + connect_delegate.get(), requested_subprotocols); stream_request_ = callback.Run(socket_url_, std::move(create_helper), origin, site_for_cookies, additional_headers, url_request_context_, @@ -1080,7 +1078,7 @@ DCHECK(state_ == CONNECTED || state_ == RECV_CLOSED); DCHECK(stream_); - std::unique_ptr<WebSocketFrame> frame(new WebSocketFrame(op_code)); + auto frame = std::make_unique<WebSocketFrame>(op_code); WebSocketFrameHeader& header = frame->header; header.final = fin; header.masked = true; @@ -1093,12 +1091,12 @@ // TODO(ricea): Keep some statistics to work out the situation and adjust // quota appropriately. if (!data_to_send_next_) - data_to_send_next_.reset(new SendBuffer); + data_to_send_next_ = std::make_unique<SendBuffer>(); data_to_send_next_->AddFrame(std::move(frame)); return CHANNEL_ALIVE; } - data_being_sent_.reset(new SendBuffer); + data_being_sent_ = std::make_unique<SendBuffer>(); data_being_sent_->AddFrame(std::move(frame)); return WriteFrames(); } @@ -1136,10 +1134,10 @@ // Special case: translate kWebSocketErrorNoStatusReceived into a Close // frame with no payload. DCHECK(reason.empty()); - body = new IOBuffer(0); + body = base::MakeRefCounted<IOBuffer>(0); } else { const size_t payload_length = kWebSocketCloseCodeLength + reason.length(); - body = new IOBuffer(payload_length); + body = base::MakeRefCounted<IOBuffer>(payload_length); size = payload_length; base::WriteBigEndian(body->data(), code); static_assert(sizeof(code) == kWebSocketCloseCodeLength,
diff --git a/net/websockets/websocket_channel.h b/net/websockets/websocket_channel.h index 987b82314..b76b4d6a 100644 --- a/net/websockets/websocket_channel.h +++ b/net/websockets/websocket_channel.h
@@ -16,7 +16,7 @@ #include "base/containers/queue.h" #include "base/i18n/streaming_utf8_validator.h" #include "base/macros.h" -#include "base/memory/ref_counted.h" +#include "base/memory/scoped_refptr.h" #include "base/time/time.h" #include "base/timer/timer.h" #include "net/base/net_export.h"
diff --git a/net/websockets/websocket_channel_test.cc b/net/websockets/websocket_channel_test.cc index 57904f77..eb90b447 100644 --- a/net/websockets/websocket_channel_test.cc +++ b/net/websockets/websocket_channel_test.cc
@@ -20,7 +20,6 @@ #include "base/callback.h" #include "base/location.h" #include "base/macros.h" -#include "base/memory/ptr_util.h" #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" @@ -343,15 +342,14 @@ result_frames.reserve(N); for (size_t i = 0; i < N; ++i) { const InitFrame& source_frame = source_frames[i]; - std::unique_ptr<WebSocketFrame> result_frame( - new WebSocketFrame(source_frame.opcode)); + auto result_frame = std::make_unique<WebSocketFrame>(source_frame.opcode); size_t frame_length = source_frame.data ? strlen(source_frame.data) : 0; WebSocketFrameHeader& result_header = result_frame->header; result_header.final = (source_frame.final == FINAL_FRAME); result_header.masked = (source_frame.masked == MASKED); result_header.payload_length = frame_length; if (source_frame.data) { - result_frame->data = new IOBuffer(frame_length); + result_frame->data = base::MakeRefCounted<IOBuffer>(frame_length); memcpy(result_frame->data->data(), source_frame.data, frame_length); } result_frames.push_back(std::move(result_frame)); @@ -752,7 +750,7 @@ // convenient to be able to specify data as a string, but the // WebSocketEventInterface requires the IOBuffer type. scoped_refptr<IOBuffer> AsIOBuffer(const base::StringPiece& s) { - scoped_refptr<IOBuffer> buffer(new IOBuffer(s.size())); + auto buffer = base::MakeRefCounted<IOBuffer>(s.size()); std::copy(s.begin(), s.end(), buffer->data()); return buffer; } @@ -767,13 +765,13 @@ // Base class for all test fixtures. class WebSocketChannelTest : public ::testing::Test { protected: - WebSocketChannelTest() : stream_(new FakeWebSocketStream) {} + WebSocketChannelTest() : stream_(std::make_unique<FakeWebSocketStream>()) {} // Creates a new WebSocketChannel and connects it, using the settings stored // in |connect_data_|. void CreateChannelAndConnect() { - channel_.reset(new WebSocketChannel(CreateEventInterface(), - &connect_data_.url_request_context)); + channel_ = std::make_unique<WebSocketChannel>( + CreateEventInterface(), &connect_data_.url_request_context); channel_->SendAddChannelRequestForTesting( connect_data_.socket_url, connect_data_.requested_subprotocols, connect_data_.origin, connect_data_.site_for_cookies, "", @@ -954,7 +952,8 @@ class WebSocketChannelEventInterfaceTest : public WebSocketChannelTest { protected: WebSocketChannelEventInterfaceTest() - : event_interface_(new StrictMock<MockWebSocketEventInterface>) { + : event_interface_( + std::make_unique<StrictMock<MockWebSocketEventInterface>>()) { DefaultValue<ChannelState>::Set(CHANNEL_ALIVE); ON_CALL(*event_interface_, OnDropChannel(_, _, _)) .WillByDefault(Return(CHANNEL_DELETED)); @@ -971,7 +970,7 @@ // CreateChannelAndConnectSuccessfully(). This will only work once per test // case, but once should be enough. std::unique_ptr<WebSocketEventInterface> CreateEventInterface() override { - return base::WrapUnique(event_interface_.release()); + return std::move(event_interface_); } std::unique_ptr<MockWebSocketEventInterface> event_interface_; @@ -982,7 +981,7 @@ class WebSocketChannelStreamTest : public WebSocketChannelTest { protected: WebSocketChannelStreamTest() - : mock_stream_(new StrictMock<MockWebSocketStream>) {} + : mock_stream_(std::make_unique<StrictMock<MockWebSocketStream>>()) {} void CreateChannelAndConnectSuccessfully() override { set_stream(std::move(mock_stream_)); @@ -1083,8 +1082,7 @@ } TEST_F(WebSocketChannelDeletingTest, OnDataFrameSync) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "HELLO"}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames); @@ -1096,8 +1094,7 @@ } TEST_F(WebSocketChannelDeletingTest, OnDataFrameAsync) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "HELLO"}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::ASYNC, OK, frames); @@ -1131,8 +1128,7 @@ } TEST_F(WebSocketChannelDeletingTest, OnClosingHandshakeSync) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, CLOSE_DATA(NORMAL_CLOSURE, "Success")}}; @@ -1144,8 +1140,7 @@ } TEST_F(WebSocketChannelDeletingTest, OnClosingHandshakeAsync) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, CLOSE_DATA(NORMAL_CLOSURE, "Success")}}; @@ -1169,8 +1164,7 @@ } TEST_F(WebSocketChannelDeletingTest, OnDropChannelReadError) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); stream->PrepareReadFramesError(ReadableFakeWebSocketStream::ASYNC, ERR_FAILED); set_stream(std::move(stream)); @@ -1182,8 +1176,7 @@ } TEST_F(WebSocketChannelDeletingTest, OnNotifyStartOpeningHandshakeError) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "HELLO"}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::ASYNC, OK, frames); @@ -1193,16 +1186,14 @@ CreateChannelAndConnectSuccessfully(); ASSERT_TRUE(channel_); channel_->OnStartOpeningHandshake( - std::unique_ptr<WebSocketHandshakeRequestInfo>( - new WebSocketHandshakeRequestInfo(GURL("http://www.example.com/"), - base::Time()))); + std::make_unique<WebSocketHandshakeRequestInfo>( + GURL("http://www.example.com/"), base::Time())); base::RunLoop().RunUntilIdle(); EXPECT_EQ(nullptr, channel_.get()); } TEST_F(WebSocketChannelDeletingTest, OnNotifyFinishOpeningHandshakeError) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "HELLO"}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::ASYNC, OK, frames); @@ -1211,8 +1202,7 @@ CreateChannelAndConnectSuccessfully(); ASSERT_TRUE(channel_); - scoped_refptr<HttpResponseHeaders> response_headers( - new HttpResponseHeaders("")); + auto response_headers = base::MakeRefCounted<HttpResponseHeaders>(""); channel_->OnFinishOpeningHandshake( std::make_unique<WebSocketHandshakeResponseInfo>( GURL("http://www.example.com/"), 200, "OK", response_headers, @@ -1233,8 +1223,7 @@ } TEST_F(WebSocketChannelDeletingTest, FailChannelInOnReadDone) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); stream->PrepareReadFramesError(ReadableFakeWebSocketStream::ASYNC, ERR_WS_PROTOCOL_ERROR); set_stream(std::move(stream)); @@ -1246,8 +1235,7 @@ } TEST_F(WebSocketChannelDeletingTest, FailChannelDueToMaskedFrame) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, MASKED, "HELLO"}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames); @@ -1259,8 +1247,7 @@ } TEST_F(WebSocketChannelDeletingTest, FailChannelDueToBadControlFrame) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, 0xF, NOT_MASKED, ""}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames); @@ -1273,8 +1260,7 @@ // Version of above test with null data. TEST_F(WebSocketChannelDeletingTest, FailChannelDueToBadControlFrameNull) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = {{FINAL_FRAME, 0xF, NOT_MASKED, nullptr}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames); set_stream(std::move(stream)); @@ -1285,8 +1271,7 @@ } TEST_F(WebSocketChannelDeletingTest, FailChannelDueToPongAfterClose) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, CLOSE_DATA(NORMAL_CLOSURE, "Success")}, @@ -1300,8 +1285,7 @@ } TEST_F(WebSocketChannelDeletingTest, FailChannelDueToPongAfterCloseNull) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, CLOSE_DATA(NORMAL_CLOSURE, "Success")}, @@ -1315,8 +1299,7 @@ } TEST_F(WebSocketChannelDeletingTest, FailChannelDueToUnknownOpCode) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = {{FINAL_FRAME, 0x7, NOT_MASKED, ""}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames); set_stream(std::move(stream)); @@ -1327,8 +1310,7 @@ } TEST_F(WebSocketChannelDeletingTest, FailChannelDueToUnknownOpCodeNull) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = {{FINAL_FRAME, 0x7, NOT_MASKED, nullptr}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames); set_stream(std::move(stream)); @@ -1339,8 +1321,7 @@ } TEST_F(WebSocketChannelDeletingTest, FailChannelDueInvalidCloseReason) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, CLOSE_DATA(NORMAL_CLOSURE, "\xFF")}}; @@ -1403,8 +1384,7 @@ // which case they will be available as soon as ReadFrames() is called the first // time. TEST_F(WebSocketChannelEventInterfaceTest, DataLeftFromHandshake) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "HELLO"}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames); @@ -1424,8 +1404,7 @@ // A remote server could accept the handshake, but then immediately send a // Close frame. TEST_F(WebSocketChannelEventInterfaceTest, CloseAfterHandshake) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, CLOSE_DATA(SERVER_ERROR, "Internal Server Error")}}; @@ -1450,8 +1429,7 @@ // A remote server could close the connection immediately after sending the // handshake response (most likely a bug in the server). TEST_F(WebSocketChannelEventInterfaceTest, ConnectionCloseAfterHandshake) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); stream->PrepareReadFramesError(ReadableFakeWebSocketStream::SYNC, ERR_CONNECTION_CLOSED); set_stream(std::move(stream)); @@ -1467,8 +1445,7 @@ } TEST_F(WebSocketChannelEventInterfaceTest, NormalAsyncRead) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "HELLO"}}; // We use this checkpoint object to verify that the callback isn't called @@ -1496,8 +1473,7 @@ // Extra data can arrive while a read is being processed, resulting in the next // read completing synchronously. TEST_F(WebSocketChannelEventInterfaceTest, AsyncThenSyncRead) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames1[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "HELLO"}}; static const InitFrame frames2[] = { @@ -1524,8 +1500,7 @@ // Data frames are delivered the same regardless of how many reads they arrive // as. TEST_F(WebSocketChannelEventInterfaceTest, FragmentedMessage) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); // Here we have one message which arrived in five frames split across three // reads. It may have been reframed on arrival, but this class doesn't care // about that. @@ -1576,8 +1551,7 @@ // A message can consist of one frame with null payload. TEST_F(WebSocketChannelEventInterfaceTest, NullMessage) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, nullptr}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames); @@ -1592,8 +1566,7 @@ // Connection closed by the remote host without a closing handshake. TEST_F(WebSocketChannelEventInterfaceTest, AsyncAbnormalClosure) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); stream->PrepareReadFramesError(ReadableFakeWebSocketStream::ASYNC, ERR_CONNECTION_CLOSED); set_stream(std::move(stream)); @@ -1611,8 +1584,7 @@ // A connection reset should produce the same event as an unexpected closure. TEST_F(WebSocketChannelEventInterfaceTest, ConnectionReset) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); stream->PrepareReadFramesError(ReadableFakeWebSocketStream::ASYNC, ERR_CONNECTION_RESET); set_stream(std::move(stream)); @@ -1630,8 +1602,7 @@ // RFC6455 5.1 "A client MUST close a connection if it detects a masked frame." TEST_F(WebSocketChannelEventInterfaceTest, MaskedFramesAreRejected) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, MASKED, "HELLO"}}; @@ -1654,8 +1625,7 @@ // RFC6455 5.2 "If an unknown opcode is received, the receiving endpoint MUST // _Fail the WebSocket Connection_." TEST_F(WebSocketChannelEventInterfaceTest, UnknownOpCodeIsRejected) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = {{FINAL_FRAME, 4, NOT_MASKED, "HELLO"}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::ASYNC, OK, frames); @@ -1675,8 +1645,7 @@ // RFC6455 5.4 "Control frames ... MAY be injected in the middle of a // fragmented message." TEST_F(WebSocketChannelEventInterfaceTest, ControlFrameInDataMessage) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); // We have one message of type Text split into two frames. In the middle is a // control message of type Pong. static const InitFrame frames1[] = { @@ -1711,8 +1680,7 @@ // It seems redundant to repeat the entirety of the above test, so just test a // Pong with null data. TEST_F(WebSocketChannelEventInterfaceTest, PongWithNullData) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodePong, NOT_MASKED, nullptr}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::ASYNC, OK, frames); @@ -1727,8 +1695,7 @@ // If a frame has an invalid header, then the connection is closed and // subsequent frames must not trigger events. TEST_F(WebSocketChannelEventInterfaceTest, FrameAfterInvalidFrame) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {NOT_FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, MASKED, "HELLO"}, {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, " WORLD"}}; @@ -1907,8 +1874,7 @@ // When the remote server sends a Close frame with an empty payload, // WebSocketChannel should report code 1005, kWebSocketErrorNoStatusReceived. TEST_F(WebSocketChannelEventInterfaceTest, CloseWithNoPayloadGivesStatus1005) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, ""}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames); @@ -1927,8 +1893,7 @@ // A version of the above test with null payload. TEST_F(WebSocketChannelEventInterfaceTest, CloseWithNullPayloadGivesStatus1005) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, nullptr}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames); @@ -1947,8 +1912,7 @@ // If ReadFrames() returns ERR_WS_PROTOCOL_ERROR, then the connection must be // failed. TEST_F(WebSocketChannelEventInterfaceTest, SyncProtocolErrorGivesStatus1002) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); stream->PrepareReadFramesError(ReadableFakeWebSocketStream::SYNC, ERR_WS_PROTOCOL_ERROR); set_stream(std::move(stream)); @@ -1962,8 +1926,7 @@ // Async version of above test. TEST_F(WebSocketChannelEventInterfaceTest, AsyncProtocolErrorGivesStatus1002) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); stream->PrepareReadFramesError(ReadableFakeWebSocketStream::ASYNC, ERR_WS_PROTOCOL_ERROR); set_stream(std::move(stream)); @@ -1986,9 +1949,8 @@ CreateChannelAndConnectSuccessfully(); - std::unique_ptr<WebSocketHandshakeRequestInfo> request_info( - new WebSocketHandshakeRequestInfo(GURL("ws://www.example.com/"), - base::Time())); + auto request_info = std::make_unique<WebSocketHandshakeRequestInfo>( + GURL("ws://www.example.com/"), base::Time()); connect_data_.argument_saver.connect_delegate->OnStartOpeningHandshake( std::move(request_info)); @@ -2005,11 +1967,9 @@ CreateChannelAndConnectSuccessfully(); - scoped_refptr<HttpResponseHeaders> response_headers( - new HttpResponseHeaders("")); - std::unique_ptr<WebSocketHandshakeResponseInfo> response_info( - new WebSocketHandshakeResponseInfo(GURL("ws://www.example.com/"), 200, - "OK", response_headers, base::Time())); + auto response_headers = base::MakeRefCounted<HttpResponseHeaders>(""); + auto response_info = std::make_unique<WebSocketHandshakeResponseInfo>( + GURL("ws://www.example.com/"), 200, "OK", response_headers, base::Time()); connect_data_.argument_saver.connect_delegate->OnFinishOpeningHandshake( std::move(response_info)); base::RunLoop().RunUntilIdle(); @@ -2028,13 +1988,11 @@ WebSocketStream::ConnectDelegate* connect_delegate = connect_data_.argument_saver.connect_delegate.get(); GURL url("ws://www.example.com/"); - std::unique_ptr<WebSocketHandshakeRequestInfo> request_info( - new WebSocketHandshakeRequestInfo(url, base::Time())); - scoped_refptr<HttpResponseHeaders> response_headers( - new HttpResponseHeaders("")); - std::unique_ptr<WebSocketHandshakeResponseInfo> response_info( - new WebSocketHandshakeResponseInfo(url, 200, "OK", response_headers, - base::Time())); + auto request_info = + std::make_unique<WebSocketHandshakeRequestInfo>(url, base::Time()); + auto response_headers = base::MakeRefCounted<HttpResponseHeaders>(""); + auto response_info = std::make_unique<WebSocketHandshakeResponseInfo>( + url, 200, "OK", response_headers, base::Time()); connect_delegate->OnStartOpeningHandshake(std::move(request_info)); connect_delegate->OnFinishOpeningHandshake(std::move(response_info)); @@ -2045,8 +2003,7 @@ // Any frame after close is invalid. This test uses a Text frame. See also // test "PingAfterCloseIfRejected". TEST_F(WebSocketChannelEventInterfaceTest, DataAfterCloseIsRejected) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, CLOSE_DATA(NORMAL_CLOSURE, "OK")}, @@ -2069,8 +2026,7 @@ // A Close frame with a one-byte payload elicits a specific console error // message. TEST_F(WebSocketChannelEventInterfaceTest, OneByteClosePayloadMessage) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, "\x03"}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames); @@ -2088,8 +2044,7 @@ // A Close frame with a reserved status code also elicits a specific console // error message. TEST_F(WebSocketChannelEventInterfaceTest, ClosePayloadReservedStatusMessage) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, CLOSE_DATA(ABNORMAL_CLOSURE, "Not valid on wire")}}; @@ -2108,8 +2063,7 @@ // A Close frame with invalid UTF-8 also elicits a specific console error // message. TEST_F(WebSocketChannelEventInterfaceTest, ClosePayloadInvalidReason) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, CLOSE_DATA(NORMAL_CLOSURE, "\xFF")}}; @@ -2128,8 +2082,7 @@ // The reserved bits must all be clear on received frames. Extensions should // clear the bits when they are set correctly before passing on the frame. TEST_F(WebSocketChannelEventInterfaceTest, ReservedBitsMustNotBeSet) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "sakana"}}; @@ -2155,8 +2108,7 @@ // response to the client Close message is received. TEST_F(WebSocketChannelEventInterfaceTest, ClientInitiatedClosingHandshakeTimesOut) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); stream->PrepareReadFramesError(ReadableFakeWebSocketStream::SYNC, ERR_IO_PENDING); set_stream(std::move(stream)); @@ -2191,8 +2143,7 @@ // message is received but the connection isn't closed by the remote host. TEST_F(WebSocketChannelEventInterfaceTest, ServerInitiatedClosingHandshakeTimesOut) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeClose, NOT_MASKED, CLOSE_DATA(NORMAL_CLOSURE, "OK")}}; @@ -2339,8 +2290,7 @@ // A message that needs to be split into frames to fit within quota should // maintain correct semantics. TEST_F(WebSocketChannelFlowControlTest, SingleFrameMessageSplitSync) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "FOUR"}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames); @@ -2370,8 +2320,7 @@ // The code path for async messages is slightly different, so test it // separately. TEST_F(WebSocketChannelFlowControlTest, SingleFrameMessageSplitAsync) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "FOUR"}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::ASYNC, OK, frames); @@ -2412,8 +2361,7 @@ // necessary. The complexity/performance tradeoffs here need further // examination. TEST_F(WebSocketChannelFlowControlTest, MultipleFrameSplit) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {NOT_FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "FIRST FRAME IS 25 BYTES. "}, @@ -2455,8 +2403,7 @@ // An empty message handled when we are out of quota must not be delivered // out-of-order with respect to other messages. TEST_F(WebSocketChannelFlowControlTest, EmptyMessageNoQuota) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "FIRST MESSAGE"}, @@ -2490,8 +2437,7 @@ // A close frame should not overtake data frames. TEST_F(WebSocketChannelFlowControlTest, CloseFrameShouldNotOvertakeDataFrames) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {NOT_FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "FIRST "}, @@ -2543,8 +2489,7 @@ // SendFlowControl calls should not trigger multiple close respond frames. TEST_F(WebSocketChannelFlowControlTest, DoNotSendMultipleCloseRespondFrames) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static constexpr InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "FIRST SECOND"}, @@ -2970,17 +2915,16 @@ // Test the read path for 8-bit cleanliness as well. TEST_F(WebSocketChannelEventInterfaceTest, ReadBinaryFramesAre8BitClean) { - std::unique_ptr<WebSocketFrame> frame( - new WebSocketFrame(WebSocketFrameHeader::kOpCodeBinary)); + auto frame = + std::make_unique<WebSocketFrame>(WebSocketFrameHeader::kOpCodeBinary); WebSocketFrameHeader& frame_header = frame->header; frame_header.final = true; frame_header.payload_length = kBinaryBlobSize; - frame->data = new IOBuffer(kBinaryBlobSize); + frame->data = base::MakeRefCounted<IOBuffer>(kBinaryBlobSize); memcpy(frame->data->data(), kBinaryBlob, kBinaryBlobSize); std::vector<std::unique_ptr<WebSocketFrame>> frames; frames.push_back(std::move(frame)); - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); stream->PrepareRawReadFrames(ReadableFakeWebSocketStream::SYNC, OK, std::move(frames)); set_stream(std::move(stream)); @@ -3094,8 +3038,7 @@ // UTF-8 validation is enforced on received Text frames. TEST_F(WebSocketChannelEventInterfaceTest, ReceivedInvalidUtf8) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, "\xff"}}; stream->PrepareReadFrames(ReadableFakeWebSocketStream::SYNC, OK, frames); @@ -3283,8 +3226,7 @@ // A new data message cannot start in the middle of another data message. TEST_F(WebSocketChannelEventInterfaceTest, BogusContinuation) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {NOT_FINAL_FRAME, WebSocketFrameHeader::kOpCodeBinary, NOT_MASKED, "frame1"}, @@ -3308,8 +3250,7 @@ // A new message cannot start with a Continuation frame. TEST_F(WebSocketChannelEventInterfaceTest, MessageStartingWithContinuation) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {FINAL_FRAME, WebSocketFrameHeader::kOpCodeContinuation, NOT_MASKED, "continuation"}}; @@ -3327,8 +3268,7 @@ // A frame passed to the renderer must be either non-empty or have the final bit // set. TEST_F(WebSocketChannelEventInterfaceTest, DataFramesNonEmptyOrFinal) { - std::unique_ptr<ReadableFakeWebSocketStream> stream( - new ReadableFakeWebSocketStream); + auto stream = std::make_unique<ReadableFakeWebSocketStream>(); static const InitFrame frames[] = { {NOT_FINAL_FRAME, WebSocketFrameHeader::kOpCodeText, NOT_MASKED, ""}, {NOT_FINAL_FRAME, WebSocketFrameHeader::kOpCodeContinuation, @@ -3353,8 +3293,7 @@ connect_data_.socket_url = wss_url; const SSLInfo ssl_info; const bool fatal = true; - std::unique_ptr<WebSocketEventInterface::SSLErrorCallbacks> fake_callbacks( - new FakeSSLErrorCallbacks); + auto fake_callbacks = std::make_unique<FakeSSLErrorCallbacks>(); EXPECT_CALL(*event_interface_, OnSSLCertificateErrorCalled(NotNull(), wss_url, _, fatal));
diff --git a/net/websockets/websocket_deflate_stream.cc b/net/websockets/websocket_deflate_stream.cc index 6e21237..dd048a8 100644 --- a/net/websockets/websocket_deflate_stream.cc +++ b/net/websockets/websocket_deflate_stream.cc
@@ -7,14 +7,13 @@ #include <stdint.h> #include <algorithm> -#include <memory> #include <string> #include <utility> #include <vector> #include "base/bind.h" #include "base/logging.h" -#include "base/memory/ref_counted.h" +#include "base/memory/scoped_refptr.h" #include "net/base/completion_callback.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" @@ -218,7 +217,7 @@ << "deflater_.GetOutput() returns an error."; return ERR_WS_PROTOCOL_ERROR; } - std::unique_ptr<WebSocketFrame> compressed(new WebSocketFrame(opcode)); + auto compressed = std::make_unique<WebSocketFrame>(opcode); compressed->header.CopyFrom(header); compressed->header.opcode = opcode; compressed->header.final = header.final; @@ -269,7 +268,7 @@ frames->clear(); return OK; } - std::unique_ptr<WebSocketFrame> compressed(new WebSocketFrame(opcode)); + auto compressed = std::make_unique<WebSocketFrame>(opcode); compressed->header.CopyFrom((*frames)[0]->header); compressed->header.opcode = opcode; compressed->header.final = true; @@ -343,8 +342,8 @@ while (inflater_.CurrentOutputSize() >= kChunkSize || frame->header.final) { size_t size = std::min(kChunkSize, inflater_.CurrentOutputSize()); - std::unique_ptr<WebSocketFrame> inflated( - new WebSocketFrame(WebSocketFrameHeader::kOpCodeText)); + auto inflated = + std::make_unique<WebSocketFrame>(WebSocketFrameHeader::kOpCodeText); scoped_refptr<IOBufferWithSize> data = inflater_.GetOutput(size); bool is_final = !inflater_.CurrentOutputSize() && frame->header.final; if (!data.get()) {
diff --git a/net/websockets/websocket_deflate_stream_fuzzer.cc b/net/websockets/websocket_deflate_stream_fuzzer.cc index c0b45f6f..8c766c1 100644 --- a/net/websockets/websocket_deflate_stream_fuzzer.cc +++ b/net/websockets/websocket_deflate_stream_fuzzer.cc
@@ -9,6 +9,7 @@ #include <vector> #include "base/logging.h" +#include "base/memory/scoped_refptr.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_piece.h" #include "base/test/fuzzed_data_provider.h" @@ -82,7 +83,7 @@ uint64_t payload_length = fuzzed_data_provider_->ConsumeUint32InRange(0, 64); std::string payload = fuzzed_data_provider_->ConsumeBytes(payload_length); - frame->data = new StringIOBuffer(payload); + frame->data = base::MakeRefCounted<StringIOBuffer>(payload); frame->header.payload_length = payload.size(); return frame; }
diff --git a/net/websockets/websocket_deflate_stream_test.cc b/net/websockets/websocket_deflate_stream_test.cc index 15a08ae..b76e5ec 100644 --- a/net/websockets/websocket_deflate_stream_test.cc +++ b/net/websockets/websocket_deflate_stream_test.cc
@@ -15,7 +15,8 @@ #include "base/bind.h" #include "base/containers/circular_deque.h" #include "base/macros.h" -#include "base/memory/ref_counted.h" +#include "base/memory/ptr_util.h" +#include "base/memory/scoped_refptr.h" #include "base/test/mock_callback.h" #include "net/base/completion_callback.h" #include "net/base/io_buffer.h" @@ -54,7 +55,7 @@ const int kWindowBits = 15; scoped_refptr<IOBuffer> ToIOBuffer(const std::string& s) { - scoped_refptr<IOBuffer> buffer = new IOBuffer(s.size()); + auto buffer = base::MakeRefCounted<IOBuffer>(s.size()); memcpy(buffer->data(), s.data(), s.size()); return buffer; } @@ -88,7 +89,7 @@ WebSocketFrameHeader::OpCode opcode, FrameFlag flag, const std::string& data) { - std::unique_ptr<WebSocketFrame> frame(new WebSocketFrame(opcode)); + auto frame = std::make_unique<WebSocketFrame>(opcode); frame->header.final = (flag & kFinal); frame->header.reserved1 = (flag & kReserved1); frame->data = ToIOBuffer(data); @@ -99,7 +100,7 @@ void AppendTo(std::vector<std::unique_ptr<WebSocketFrame>>* frames, WebSocketFrameHeader::OpCode opcode, FrameFlag flag) { - std::unique_ptr<WebSocketFrame> frame(new WebSocketFrame(opcode)); + auto frame = std::make_unique<WebSocketFrame>(opcode); frame->header.final = (flag & kFinal); frame->header.reserved1 = (flag & kReserved1); frames->push_back(std::move(frame)); @@ -245,9 +246,9 @@ parameters.SetClientMaxWindowBits(window_bits); mock_stream_ = new testing::StrictMock<MockWebSocketStream>; predictor_ = new WebSocketDeflatePredictorMock; - deflate_stream_.reset(new WebSocketDeflateStream( - std::unique_ptr<WebSocketStream>(mock_stream_), parameters, - std::unique_ptr<WebSocketDeflatePredictor>(predictor_))); + deflate_stream_ = std::make_unique<WebSocketDeflateStream>( + base::WrapUnique(mock_stream_), parameters, + base::WrapUnique(predictor_)); } std::unique_ptr<WebSocketDeflateStream> deflate_stream_;
diff --git a/net/websockets/websocket_deflater.cc b/net/websockets/websocket_deflater.cc index 78e5b52..27b3399 100644 --- a/net/websockets/websocket_deflater.cc +++ b/net/websockets/websocket_deflater.cc
@@ -27,7 +27,7 @@ bool WebSocketDeflater::Initialize(int window_bits) { DCHECK(!stream_); - stream_.reset(new z_stream); + stream_ = std::make_unique<z_stream>(); DCHECK_LE(8, window_bits); DCHECK_GE(15, window_bits); @@ -123,7 +123,7 @@ base::circular_deque<char>::iterator begin = buffer_.begin(); base::circular_deque<char>::iterator end = begin + length_to_copy; - scoped_refptr<IOBufferWithSize> result = new IOBufferWithSize(length_to_copy); + auto result = base::MakeRefCounted<IOBufferWithSize>(length_to_copy); std::copy(begin, end, result->data()); buffer_.erase(begin, end); return result;
diff --git a/net/websockets/websocket_deflater.h b/net/websockets/websocket_deflater.h index 369fff0..3aa6f24 100644 --- a/net/websockets/websocket_deflater.h +++ b/net/websockets/websocket_deflater.h
@@ -12,7 +12,7 @@ #include "base/containers/circular_deque.h" #include "base/macros.h" -#include "base/memory/ref_counted.h" +#include "base/memory/scoped_refptr.h" #include "net/base/net_export.h" extern "C" struct z_stream_s;
diff --git a/net/websockets/websocket_deflater_test.cc b/net/websockets/websocket_deflater_test.cc index ae0133c..fd06bda 100644 --- a/net/websockets/websocket_deflater_test.cc +++ b/net/websockets/websocket_deflater_test.cc
@@ -6,7 +6,6 @@ #include <string> -#include "base/memory/ref_counted.h" #include "net/base/io_buffer.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/net/websockets/websocket_end_to_end_test.cc b/net/websockets/websocket_end_to_end_test.cc index 13f9cf6..2ea4f44 100644 --- a/net/websockets/websocket_end_to_end_test.cc +++ b/net/websockets/websocket_end_to_end_test.cc
@@ -19,6 +19,7 @@ #include "base/location.h" #include "base/macros.h" #include "base/memory/ptr_util.h" +#include "base/memory/scoped_refptr.h" #include "base/run_loop.h" #include "base/single_thread_task_runner.h" #include "base/strings/string_piece.h" @@ -239,7 +240,7 @@ protected: WebSocketEndToEndTest() : event_interface_(), - proxy_delegate_(new TestProxyDelegateWithProxyInfo), + proxy_delegate_(std::make_unique<TestProxyDelegateWithProxyInfo>()), context_(true), channel_(), initialised_context_(false) {} @@ -262,8 +263,8 @@ url::Origin origin = url::Origin::Create(GURL("http://localhost")); GURL site_for_cookies("http://localhost/"); event_interface_ = new ConnectTestingEventInterface; - channel_.reset( - new WebSocketChannel(base::WrapUnique(event_interface_), &context_)); + channel_ = std::make_unique<WebSocketChannel>( + base::WrapUnique(event_interface_), &context_); channel_->SendAddChannelRequest(GURL(socket_url), sub_protocols_, origin, site_for_cookies, ""); event_interface_->WaitForResponse();
diff --git a/net/websockets/websocket_event_interface.h b/net/websockets/websocket_event_interface.h index db24207f..b28dd2b 100644 --- a/net/websockets/websocket_event_interface.h +++ b/net/websockets/websocket_event_interface.h
@@ -13,7 +13,7 @@ #include "base/compiler_specific.h" // for WARN_UNUSED_RESULT #include "base/macros.h" -#include "base/memory/ref_counted.h" +#include "base/memory/scoped_refptr.h" #include "net/base/net_export.h" class GURL;
diff --git a/net/websockets/websocket_frame.cc b/net/websockets/websocket_frame.cc index 9db28d6..7ec26943 100644 --- a/net/websockets/websocket_frame.cc +++ b/net/websockets/websocket_frame.cc
@@ -60,7 +60,7 @@ } // namespace std::unique_ptr<WebSocketFrameHeader> WebSocketFrameHeader::Clone() const { - std::unique_ptr<WebSocketFrameHeader> ret(new WebSocketFrameHeader(opcode)); + auto ret = std::make_unique<WebSocketFrameHeader>(opcode); ret->CopyFrom(*this); return ret; }
diff --git a/net/websockets/websocket_frame.h b/net/websockets/websocket_frame.h index 074c7875..c751fed 100644 --- a/net/websockets/websocket_frame.h +++ b/net/websockets/websocket_frame.h
@@ -11,7 +11,7 @@ #include <vector> #include "base/macros.h" -#include "base/memory/ref_counted.h" +#include "base/memory/scoped_refptr.h" #include "net/base/net_export.h" namespace net {
diff --git a/net/websockets/websocket_frame_parser.cc b/net/websockets/websocket_frame_parser.cc index 1b06cca..1c64e45 100644 --- a/net/websockets/websocket_frame_parser.cc +++ b/net/websockets/websocket_frame_parser.cc
@@ -6,13 +6,12 @@ #include <algorithm> #include <limits> -#include <memory> #include <utility> #include <vector> #include "base/big_endian.h" #include "base/logging.h" -#include "base/memory/ref_counted.h" +#include "base/memory/scoped_refptr.h" #include "net/base/io_buffer.h" #include "net/websockets/websocket_frame.h" @@ -158,7 +157,7 @@ std::fill(masking_key_.key, masking_key_.key + kMaskingKeyLength, '\0'); } - current_frame_header_.reset(new WebSocketFrameHeader(opcode)); + current_frame_header_ = std::make_unique<WebSocketFrameHeader>(opcode); current_frame_header_->final = final; current_frame_header_->reserved1 = reserved1; current_frame_header_->reserved2 = reserved2; @@ -177,13 +176,14 @@ std::min(static_cast<uint64_t>(buffer_.size() - current_read_pos_), current_frame_header_->payload_length - frame_offset_)); - std::unique_ptr<WebSocketFrameChunk> frame_chunk(new WebSocketFrameChunk); + auto frame_chunk = std::make_unique<WebSocketFrameChunk>(); if (first_chunk) { frame_chunk->header = current_frame_header_->Clone(); } frame_chunk->final_chunk = false; if (next_size) { - frame_chunk->data = new IOBufferWithSize(static_cast<int>(next_size)); + frame_chunk->data = + base::MakeRefCounted<IOBufferWithSize>(static_cast<int>(next_size)); char* io_data = frame_chunk->data->data(); memcpy(io_data, &buffer_.front() + current_read_pos_, next_size); if (current_frame_header_->masked) {
diff --git a/net/websockets/websocket_frame_parser.h b/net/websockets/websocket_frame_parser.h index e43f051f..8f0287d0 100644 --- a/net/websockets/websocket_frame_parser.h +++ b/net/websockets/websocket_frame_parser.h
@@ -12,7 +12,6 @@ #include <vector> #include "base/macros.h" -#include "base/memory/ref_counted.h" #include "net/base/net_export.h" #include "net/websockets/websocket_errors.h" #include "net/websockets/websocket_frame.h"
diff --git a/net/websockets/websocket_handshake_response_info.cc b/net/websockets/websocket_handshake_response_info.cc index 5a276e5..1fafd17 100644 --- a/net/websockets/websocket_handshake_response_info.cc +++ b/net/websockets/websocket_handshake_response_info.cc
@@ -6,7 +6,6 @@ #include <string> -#include "base/memory/ref_counted.h" #include "base/time/time.h" #include "net/http/http_response_headers.h" #include "url/gurl.h"
diff --git a/net/websockets/websocket_handshake_response_info.h b/net/websockets/websocket_handshake_response_info.h index 42a2662d..e345036 100644 --- a/net/websockets/websocket_handshake_response_info.h +++ b/net/websockets/websocket_handshake_response_info.h
@@ -8,7 +8,7 @@ #include <string> #include "base/macros.h" -#include "base/memory/ref_counted.h" +#include "base/memory/scoped_refptr.h" #include "base/time/time.h" #include "net/base/net_export.h" #include "url/gurl.h"
diff --git a/net/websockets/websocket_handshake_stream_create_helper.cc b/net/websockets/websocket_handshake_stream_create_helper.cc index 66168942..ca08293a 100644 --- a/net/websockets/websocket_handshake_stream_create_helper.cc +++ b/net/websockets/websocket_handshake_stream_create_helper.cc
@@ -4,7 +4,6 @@ #include "net/websockets/websocket_handshake_stream_create_helper.h" -#include <memory> #include <utility> #include "base/logging.h"
diff --git a/net/websockets/websocket_handshake_stream_create_helper_test.cc b/net/websockets/websocket_handshake_stream_create_helper_test.cc index 31c13e9b1..3a5a339 100644 --- a/net/websockets/websocket_handshake_stream_create_helper_test.cc +++ b/net/websockets/websocket_handshake_stream_create_helper_test.cc
@@ -9,6 +9,7 @@ #include <vector> #include "base/macros.h" +#include "base/memory/scoped_refptr.h" #include "net/base/completion_callback.h" #include "net/base/completion_once_callback.h" #include "net/base/net_errors.h"
diff --git a/net/websockets/websocket_inflater.cc b/net/websockets/websocket_inflater.cc index 892f506a..7f04781 100644 --- a/net/websockets/websocket_inflater.cc +++ b/net/websockets/websocket_inflater.cc
@@ -46,7 +46,7 @@ bool WebSocketInflater::Initialize(int window_bits) { DCHECK_LE(8, window_bits); DCHECK_GE(15, window_bits); - stream_.reset(new z_stream); + stream_ = std::make_unique<z_stream>(); memset(stream_.get(), 0, sizeof(*stream_)); int result = inflateInit2(stream_.get(), -window_bits); if (result != Z_OK) { @@ -86,8 +86,7 @@ } scoped_refptr<IOBufferWithSize> WebSocketInflater::GetOutput(size_t size) { - scoped_refptr<ShrinkableIOBufferWithSize> buffer = - new ShrinkableIOBufferWithSize(size); + auto buffer = base::MakeRefCounted<ShrinkableIOBufferWithSize>(size); size_t num_bytes_copied = 0; while (num_bytes_copied < size && output_buffer_.Size() > 0) { @@ -244,7 +243,7 @@ while (num_copied_bytes < size) { DCHECK(IsEmpty() || tail_of_last_buffer_ == capacity_); - buffers_.push_back(new IOBufferWithSize(capacity_)); + buffers_.push_back(base::MakeRefCounted<IOBufferWithSize>(capacity_)); tail_of_last_buffer_ = 0; num_copied_bytes += PushToLastBuffer(&data[num_copied_bytes], size - num_copied_bytes);
diff --git a/net/websockets/websocket_inflater.h b/net/websockets/websocket_inflater.h index c861a100..e92fea3 100644 --- a/net/websockets/websocket_inflater.h +++ b/net/websockets/websocket_inflater.h
@@ -13,7 +13,7 @@ #include "base/containers/circular_deque.h" #include "base/macros.h" -#include "base/memory/ref_counted.h" +#include "base/memory/scoped_refptr.h" #include "net/base/net_export.h" extern "C" struct z_stream_s;
diff --git a/net/websockets/websocket_inflater_test.cc b/net/websockets/websocket_inflater_test.cc index 2fd90f4..5e09ff71 100644 --- a/net/websockets/websocket_inflater_test.cc +++ b/net/websockets/websocket_inflater_test.cc
@@ -8,7 +8,6 @@ #include <string> #include <vector> -#include "base/memory/ref_counted.h" #include "net/base/io_buffer.h" #include "net/websockets/websocket_deflater.h" #include "net/websockets/websocket_test_util.h"
diff --git a/net/websockets/websocket_stream.cc b/net/websockets/websocket_stream.cc index 1bae49e7..b9c20733 100644 --- a/net/websockets/websocket_stream.cc +++ b/net/websockets/websocket_stream.cc
@@ -119,7 +119,7 @@ const std::string& additional_headers, std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate, std::unique_ptr<WebSocketHandshakeStreamCreateHelper> create_helper) - : delegate_(new Delegate(this)), + : delegate_(std::make_unique<Delegate>(this)), url_request_(context->CreateRequest(url, DEFAULT_PRIORITY, delegate_.get(), @@ -390,9 +390,7 @@ const SSLInfo& ssl_info, bool fatal) { owner_->connect_delegate()->OnSSLCertificateError( - std::unique_ptr<WebSocketEventInterface::SSLErrorCallbacks>( - new SSLErrorCallbacks(request)), - ssl_info, fatal); + std::make_unique<SSLErrorCallbacks>(request), ssl_info, fatal); } void Delegate::OnReadCompleted(URLRequest* request, int bytes_read) { @@ -417,12 +415,11 @@ URLRequestContext* url_request_context, const NetLogWithSource& net_log, std::unique_ptr<ConnectDelegate> connect_delegate) { - std::unique_ptr<WebSocketStreamRequestImpl> request( - new WebSocketStreamRequestImpl(socket_url, url_request_context, origin, - site_for_cookies, additional_headers, - std::move(connect_delegate), - std::move(create_helper))); - request->Start(std::unique_ptr<base::Timer>(new base::Timer(false, false))); + auto request = std::make_unique<WebSocketStreamRequestImpl>( + socket_url, url_request_context, origin, site_for_cookies, + additional_headers, std::move(connect_delegate), + std::move(create_helper)); + request->Start(std::make_unique<base::Timer>(false, false)); return std::move(request); } @@ -437,11 +434,10 @@ const NetLogWithSource& net_log, std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate, std::unique_ptr<base::Timer> timer) { - std::unique_ptr<WebSocketStreamRequestImpl> request( - new WebSocketStreamRequestImpl(socket_url, url_request_context, origin, - site_for_cookies, additional_headers, - std::move(connect_delegate), - std::move(create_helper))); + auto request = std::make_unique<WebSocketStreamRequestImpl>( + socket_url, url_request_context, origin, site_for_cookies, + additional_headers, std::move(connect_delegate), + std::move(create_helper)); request->Start(std::move(timer)); return std::move(request); }
diff --git a/net/websockets/websocket_stream.h b/net/websockets/websocket_stream.h index ff898cc..d315e5ae 100644 --- a/net/websockets/websocket_stream.h +++ b/net/websockets/websocket_stream.h
@@ -11,7 +11,7 @@ #include "base/callback_forward.h" #include "base/macros.h" -#include "base/memory/ref_counted.h" +#include "base/memory/scoped_refptr.h" #include "base/time/time.h" #include "net/base/completion_callback.h" #include "net/base/net_export.h"
diff --git a/net/websockets/websocket_stream_cookie_test.cc b/net/websockets/websocket_stream_cookie_test.cc index 12f1a44..ae94d5e 100644 --- a/net/websockets/websocket_stream_cookie_test.cc +++ b/net/websockets/websocket_stream_cookie_test.cc
@@ -125,7 +125,8 @@ TEST_P(WebSocketStreamClientUseCookieTest, ClientUseCookie) { // For wss tests. - ssl_data_.push_back(std::make_unique<SSLSocketDataProvider>(ASYNC, OK)); + url_request_context_host_.AddSSLSocketDataProvider( + std::make_unique<SSLSocketDataProvider>(ASYNC, OK)); CookieStore* store = url_request_context_host_.GetURLRequestContext()->cookie_store(); @@ -161,7 +162,8 @@ TEST_P(WebSocketStreamServerSetCookieTest, ServerSetCookie) { // For wss tests. - ssl_data_.push_back(std::make_unique<SSLSocketDataProvider>(ASYNC, OK)); + url_request_context_host_.AddSSLSocketDataProvider( + std::make_unique<SSLSocketDataProvider>(ASYNC, OK)); const GURL url(GetParam().url); const GURL cookie_url(GetParam().cookie_url);
diff --git a/net/websockets/websocket_stream_create_test_base.cc b/net/websockets/websocket_stream_create_test_base.cc index 4d51551b..7098374 100644 --- a/net/websockets/websocket_stream_create_test_base.cc +++ b/net/websockets/websocket_stream_create_test_base.cc
@@ -87,22 +87,16 @@ const GURL& site_for_cookies, const std::string& additional_headers, std::unique_ptr<base::Timer> timer) { - for (size_t i = 0; i < ssl_data_.size(); ++i) { - url_request_context_host_.AddSSLSocketDataProvider(std::move(ssl_data_[i])); - } - ssl_data_.clear(); - std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate( - new TestConnectDelegate(this, connect_run_loop_.QuitClosure())); - WebSocketStream::ConnectDelegate* delegate = connect_delegate.get(); + auto connect_delegate = std::make_unique<TestConnectDelegate>( + this, connect_run_loop_.QuitClosure()); auto create_helper = - std::make_unique<TestWebSocketHandshakeStreamCreateHelper>(delegate, - sub_protocols); + std::make_unique<TestWebSocketHandshakeStreamCreateHelper>( + connect_delegate.get(), sub_protocols); stream_request_ = WebSocketStream::CreateAndConnectStreamForTesting( socket_url, std::move(create_helper), origin, site_for_cookies, additional_headers, url_request_context_host_.GetURLRequestContext(), NetLogWithSource(), std::move(connect_delegate), - timer ? std::move(timer) - : std::unique_ptr<base::Timer>(new base::Timer(false, false))); + timer ? std::move(timer) : std::make_unique<base::Timer>(false, false)); } std::vector<HeaderKeyValuePair>
diff --git a/net/websockets/websocket_stream_create_test_base.h b/net/websockets/websocket_stream_create_test_base.h index aab93c7..e341fcb5 100644 --- a/net/websockets/websocket_stream_create_test_base.h +++ b/net/websockets/websocket_stream_create_test_base.h
@@ -75,7 +75,6 @@ ssl_error_callbacks_; SSLInfo ssl_info_; bool ssl_fatal_; - std::vector<std::unique_ptr<SSLSocketDataProvider>> ssl_data_; URLRequest* url_request_; // This temporarily sets WebSocketEndpointLockManager unlock delay to zero
diff --git a/net/websockets/websocket_stream_test.cc b/net/websockets/websocket_stream_test.cc index 881d43e..05e76eec 100644 --- a/net/websockets/websocket_stream_test.cc +++ b/net/websockets/websocket_stream_test.cc
@@ -11,7 +11,6 @@ #include "base/compiler_specific.h" #include "base/macros.h" -#include "base/memory/ptr_util.h" #include "base/metrics/histogram.h" #include "base/metrics/histogram_samples.h" #include "base/metrics/statistics_recorder.h" @@ -61,8 +60,8 @@ std::unique_ptr<SequencedSocketData> BuildSocketData( MockRead (&reads)[reads_count], MockWrite (&writes)[writes_count]) { - std::unique_ptr<SequencedSocketData> socket_data( - new SequencedSocketData(reads, reads_count, writes, writes_count)); + auto socket_data = std::make_unique<SequencedSocketData>( + reads, reads_count, writes, writes_count); socket_data->set_connect_data(MockConnect(SYNCHRONOUS, OK)); return socket_data; } @@ -1112,7 +1111,7 @@ TEST_P(WebSocketStreamCreateTest, HandshakeTimeout) { std::unique_ptr<SequencedSocketData> socket_data(BuildNullSocketData()); socket_data->set_connect_data(MockConnect(SYNCHRONOUS, ERR_IO_PENDING)); - std::unique_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false)); + auto timer = std::make_unique<MockWeakTimer>(false, false); base::WeakPtr<MockWeakTimer> weak_timer = timer->AsWeakPtr(); CreateAndConnectRawExpectations("ws://www.example.org/", NoSubProtocols(), Origin(), Url(), "", std::move(socket_data), @@ -1132,7 +1131,7 @@ // When the connection establishes the timer should be stopped. TEST_P(WebSocketStreamCreateTest, HandshakeTimerOnSuccess) { - std::unique_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false)); + auto timer = std::make_unique<MockWeakTimer>(false, false); base::WeakPtr<MockWeakTimer> weak_timer = timer->AsWeakPtr(); CreateAndConnectStandard("ws://www.example.org/", "www.example.org", "/", @@ -1153,7 +1152,7 @@ std::unique_ptr<SequencedSocketData> socket_data(BuildNullSocketData()); socket_data->set_connect_data( MockConnect(SYNCHRONOUS, ERR_CONNECTION_REFUSED)); - std::unique_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false)); + auto timer = std::make_unique<MockWeakTimer>(false, false); base::WeakPtr<MockWeakTimer> weak_timer = timer->AsWeakPtr(); CreateAndConnectRawExpectations("ws://www.example.org/", NoSubProtocols(), Origin(), Url(), "", std::move(socket_data), @@ -1268,11 +1267,13 @@ } TEST_P(WebSocketStreamCreateTest, SelfSignedCertificateFailure) { - ssl_data_.push_back(std::make_unique<SSLSocketDataProvider>( - ASYNC, ERR_CERT_AUTHORITY_INVALID)); - ssl_data_[0]->ssl_info.cert = + auto ssl_socket_data = std::make_unique<SSLSocketDataProvider>( + ASYNC, ERR_CERT_AUTHORITY_INVALID); + ssl_socket_data->ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), "unittest.selfsigned.der"); - ASSERT_TRUE(ssl_data_[0]->ssl_info.cert.get()); + ASSERT_TRUE(ssl_socket_data->ssl_info.cert.get()); + url_request_context_host_.AddSSLSocketDataProvider( + std::move(ssl_socket_data)); std::unique_ptr<SequencedSocketData> raw_socket_data(BuildNullSocketData()); CreateAndConnectRawExpectations("wss://www.example.org/", NoSubProtocols(), Origin(), Url(), "", @@ -1288,12 +1289,15 @@ } TEST_P(WebSocketStreamCreateTest, SelfSignedCertificateSuccess) { - ssl_data_.push_back(std::make_unique<SSLSocketDataProvider>( - ASYNC, ERR_CERT_AUTHORITY_INVALID)); - ssl_data_[0]->ssl_info.cert = + auto ssl_socket_data = std::make_unique<SSLSocketDataProvider>( + ASYNC, ERR_CERT_AUTHORITY_INVALID); + ssl_socket_data->ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), "unittest.selfsigned.der"); - ASSERT_TRUE(ssl_data_[0]->ssl_info.cert.get()); - ssl_data_.push_back(std::make_unique<SSLSocketDataProvider>(ASYNC, OK)); + ASSERT_TRUE(ssl_socket_data->ssl_info.cert.get()); + url_request_context_host_.AddSSLSocketDataProvider( + std::move(ssl_socket_data)); + url_request_context_host_.AddSSLSocketDataProvider( + std::make_unique<SSLSocketDataProvider>(ASYNC, OK)); url_request_context_host_.AddRawExpectations(BuildNullSocketData()); CreateAndConnectStandard("wss://www.example.org/", "www.example.org", "/", NoSubProtocols(), Origin(), Url(), {}, {}, {});
diff --git a/net/websockets/websocket_test_util.cc b/net/websockets/websocket_test_util.cc index 8c371e4f..112db2d 100644 --- a/net/websockets/websocket_test_util.cc +++ b/net/websockets/websocket_test_util.cc
@@ -150,8 +150,7 @@ }; WebSocketMockClientSocketFactoryMaker::WebSocketMockClientSocketFactoryMaker() - : detail_(new Detail) { -} + : detail_(std::make_unique<Detail>()) {} WebSocketMockClientSocketFactoryMaker:: ~WebSocketMockClientSocketFactoryMaker() = default; @@ -182,8 +181,8 @@ kHttpStreamParserBufferSize), sequence++)); } - std::unique_ptr<SequencedSocketData> socket_data(new SequencedSocketData( - detail_->reads.data(), detail_->reads.size(), &detail_->write, 1)); + auto socket_data = std::make_unique<SequencedSocketData>( + detail_->reads.data(), detail_->reads.size(), &detail_->write, 1); socket_data->set_connect_data(MockConnect(SYNCHRONOUS, OK)); AddRawExpectations(std::move(socket_data)); }
diff --git a/services/BUILD.gn b/services/BUILD.gn index edd4b46..12306a7 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn
@@ -6,6 +6,7 @@ import("//services/catalog/public/tools/catalog.gni") import("//services/service_manager/public/tools/test/service_test.gni") import("//testing/test.gni") +import("//tools/v8_context_snapshot/v8_context_snapshot.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. @@ -63,10 +64,14 @@ # Some tests make network requests. "//net/android:net_java", - - # Some tests need to initialize V8. - "//v8:v8_external_startup_data_assets", ] + + # Some tests need to initialize V8. + if (use_v8_context_snapshot) { + deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ] + } else { + deps += [ "//v8:v8_external_startup_data_assets" ] + } } if (!is_android && !is_ios) {
diff --git a/services/audio/debug_recording.cc b/services/audio/debug_recording.cc index 81d92bf..50cd71d 100644 --- a/services/audio/debug_recording.cc +++ b/services/audio/debug_recording.cc
@@ -59,10 +59,11 @@ } void DebugRecording::CreateWavFile( - const base::FilePath& file_suffix, + media::AudioDebugRecordingStreamType stream_type, + uint32_t id, mojom::DebugRecordingFileProvider::CreateWavFileCallback reply_callback) { DCHECK(audio_manager_->GetTaskRunner()->BelongsToCurrentThread()); - file_provider_->CreateWavFile(file_suffix, std::move(reply_callback)); + file_provider_->CreateWavFile(stream_type, id, std::move(reply_callback)); } bool DebugRecording::IsEnabled() {
diff --git a/services/audio/debug_recording.h b/services/audio/debug_recording.h index 4c9f66a..4520c6d 100644 --- a/services/audio/debug_recording.h +++ b/services/audio/debug_recording.h
@@ -7,12 +7,14 @@ #include <utility> +#include "base/gtest_prod_util.h" #include "base/memory/weak_ptr.h" #include "mojo/public/cpp/bindings/binding.h" #include "services/audio/public/mojom/debug_recording.mojom.h" namespace media { class AudioManager; +enum class AudioDebugRecordingStreamType; } namespace audio { @@ -30,11 +32,14 @@ void Enable(mojom::DebugRecordingFileProviderPtr file_provider) override; private: + FRIEND_TEST_ALL_PREFIXES(DebugRecordingTest, + CreateWavFileCallsFileProviderCreateWavFile); // Called on binding connection error. void Disable(); void CreateWavFile( - const base::FilePath& file_suffix, + media::AudioDebugRecordingStreamType stream_type, + uint32_t id, mojom::DebugRecordingFileProvider::CreateWavFileCallback reply_callback); bool IsEnabled();
diff --git a/services/audio/debug_recording_unittest.cc b/services/audio/debug_recording_unittest.cc index 73c92bf..238bed7 100644 --- a/services/audio/debug_recording_unittest.cc +++ b/services/audio/debug_recording_unittest.cc
@@ -15,12 +15,41 @@ #include "services/audio/public/mojom/debug_recording.mojom.h" #include "testing/gmock/include/gmock/gmock.h" +using testing::_; + namespace audio { namespace { + const base::FilePath::CharType kBaseFileName[] = FILE_PATH_LITERAL("base_file_name"); -} + +// Empty function bound and passed to DebugRecording::CreateWavFile. +void FileCreated(base::File file) {} + +} // namespace + +class MockFileProvider : public mojom::DebugRecordingFileProvider { + public: + MockFileProvider(mojom::DebugRecordingFileProviderRequest request, + const base::FilePath& file_name_base) + : binding_(this, std::move(request)) {} + + MOCK_METHOD2(DoCreateWavFile, + void(media::AudioDebugRecordingStreamType stream_type, + uint32_t id)); + void CreateWavFile(media::AudioDebugRecordingStreamType stream_type, + uint32_t id, + CreateWavFileCallback reply_callback) override { + DoCreateWavFile(stream_type, id); + std::move(reply_callback).Run(base::File()); + } + + private: + mojo::Binding<mojom::DebugRecordingFileProvider> binding_; + + DISALLOW_COPY_AND_ASSIGN(MockFileProvider); +}; class DebugRecordingTest : public media::AudioDebugRecordingTest { public: @@ -52,19 +81,17 @@ void DestroyDebugRecording() { debug_recording_ptr_.reset(); } - MOCK_METHOD0(OnConnectionError, void()); - - private: std::unique_ptr<DebugRecording> debug_recording_; mojom::DebugRecordingPtr debug_recording_ptr_; + private: DISALLOW_COPY_AND_ASSIGN(DebugRecordingTest); }; TEST_F(DebugRecordingTest, EnableResetEnablesDisablesDebugRecording) { CreateDebugRecording(); - EXPECT_CALL(*mock_debug_recording_manager_, EnableDebugRecording(testing::_)); + EXPECT_CALL(*mock_debug_recording_manager_, EnableDebugRecording(_)); EnableDebugRecording(); EXPECT_CALL(*mock_debug_recording_manager_, DisableDebugRecording()); @@ -78,4 +105,27 @@ DestroyDebugRecording(); } +TEST_F(DebugRecordingTest, CreateWavFileCallsFileProviderCreateWavFile) { + CreateDebugRecording(); + + mojom::DebugRecordingFileProviderPtr file_provider_ptr; + MockFileProvider mock_file_provider(mojo::MakeRequest(&file_provider_ptr), + base::FilePath(kBaseFileName)); + + EXPECT_CALL(*mock_debug_recording_manager_, EnableDebugRecording(_)); + debug_recording_ptr_->Enable(std::move(file_provider_ptr)); + scoped_task_environment_.RunUntilIdle(); + + const int id = 1; + EXPECT_CALL( + mock_file_provider, + DoCreateWavFile(media::AudioDebugRecordingStreamType::kInput, id)); + debug_recording_->CreateWavFile(media::AudioDebugRecordingStreamType::kInput, + id, base::BindOnce(&FileCreated)); + scoped_task_environment_.RunUntilIdle(); + + EXPECT_CALL(*mock_debug_recording_manager_, DisableDebugRecording()); + DestroyDebugRecording(); +} + } // namespace audio
diff --git a/services/audio/public/cpp/debug_recording.typemap b/services/audio/public/cpp/debug_recording.typemap new file mode 100644 index 0000000..ae3bbfa5 --- /dev/null +++ b/services/audio/public/cpp/debug_recording.typemap
@@ -0,0 +1,18 @@ +# Copyright 2018 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. + +mojom = "//services/audio/public/mojom/debug_recording.mojom" +public_headers = [ "//media/audio/audio_debug_recording_helper.h" ] +traits_headers = + [ "//services/audio/public/cpp/debug_recording_mojom_traits.h" ] +sources = [ + "//services/audio/public/cpp/debug_recording_mojom_traits.cc", +] +deps = [ + "//media", +] + +type_mappings = [ + "audio.mojom.DebugRecordingStreamType=media::AudioDebugRecordingStreamType", +]
diff --git a/services/audio/public/cpp/debug_recording_mojom_traits.cc b/services/audio/public/cpp/debug_recording_mojom_traits.cc new file mode 100644 index 0000000..b9c2108 --- /dev/null +++ b/services/audio/public/cpp/debug_recording_mojom_traits.cc
@@ -0,0 +1,39 @@ +// Copyright 2018 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 "services/audio/public/cpp/debug_recording_mojom_traits.h" + +namespace mojo { + +audio::mojom::DebugRecordingStreamType +EnumTraits<audio::mojom::DebugRecordingStreamType, + media::AudioDebugRecordingStreamType>:: + ToMojom(media::AudioDebugRecordingStreamType stream_type) { + switch (stream_type) { + case media::AudioDebugRecordingStreamType::kInput: + return audio::mojom::DebugRecordingStreamType::kInput; + case media::AudioDebugRecordingStreamType::kOutput: + return audio::mojom::DebugRecordingStreamType::kOutput; + } + NOTREACHED(); + return audio::mojom::DebugRecordingStreamType::kInput; +} + +bool EnumTraits<audio::mojom::DebugRecordingStreamType, + media::AudioDebugRecordingStreamType>:: + FromMojom(audio::mojom::DebugRecordingStreamType stream_type, + media::AudioDebugRecordingStreamType* out) { + switch (stream_type) { + case audio::mojom::DebugRecordingStreamType::kInput: + *out = media::AudioDebugRecordingStreamType::kInput; + return true; + case audio::mojom::DebugRecordingStreamType::kOutput: + *out = media::AudioDebugRecordingStreamType::kOutput; + return true; + } + NOTREACHED(); + return false; +} + +} // namespace mojo
diff --git a/services/audio/public/cpp/debug_recording_mojom_traits.h b/services/audio/public/cpp/debug_recording_mojom_traits.h new file mode 100644 index 0000000..e8b3ed2 --- /dev/null +++ b/services/audio/public/cpp/debug_recording_mojom_traits.h
@@ -0,0 +1,24 @@ +// Copyright 2018 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 SERVICES_AUDIO_PUBLIC_CPP_DEBUG_RECORDING_MOJOM_TRAITS_H_ +#define SERVICES_AUDIO_PUBLIC_CPP_DEBUG_RECORDING_MOJOM_TRAITS_H_ + +#include "media/audio/audio_debug_recording_helper.h" +#include "services/audio/public/mojom/debug_recording.mojom.h" + +namespace mojo { + +template <> +struct EnumTraits<audio::mojom::DebugRecordingStreamType, + media::AudioDebugRecordingStreamType> { + static audio::mojom::DebugRecordingStreamType ToMojom( + media::AudioDebugRecordingStreamType stream_type); + static bool FromMojom(audio::mojom::DebugRecordingStreamType type, + media::AudioDebugRecordingStreamType* output); +}; + +} // namespace mojo + +#endif // SERVICES_AUDIO_PUBLIC_CPP_DEBUG_RECORDING_MOJOM_TRAITS_H_
diff --git a/services/audio/public/cpp/debug_recording_session.cc b/services/audio/public/cpp/debug_recording_session.cc index 12091ab..5fd4b84 100644 --- a/services/audio/public/cpp/debug_recording_session.cc +++ b/services/audio/public/cpp/debug_recording_session.cc
@@ -7,6 +7,8 @@ #include <utility> #include "base/files/file_path.h" +#include "base/strings/string_number_conversions.h" +#include "build/build_config.h" #include "media/audio/audio_debug_recording_manager.h" #include "media/audio/audio_manager.h" #include "services/audio/public/mojom/constants.mojom.h" @@ -15,9 +17,27 @@ namespace audio { namespace { -const base::FilePath::CharType kWavExtension[] = FILE_PATH_LITERAL("wav"); + +#if defined(OS_WIN) +#define IntToStringType base::IntToString16 +#else +#define IntToStringType base::IntToString +#endif + +const base::FilePath::CharType* StreamTypeToStringType( + media::AudioDebugRecordingStreamType stream_type) { + switch (stream_type) { + case media::AudioDebugRecordingStreamType::kInput: + return FILE_PATH_LITERAL("input"); + case media::AudioDebugRecordingStreamType::kOutput: + return FILE_PATH_LITERAL("output"); + } + NOTREACHED(); + return FILE_PATH_LITERAL("output"); } +} // namespace + DebugRecordingSession::DebugRecordingFileProvider::DebugRecordingFileProvider( mojom::DebugRecordingFileProviderRequest request, const base::FilePath& file_name_base) @@ -27,7 +47,8 @@ ~DebugRecordingFileProvider() = default; void DebugRecordingSession::DebugRecordingFileProvider::CreateWavFile( - const base::FilePath& file_name_suffix, + media::AudioDebugRecordingStreamType stream_type, + uint32_t id, CreateWavFileCallback reply_callback) { base::PostTaskWithTraitsAndReplyWithResult( FROM_HERE, @@ -38,8 +59,9 @@ return base::File(file_name, base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE); }, - file_name_base_.AddExtension(file_name_suffix.value()) - .AddExtension(kWavExtension)), + file_name_base_.AddExtension(StreamTypeToStringType(stream_type)) + .AddExtension(IntToStringType(id)) + .AddExtension(FILE_PATH_LITERAL("wav"))), std::move(reply_callback)); }
diff --git a/services/audio/public/cpp/debug_recording_session.h b/services/audio/public/cpp/debug_recording_session.h index addb231..6d0f68be 100644 --- a/services/audio/public/cpp/debug_recording_session.h +++ b/services/audio/public/cpp/debug_recording_session.h
@@ -7,6 +7,7 @@ #include <memory> +#include "media/audio/audio_debug_recording_helper.h" #include "media/audio/audio_debug_recording_session.h" #include "mojo/public/cpp/bindings/binding.h" #include "services/audio/public/mojom/debug_recording.mojom.h" @@ -36,8 +37,11 @@ const base::FilePath& file_name_base); ~DebugRecordingFileProvider() override; - // Creates file with name "|file_name_base_|.|file_suffix|.wav". - void CreateWavFile(const base::FilePath& file_suffix, + // Creates file with name "|file_name_base_|.<stream_type_str>.|id|.wav", + // where <stream_type_str> is "input" or "output" depending on |stream_type| + // value. + void CreateWavFile(media::AudioDebugRecordingStreamType stream_type, + uint32_t id, CreateWavFileCallback reply_callback) override; private:
diff --git a/services/audio/public/cpp/debug_recording_session_factory.cc b/services/audio/public/cpp/debug_recording_session_factory.cc index eab484b..1be75c7b 100644 --- a/services/audio/public/cpp/debug_recording_session_factory.cc +++ b/services/audio/public/cpp/debug_recording_session_factory.cc
@@ -7,7 +7,7 @@ #include <utility> #include "base/files/file_path.h" -#include "media/audio/audio_debug_recording_session_impl.h" +#include "services/audio/public/cpp/debug_recording_session.h" #include "services/service_manager/public/cpp/connector.h" namespace audio { @@ -18,8 +18,8 @@ std::unique_ptr<service_manager::Connector> connector) { DCHECK(connector); - return std::make_unique<media::AudioDebugRecordingSessionImpl>( - debug_recording_file_path); + return std::make_unique<audio::DebugRecordingSession>( + debug_recording_file_path, std::move(connector)); } } // namespace audio
diff --git a/services/audio/public/cpp/typemaps.gni b/services/audio/public/cpp/typemaps.gni index 7ba5bed..b2bd062 100644 --- a/services/audio/public/cpp/typemaps.gni +++ b/services/audio/public/cpp/typemaps.gni
@@ -2,4 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -typemaps = [ "//services/audio/public/cpp/audio_device_description.typemap" ] +typemaps = [ + "//services/audio/public/cpp/audio_device_description.typemap", + "//services/audio/public/cpp/debug_recording.typemap", +]
diff --git a/services/audio/public/mojom/debug_recording.mojom b/services/audio/public/mojom/debug_recording.mojom index 9bb73ea..8ca8ee2 100644 --- a/services/audio/public/mojom/debug_recording.mojom +++ b/services/audio/public/mojom/debug_recording.mojom
@@ -7,15 +7,21 @@ import "mojo/common/file.mojom"; import "mojo/common/file_path.mojom"; +enum DebugRecordingStreamType { + kInput = 0, + kOutput = 1, +}; + // Creates audio debug recording files. Requires a base file path at binding. // All files are created in the path defined in implementation, to which -// ".|suffix|" and ".wav" extension are appended. E.g.: from base file path -// "/path/base_name" and suffix "output.1", "/path/base_name.output.1.wav" will -// be created. This interface is called by audio service from implementation of +// ".output" or ".input" (depending on |stream_type|), ".|id|" and ".wav" +// extension are appended. E.g.: from base file path "/path/base_name", stream +// type kOutput and id = 1, "/path/base_name.output.1.wav" will be created. +// This interface is called by audio service from implementation of // DebugRecording interface defined below. interface DebugRecordingFileProvider { // Returns invalid file in case of failure. - CreateWavFile(mojo.common.mojom.FilePath suffix) + CreateWavFile(DebugRecordingStreamType stream_type, uint32 id) => (mojo.common.mojom.File? file); };
diff --git a/services/audio/test/debug_recording_session_unittest.cc b/services/audio/test/debug_recording_session_unittest.cc index b1140db..456c7bc 100644 --- a/services/audio/test/debug_recording_session_unittest.cc +++ b/services/audio/test/debug_recording_session_unittest.cc
@@ -4,12 +4,16 @@ #include "services/audio/public/cpp/debug_recording_session.h" +#include <limits> #include <memory> #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/strings/string_number_conversions.h" +#include "base/test/gtest_util.h" #include "base/test/scoped_task_environment.h" +#include "build/build_config.h" #include "media/audio/audio_debug_recording_test.h" #include "media/audio/mock_audio_debug_recording_manager.h" #include "media/audio/mock_audio_manager.h" @@ -23,13 +27,17 @@ namespace { +#if defined(OS_WIN) +#define IntToStringType base::IntToString16 +#else +#define IntToStringType base::IntToString +#endif + const base::FilePath::CharType kBaseFileName[] = FILE_PATH_LITERAL("debug_recording"); const base::FilePath::CharType kWavExtension[] = FILE_PATH_LITERAL("wav"); -const base::FilePath::CharType kValidSuffix[] = FILE_PATH_LITERAL("output.1"); -const base::FilePath::CharType kEmptySuffix[] = FILE_PATH_LITERAL(""); -const base::FilePath::CharType kInvalidSuffix[] = - FILE_PATH_LITERAL("/../invalid"); +const base::FilePath::CharType kInput[] = FILE_PATH_LITERAL("input"); +const base::FilePath::CharType kOutput[] = FILE_PATH_LITERAL("output"); } // namespace @@ -49,8 +57,11 @@ void TearDown() override { file_provider_.reset(); } - base::FilePath GetFileName(base::FilePath suffix) { - return file_path_.AddExtension(suffix.value()).AddExtension(kWavExtension); + base::FilePath GetFileName(const base::FilePath::StringType& stream_type, + uint32_t id) { + return file_path_.AddExtension(stream_type) + .AddExtension(IntToStringType(id)) + .AddExtension(kWavExtension); } MOCK_METHOD1(OnFileCreated, void(bool)); @@ -109,42 +120,68 @@ DISALLOW_COPY_AND_ASSIGN(DebugRecordingSessionTest); }; -TEST_F(DebugRecordingFileProviderTest, CreateWithValidSuffixReturnsValidFile) { - base::FilePath suffix(kValidSuffix); +TEST_F(DebugRecordingFileProviderTest, CreateFileForInputStream) { + const uint32_t id = 1; EXPECT_CALL(*this, OnFileCreated(true)); file_provider_ptr_->CreateWavFile( - suffix, base::BindOnce(&DebugRecordingFileProviderTest::FileCreated, - base::Unretained(this))); + media::AudioDebugRecordingStreamType::kInput, id, + base::BindOnce(&DebugRecordingFileProviderTest::FileCreated, + base::Unretained(this))); scoped_task_environment_.RunUntilIdle(); - base::FilePath file_name(GetFileName(suffix)); + base::FilePath file_name(GetFileName(kInput, id)); EXPECT_TRUE(base::PathExists(file_name)); ASSERT_TRUE(base::DeleteFile(file_name, false)); } -TEST_F(DebugRecordingFileProviderTest, CreateWithEmptySuffixReturnsValidFile) { - base::FilePath suffix(kEmptySuffix); +TEST_F(DebugRecordingFileProviderTest, CreateFileForOutputStream) { + const uint32_t id = 1; EXPECT_CALL(*this, OnFileCreated(true)); file_provider_ptr_->CreateWavFile( - suffix, base::BindOnce(&DebugRecordingFileProviderTest::FileCreated, - base::Unretained(this))); + media::AudioDebugRecordingStreamType::kOutput, id, + base::BindOnce(&DebugRecordingFileProviderTest::FileCreated, + base::Unretained(this))); scoped_task_environment_.RunUntilIdle(); - base::FilePath file_name(GetFileName(suffix)); + base::FilePath file_name(GetFileName(kOutput, id)); EXPECT_TRUE(base::PathExists(file_name)); ASSERT_TRUE(base::DeleteFile(file_name, false)); } +TEST_F(DebugRecordingFileProviderTest, CreateFilesForVariousIds) { + uint32_t ids[]{std::numeric_limits<uint32_t>::min(), + std::numeric_limits<uint32_t>::max()}; + EXPECT_CALL(*this, OnFileCreated(true)).Times(2); + for (uint32_t id : ids) { + file_provider_ptr_->CreateWavFile( + media::AudioDebugRecordingStreamType::kOutput, id, + base::BindOnce(&DebugRecordingFileProviderTest::FileCreated, + base::Unretained(this))); + } + scoped_task_environment_.RunUntilIdle(); + + for (uint32_t id : ids) { + base::FilePath file_name(GetFileName(kOutput, id)); + EXPECT_TRUE(base::PathExists(file_name)); + EXPECT_TRUE(base::DeleteFile(file_name, false)); + } +} + TEST_F(DebugRecordingFileProviderTest, - CreateWithInvalidSuffixReturnsInvalidFile) { - base::FilePath suffix(kInvalidSuffix); - EXPECT_CALL(*this, OnFileCreated(false)); - file_provider_ptr_->CreateWavFile( - suffix, base::BindOnce(&DebugRecordingFileProviderTest::FileCreated, - base::Unretained(this))); + CreateFileWithInvalidStreamTypeDoesNotCreateFile) { + const uint32_t invalid_stream_type = 7; + const uint32_t id = 1; + EXPECT_CALL(*this, OnFileCreated(true)).Times(0); + EXPECT_DCHECK_DEATH(file_provider_ptr_->CreateWavFile( + static_cast<media::AudioDebugRecordingStreamType>(invalid_stream_type), + id, + base::BindOnce(&DebugRecordingFileProviderTest::FileCreated, + base::Unretained(this)))); scoped_task_environment_.RunUntilIdle(); - EXPECT_FALSE(base::PathExists(GetFileName(suffix))); + base::FilePath file_name( + GetFileName(IntToStringType(invalid_stream_type), id)); + EXPECT_FALSE(base::PathExists(file_name)); } TEST_F(DebugRecordingSessionTest,
diff --git a/services/preferences/tracked/pref_hash_filter.h b/services/preferences/tracked/pref_hash_filter.h index c425aee8..2bad7bb 100644 --- a/services/preferences/tracked/pref_hash_filter.h +++ b/services/preferences/tracked/pref_hash_filter.h
@@ -21,9 +21,9 @@ #include "services/preferences/public/mojom/preferences.mojom.h" #include "services/preferences/tracked/hash_store_contents.h" #include "services/preferences/tracked/interceptable_pref_filter.h" +#include "services/preferences/tracked/pref_hash_store.h" #include "services/preferences/tracked/tracked_preference.h" -class PrefHashStore; class PrefService; namespace base {
diff --git a/services/ui/demo/mus_demo_external.cc b/services/ui/demo/mus_demo_external.cc index 7bf77dd..ed2c7b4 100644 --- a/services/ui/demo/mus_demo_external.cc +++ b/services/ui/demo/mus_demo_external.cc
@@ -31,7 +31,7 @@ int GetSquareSizeForWindow(int window_index) { return 50 * window_index + 400; -}; +} } // namespace @@ -41,7 +41,8 @@ std::unique_ptr<aura::WindowTreeClient> MusDemoExternal::CreateWindowTreeClient() { - return std::make_unique<aura::WindowTreeClient>(context()->connector(), this); + return aura::WindowTreeClient::CreateForWindowTreeHostFactory( + context()->connector(), this); } void MusDemoExternal::OnStartImpl() { @@ -60,18 +61,6 @@ // For now, a fake display is created in order to work around an assertion in // aura::GetDeviceScaleFactorFromDisplay(). AddPrimaryDisplay(display::Display(0)); - - // The number of windows to open is specified by number_of_windows_. The - // windows are opened sequentially (the first one here and the others after - // each call to OnEmbed) to ensure that the WindowTreeHostMus passed to - // OnEmbed corresponds to the WindowTreeDataExternal::host_ created in - // OpenNewWindow. - OpenNewWindow(); - - // TODO(tonikitoo,msisov): For true external window mode, we want a slightly - // different API: it would connect to MUS, creating a unique WindowTree - // instance, capable of serving 0..n WindowTreeHost's. - window_tree_client()->ConnectViaWindowTreeHostFactory(); } void MusDemoExternal::OpenNewWindow() { @@ -85,6 +74,11 @@ void MusDemoExternal::OnEmbed( std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) { + if (initialized_windows_count_ == 0) { + // The initial connection to the WindowService has been established. + OpenNewWindow(); + } + InitWindowTreeData(std::move(window_tree_host)); initialized_windows_count_++;
diff --git a/services/ui/demo/mus_demo_internal.cc b/services/ui/demo/mus_demo_internal.cc index 7d8b61b2a..1b8bef3 100644 --- a/services/ui/demo/mus_demo_internal.cc +++ b/services/ui/demo/mus_demo_internal.cc
@@ -24,12 +24,11 @@ std::unique_ptr<aura::WindowTreeClient> MusDemoInternal::CreateWindowTreeClient() { - return std::make_unique<aura::WindowTreeClient>(context()->connector(), this, - this); + return aura::WindowTreeClient::CreateForWindowManager(context()->connector(), + this, this); } void MusDemoInternal::OnStartImpl() { - window_tree_client()->ConnectAsWindowManager(); // The demo will actually start when the window server creates the display, // causing OnWmNewDisplay to be called. }
diff --git a/services/ui/test_wm/test_wm.cc b/services/ui/test_wm/test_wm.cc index f41d102..5a6de4fe 100644 --- a/services/ui/test_wm/test_wm.cc +++ b/services/ui/test_wm/test_wm.cc
@@ -59,10 +59,9 @@ screen_ = std::make_unique<display::ScreenBase>(); display::Screen::SetScreenInstance(screen_.get()); aura_env_ = aura::Env::CreateInstance(aura::Env::Mode::MUS); - window_tree_client_ = std::make_unique<aura::WindowTreeClient>( + window_tree_client_ = aura::WindowTreeClient::CreateForWindowManager( context()->connector(), this, this); aura_env_->SetWindowTreeClient(window_tree_client_.get()); - window_tree_client_->ConnectAsWindowManager(); } void OnBindInterface(const service_manager::BindSourceInfo& source_info, const std::string& interface_name,
diff --git a/services/ui/ws/window_manager_client_unittest.cc b/services/ui/ws/window_manager_client_unittest.cc index f56a95d..33c6c85 100644 --- a/services/ui/ws/window_manager_client_unittest.cc +++ b/services/ui/ws/window_manager_client_unittest.cc
@@ -686,14 +686,14 @@ TEST_F(WindowServerTest, EstablishConnectionViaFactory) { EstablishConnectionViaFactoryDelegate delegate(window_manager()); set_window_manager_delegate(&delegate); - aura::WindowTreeClient second_client(connector(), this, nullptr, nullptr, - nullptr, false); - second_client.ConnectViaWindowTreeFactory(); + std::unique_ptr<aura::WindowTreeClient> second_client = + aura::WindowTreeClient::CreateForWindowTreeFactory(connector(), this, + false); aura::WindowTreeHostMus window_tree_host_in_second_client( - aura::CreateInitParamsForTopLevel(&second_client)); + aura::CreateInitParamsForTopLevel(second_client.get())); window_tree_host_in_second_client.InitHost(); window_tree_host_in_second_client.window()->Show(); - ASSERT_TRUE(second_client.GetRoots().count( + ASSERT_TRUE(second_client->GetRoots().count( window_tree_host_in_second_client.window()) > 0); // Wait for the window to appear in the wm. ASSERT_TRUE(delegate.QuitOnCreate()); @@ -716,17 +716,17 @@ // of the first window and then add it. EstablishConnectionViaFactoryDelegate delegate(window_manager()); set_window_manager_delegate(&delegate); - aura::WindowTreeClient second_client(connector(), this, nullptr, nullptr, - nullptr, false); - second_client.ConnectViaWindowTreeFactory(); + std::unique_ptr<aura::WindowTreeClient> second_client = + aura::WindowTreeClient::CreateForWindowTreeFactory(connector(), this, + false); aura::WindowTreeHostMus window_tree_host_in_second_client( - aura::CreateInitParamsForTopLevel(&second_client)); + aura::CreateInitParamsForTopLevel(second_client.get())); window_tree_host_in_second_client.InitHost(); window_tree_host_in_second_client.window()->Show(); aura::Window* second_client_child = NewVisibleWindow( - window_tree_host_in_second_client.window(), &second_client); + window_tree_host_in_second_client.window(), second_client.get()); // Create the transient without a parent, set transient parent, then add. - aura::Window* transient = NewVisibleWindow(nullptr, &second_client); + aura::Window* transient = NewVisibleWindow(nullptr, second_client.get()); aura::client::TransientWindowClient* transient_window_client = aura::client::GetTransientWindowClient(); transient_window_client->AddTransientChild(second_client_child, transient);
diff --git a/services/ui/ws/window_server_test_base.cc b/services/ui/ws/window_server_test_base.cc index fc19a86..58679865b 100644 --- a/services/ui/ws/window_server_test_base.cc +++ b/services/ui/ws/window_server_test_base.cc
@@ -100,8 +100,7 @@ env_ = aura::Env::CreateInstance(aura::Env::Mode::MUS); display::Screen::SetScreenInstance(&screen_); std::unique_ptr<aura::WindowTreeClient> window_manager_window_tree_client = - std::make_unique<aura::WindowTreeClient>(connector(), this, this); - window_manager_window_tree_client->ConnectAsWindowManager(); + aura::WindowTreeClient::CreateForWindowManager(connector(), this, this); window_manager_ = window_manager_window_tree_client.get(); window_tree_clients_.push_back(std::move(window_manager_window_tree_client)); @@ -290,11 +289,10 @@ } void WindowServerTestBase::BindWindowTreeClientRequest( - mojom::WindowTreeClientRequest request) { + ui::mojom::WindowTreeClientRequest request) { const bool create_discardable_memory = false; - window_tree_clients_.push_back(std::make_unique<aura::WindowTreeClient>( - connector(), this, nullptr, std::move(request), nullptr, - create_discardable_memory)); + window_tree_clients_.push_back(aura::WindowTreeClient::CreateForEmbedding( + connector(), this, std::move(request), create_discardable_memory)); } bool WindowServerTestBase::DeleteWindowTreeHost(
diff --git a/storage/browser/blob/blob_storage_context.cc b/storage/browser/blob/blob_storage_context.cc index 0844db6..5f00a7c 100644 --- a/storage/browser/blob/blob_storage_context.cc +++ b/storage/browser/blob/blob_storage_context.cc
@@ -665,8 +665,9 @@ base::trace_event::MemoryDumpManager::GetInstance() ->system_allocator_pool_name(); - auto* mad = pmd->CreateAllocatorDump(base::StringPrintf( - "blob_storage/0x%" PRIXPTR, reinterpret_cast<uintptr_t>(this))); + auto* mad = pmd->CreateAllocatorDump( + base::StringPrintf("site_storage/blob_storage_0x%" PRIXPTR, + reinterpret_cast<uintptr_t>(this))); mad->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, base::trace_event::MemoryAllocatorDump::kUnitsBytes, memory_controller().memory_usage());
diff --git a/testing/buildbot/chromium.mac.json b/testing/buildbot/chromium.mac.json index 7983f73..87b4751 100644 --- a/testing/buildbot/chromium.mac.json +++ b/testing/buildbot/chromium.mac.json
@@ -1345,7 +1345,7 @@ } ] }, - "Mac10.9 Tests": { + "Mac10.13 Tests": { "gtest_tests": [ { "swarming": { @@ -1788,7 +1788,7 @@ } ] }, - "Mac10.9 Tests (dbg)": { + "Mac10.13 Tests (dbg)": { "gtest_tests": [ { "swarming": {
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl index e30a794..609c6b2a 100644 --- a/testing/buildbot/test_suite_exceptions.pyl +++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -1187,11 +1187,11 @@ # On chromium.linux, unclear why these only run on "Linux Tests". 'Linux Tests (dbg)(1)', 'Linux Tests (dbg)(1)(32)', - # On chromium.mac, unclear why these only run on "Mac10.9 Tests". + # On chromium.mac, unclear why these only run on "Mac10.13 Tests". 'Mac10.10 Tests', 'Mac10.11 Tests', 'Mac10.12 Tests', - 'Mac10.9 Tests (dbg)', + 'Mac10.13 Tests (dbg)', # On chromium.win, unclear why these only run on "Win7 Tests (1)". 'Win 7 Tests x64 (1)', 'Win10 Tests x64', @@ -1200,7 +1200,7 @@ 'Linux - Future (dbg)', ], 'modifications': { - 'Mac10.9 Tests': { + 'Mac10.13 Tests': { # Remove this once the tests is not flaky on Mac os 10.13 # See crbug.com/813163 'experiment_percentage': 100, @@ -1577,8 +1577,8 @@ 'Mac10.10 Tests', 'Mac10.11 Tests', 'Mac10.12 Tests', - 'Mac10.9 Tests', - 'Mac10.9 Tests (dbg)', + 'Mac10.13 Tests', + 'Mac10.13 Tests (dbg)', # chromium.memory 'Linux Chromium OS ASan LSan Tests (1)', 'Linux TSan Tests', @@ -1662,8 +1662,8 @@ 'Mac10.10 Tests', 'Mac10.11 Tests', 'Mac10.12 Tests', - 'Mac10.9 Tests', - 'Mac10.9 Tests (dbg)', + 'Mac10.13 Tests', + 'Mac10.13 Tests (dbg)', # chromium.memory 'Linux ASan LSan Tests (1)', # On chromium.win, unclear why these only run on "Win7 Tests (1)". @@ -2233,8 +2233,8 @@ 'Mac10.10 Tests', 'Mac10.11 Tests', 'Mac10.12 Tests', - 'Mac10.9 Tests', - 'Mac10.9 Tests (dbg)', + 'Mac10.13 Tests', + 'Mac10.13 Tests (dbg)', # chromium.fyi 'Chromium Mac 10.10 MacViews', @@ -2266,11 +2266,11 @@ 'Chromium Mac 10.11', 'Chromium Mac 10.13', 'Out of Process Profiling Mac', - # On chromium.mac, unclear why these only run on "Mac10.9 Tests". + # On chromium.mac, unclear why these only run on "Mac10.13 Tests". 'Mac10.10 Tests', 'Mac10.11 Tests', 'Mac10.12 Tests', - 'Mac10.9 Tests (dbg)', + 'Mac10.13 Tests (dbg)', # chromium.win 'Win7 Tests (dbg)(1)', ], @@ -2807,8 +2807,8 @@ 'Mac10.10 Tests', 'Mac10.11 Tests', 'Mac10.12 Tests', - 'Mac10.9 Tests', - 'Mac10.9 Tests (dbg)', + 'Mac10.13 Tests', + 'Mac10.13 Tests (dbg)', 'Win7 Tests (dbg)(1)', 'Win10 Tests x64', ], @@ -3250,8 +3250,8 @@ }, 'remove_from': [ 'Linux Tests (dbg)(1)(32)', - 'Mac10.9 Tests', - 'Mac10.9 Tests (dbg)', + 'Mac10.13 Tests', + 'Mac10.13 Tests (dbg)', # client.v8.chromium 'Linux - Future (dbg)', ], @@ -3608,8 +3608,8 @@ 'Linux Tests (dbg)(1)', 'Linux Tests (dbg)(1)(32)', # chromium.mac - 'Mac10.9 Tests', - 'Mac10.9 Tests (dbg)', + 'Mac10.13 Tests', + 'Mac10.13 Tests (dbg)', # chromium.win 'Win 7 Tests x64 (1)', 'Win10 Tests x64',
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl index 4cccb8f4..31a9b52 100644 --- a/testing/buildbot/waterfalls.pyl +++ b/testing/buildbot/waterfalls.pyl
@@ -1621,14 +1621,14 @@ 'isolated_scripts': 'chromium_rel_isolated_scripts', }, }, - 'Mac10.9 Tests': { + 'Mac10.13 Tests': { 'test_suites': { 'gtest_tests': 'chromium_mac_gtests', 'isolated_scripts': 'chromium_rel_isolated_scripts', 'scripts': 'chromium_scripts', }, }, - 'Mac10.9 Tests (dbg)': { + 'Mac10.13 Tests (dbg)': { 'test_suites': { 'gtest_tests': 'chromium_mac_gtests', 'isolated_scripts': 'chromium_dbg_isolated_scripts',
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG index e13ae51..1e56ca0 100644 --- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG +++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
@@ -102,9 +102,9 @@ crbug.com/591099 animations/animation-ready-reject-script-forbidden.html [ Timeout ] crbug.com/591099 animations/cross-fade-list-style-image.html [ Failure ] crbug.com/591099 animations/interpolation/backdrop-filter-interpolation.html [ Timeout ] -crbug.com/591099 animations/interpolation/line-height-interpolation.html [ Timeout ] +crbug.com/591099 animations/interpolation/line-height-interpolation.html [ Pass Timeout ] crbug.com/591099 animations/interpolation/svg-stroke-dasharray-interpolation.html [ Timeout ] -crbug.com/591099 animations/interpolation/webkit-clip-path-interpolation.html [ Timeout ] +crbug.com/591099 animations/interpolation/webkit-clip-path-interpolation.html [ Pass Timeout ] crbug.com/591099 animations/interpolation/webkit-column-width-interpolation.html [ Pass ] crbug.com/591099 animations/rotate-transform-equivalent.html [ Failure ] crbug.com/591099 animations/timing/timing-model.html [ Timeout ] @@ -171,6 +171,7 @@ crbug.com/591099 css2.1/t1002-c5523-width-00-b-g.html [ Failure Pass ] crbug.com/591099 css2.1/t1005-c5524-width-00-b-g.html [ Failure Pass ] crbug.com/591099 css2.1/t1005-c5524-width-01-b-g.html [ Failure Pass ] +crbug.com/591099 css2.1/t1008-c44-ln-box-00-d-ag.html [ Failure Pass ] crbug.com/591099 css2.1/t100801-c544-valgn-00-a-ag.html [ Failure ] crbug.com/591099 css2.1/t100801-c544-valgn-03-d-agi.html [ Failure ] crbug.com/591099 css2.1/t1202-counter-04-b.html [ Failure ] @@ -186,6 +187,7 @@ crbug.com/591099 css2.1/t140201-c534-bgreps-05-c-ag.html [ Failure Pass ] crbug.com/591099 css3/blending/background-blend-mode-overlapping-accelerated-elements.html [ Failure ] crbug.com/591099 css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change.html [ Failure ] +crbug.com/591099 css3/filters/effect-blur-hw.html [ Pass Timeout ] crbug.com/591099 css3/filters/effect-reference-subregion-nested.html [ Pass ] crbug.com/714962 css3/filters/effect-reference-zoom-hw.html [ Failure ] crbug.com/591099 css3/filters/filtered-inline.html [ Failure ] @@ -293,9 +295,6 @@ crbug.com/591099 editing/selection/4975120.html [ Failure ] crbug.com/591099 editing/selection/5232159.html [ Failure ] crbug.com/591099 editing/selection/5354455-2.html [ Failure ] -crbug.com/714962 editing/selection/anchor-focus2.html [ Failure Pass ] -crbug.com/714962 editing/selection/anchor-focus3.html [ Failure Pass ] -crbug.com/714962 editing/selection/android-longtap-not-select-empty.html [ Failure Pass ] crbug.com/591099 editing/selection/caret-at-bidi-boundary.html [ Failure ] crbug.com/591099 editing/selection/continuations-with-move-caret-to-boundary.html [ Failure ] crbug.com/591099 editing/selection/continuations-without-move-caret-to-boundary.html [ Failure ] @@ -306,7 +305,6 @@ crbug.com/591099 editing/selection/dont-select-text-overflow-ellipsis-when-wrapping.html [ Failure ] crbug.com/591099 editing/selection/doubleclick-beside-cr-span.html [ Timeout ] crbug.com/591099 editing/selection/drag-in-iframe.html [ Failure ] -crbug.com/714962 editing/selection/drag-select-rapidly.html [ Failure Pass ] crbug.com/591099 editing/selection/expanding-selections.html [ Failure ] crbug.com/591099 editing/selection/expanding-selections2.html [ Failure ] crbug.com/591099 editing/selection/extend-by-sentence-001.html [ Failure ] @@ -334,7 +332,6 @@ crbug.com/591099 editing/selection/modify_move/move_by_sentence_boundary.html [ Failure ] crbug.com/714962 editing/selection/modify_move/move_by_word_with_underscore.html [ Failure ] crbug.com/591099 editing/selection/mouse/extend_by_word_with_base_is_end.html [ Failure ] -crbug.com/714962 editing/selection/mouse/user-drag-element-and-user-select-none.html [ Failure Pass ] crbug.com/591099 editing/selection/move-3875618-fix.html [ Failure ] crbug.com/591099 editing/selection/move-3875641-fix.html [ Failure ] crbug.com/591099 editing/selection/move-by-line-002.html [ Failure ] @@ -349,7 +346,6 @@ crbug.com/591099 editing/selection/select-element-paragraph-boundary.html [ Failure ] crbug.com/714962 editing/selection/select-from-textfield-outwards.html [ Failure ] crbug.com/591099 editing/selection/select-missing-image.html [ Failure ] -crbug.com/591099 editing/selection/select-out-of-floated-non-editable.html [ Failure Pass ] crbug.com/591099 editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2.html [ Failure ] crbug.com/591099 editing/selection/select-text-overflow-ellipsis-mixed-in-ltr.html [ Failure ] crbug.com/591099 editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2.html [ Failure ] @@ -360,9 +356,7 @@ crbug.com/714962 editing/selection/skip-over-contenteditable.html [ Failure ] crbug.com/591099 editing/selection/transformed-selection-rects.html [ Failure ] crbug.com/591099 editing/selection/triple-click-in-pre.html [ Failure ] -crbug.com/591099 editing/selection/user-select/user-select-all.html [ Failure Pass ] crbug.com/591099 editing/selection/word-granularity.html [ Failure ] -crbug.com/714962 editing/shadow/compare-positions-in-nested-shadow.html [ Failure Pass ] crbug.com/591099 editing/style/block-styles-007.html [ Failure ] crbug.com/591099 editing/text-iterator/findString.html [ Timeout ] crbug.com/591099 editing/unsupported-content/list-delete-001.html [ Failure ] @@ -389,10 +383,10 @@ crbug.com/591099 external/wpt/WebCryptoAPI/generateKey/failures_RSA-PSS.worker.html [ Timeout ] crbug.com/591099 external/wpt/WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.worker.html [ Timeout ] crbug.com/591099 external/wpt/WebCryptoAPI/generateKey/successes.worker.html [ Timeout ] -crbug.com/591099 external/wpt/WebCryptoAPI/import_export/rsa_importKey.https.worker.html [ Timeout ] +crbug.com/591099 external/wpt/WebCryptoAPI/import_export/rsa_importKey.https.worker.html [ Pass Timeout ] crbug.com/591099 external/wpt/WebCryptoAPI/import_export/rsa_importKey.worker.html [ Timeout ] crbug.com/709227 external/wpt/WebCryptoAPI/import_export/symmetric_importKey.worker.html [ Failure ] -crbug.com/714962 external/wpt/WebCryptoAPI/import_export/test_rsa_importKey.https.html [ Timeout ] +crbug.com/714962 external/wpt/WebCryptoAPI/import_export/test_rsa_importKey.https.html [ Pass Timeout ] crbug.com/591099 external/wpt/acid/acid3/numbered-tests.html [ Crash ] crbug.com/591099 external/wpt/acid/acid3/test.html [ Crash ] crbug.com/591099 external/wpt/compat/webkit-text-fill-color-property-005.html [ Pass ] @@ -419,6 +413,7 @@ crbug.com/714962 external/wpt/css/css-backgrounds/background-image-005.html [ Failure ] crbug.com/714962 external/wpt/css/css-backgrounds/background-image-006.html [ Failure Pass ] crbug.com/591099 external/wpt/css/css-backgrounds/box-shadow-syntax-001.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-backgrounds/scroll-positioned-multiple-background-images.html [ Failure ] crbug.com/591099 external/wpt/css/css-display/display-contents-details.html [ Crash ] crbug.com/714962 external/wpt/css/css-display/display-contents-dynamic-before-after-001.html [ Failure ] crbug.com/714962 external/wpt/css/css-display/display-contents-dynamic-before-after-first-letter-001.html [ Failure ] @@ -741,7 +736,7 @@ crbug.com/591099 external/wpt/css/css-tables/fixup-dynamic-anonymous-table-001.html [ Pass ] crbug.com/591099 external/wpt/css/css-tables/floats/floats-wrap-bfc-006c.xht [ Pass ] crbug.com/591099 external/wpt/css/css-tables/height-distribution/percentage-sizing-of-table-cell-children.html [ Failure ] -crbug.com/591099 external/wpt/css/css-tables/table-model-fixup-2.html [ Failure ] +crbug.com/591099 external/wpt/css/css-tables/table-model-fixup-2.html [ Failure Pass ] crbug.com/591099 external/wpt/css/css-text-decor/text-emphasis-color-001.xht [ Failure ] crbug.com/591099 external/wpt/css/css-text-decor/text-emphasis-position-above-left-001.xht [ Failure ] crbug.com/591099 external/wpt/css/css-text-decor/text-emphasis-position-above-left-002.xht [ Failure ] @@ -822,21 +817,21 @@ crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-icb-vrl-018.xht [ Pass ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-icb-vrl-020.xht [ Pass ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-icb-vrl-030.xht [ Pass ] -crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-003.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-005.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-003.xht [ Failure Pass ] +crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-005.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-007.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-009.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-011.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-013.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-011.xht [ Failure Pass ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-013.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-015.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-017.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-019.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-021.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-023.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-023.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-025.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-027.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-029.xht [ Failure Pass ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-031.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-031.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-033.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-035.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-037.xht [ Failure ] @@ -850,34 +845,34 @@ crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-053.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-055.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-057.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-059.xht [ Failure Pass ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-059.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-061.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-063.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-065.xht [ Failure Pass ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-067.xht [ Failure Pass ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-067.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-069.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-071.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-071.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-073.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-075.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-077.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-079.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-079.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-081.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-083.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-083.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-085.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-087.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-089.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-089.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-091.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-093.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-095.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-097.xht [ Failure Pass ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-103.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-103.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-105.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-107.xht [ Failure Pass ] -crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-109.xht [ Failure Pass ] +crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-109.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-111.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-113.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-115.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-117.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-117.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-119.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-121.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-123.xht [ Failure ] @@ -885,33 +880,33 @@ crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-127.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-129.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-131.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-133.xht [ Failure Pass ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-133.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-135.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-137.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-139.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-141.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-143.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-145.xht [ Failure Pass ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-147.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-147.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-149.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-151.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-153.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-155.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-157.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-159.xht [ Failure Pass ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-161.xht [ Failure Pass ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-159.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-161.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-163.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-165.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-167.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-169.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-171.xht [ Failure Pass ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-171.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-173.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-175.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-177.xht [ Failure Pass ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-177.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-179.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-181.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-183.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-185.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-183.xht [ Failure Pass ] +crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-185.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-187.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-189.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-191.xht [ Failure ] @@ -930,7 +925,7 @@ crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-217.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-219.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-221.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-223.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-223.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-225.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-227.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vlr-229.xht [ Failure Pass ] @@ -938,16 +933,16 @@ crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-004.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-006.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-008.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-010.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-010.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-012.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-014.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-016.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-018.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-020.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-022.xht [ Failure Pass ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-022.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-024.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-026.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-028.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-028.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-030.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-032.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-034.xht [ Failure ] @@ -965,10 +960,10 @@ crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-058.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-060.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-062.xht [ Failure Pass ] -crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-064.xht [ Failure Pass ] +crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-064.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-066.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-068.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-070.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-068.xht [ Failure Pass ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-070.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-072.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-074.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-076.xht [ Failure ] @@ -991,17 +986,17 @@ crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-114.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-116.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-118.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-120.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-120.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-122.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-124.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-126.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-128.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-128.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-130.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-132.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-134.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-136.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-138.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-140.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-140.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-142.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-144.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-146.xht [ Failure ] @@ -1015,21 +1010,21 @@ crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-162.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-164.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-166.xht [ Failure Pass ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-168.xht [ Failure Pass ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-168.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-170.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-172.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-174.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-176.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-176.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-178.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-180.xht [ Failure Pass ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-182.xht [ Failure Pass ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-182.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-184.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-186.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-188.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-190.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-192.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-194.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-196.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-196.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-198.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-200.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/abs-pos-non-replaced-vrl-202.xht [ Failure ] @@ -1072,17 +1067,17 @@ crbug.com/714962 external/wpt/css/css-writing-modes/direction-vlr-003.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/direction-vlr-005.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/direction-vrl-002.xht [ Failure Pass ] -crbug.com/714962 external/wpt/css/css-writing-modes/direction-vrl-004.xht [ Failure Pass ] +crbug.com/714962 external/wpt/css/css-writing-modes/direction-vrl-004.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/float-contiguous-vrl-002.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/float-contiguous-vrl-004.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/float-contiguous-vrl-006.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/float-contiguous-vrl-008.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/float-shrink-to-fit-vrl-008.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/float-vlr-005.xht [ Failure Pass ] -crbug.com/714962 external/wpt/css/css-writing-modes/float-vlr-007.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/float-vlr-007.xht [ Failure Pass ] crbug.com/591099 external/wpt/css/css-writing-modes/float-vlr-013.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/float-vrl-004.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes/float-vrl-006.xht [ Failure ] +crbug.com/591099 external/wpt/css/css-writing-modes/float-vrl-006.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/float-vrl-008.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/float-vrl-012.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/horizontal-rule-vrl-002.xht [ Failure ] @@ -1160,10 +1155,10 @@ crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-005.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-007.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-009.xht [ Failure ] -crbug.com/591099 external/wpt/css/css-writing-modes/text-align-vlr-011.xht [ Failure Pass ] +crbug.com/591099 external/wpt/css/css-writing-modes/text-align-vlr-011.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-013.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-015.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-017.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-017.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vlr-019.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vrl-002.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/text-align-vrl-004.xht [ Failure ] @@ -1179,7 +1174,7 @@ crbug.com/591099 external/wpt/css/css-writing-modes/text-combine-upright-decorations-001.html [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/text-combine-upright-layout-rules-001.html [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/text-indent-vlr-003.xht [ Failure ] -crbug.com/714962 external/wpt/css/css-writing-modes/text-indent-vlr-005.xht [ Failure ] +crbug.com/714962 external/wpt/css/css-writing-modes/text-indent-vlr-005.xht [ Failure Pass ] crbug.com/714962 external/wpt/css/css-writing-modes/text-indent-vlr-011.xht [ Failure ] crbug.com/714962 external/wpt/css/css-writing-modes/text-indent-vlr-013.xht [ Failure ] crbug.com/591099 external/wpt/css/css-writing-modes/text-indent-vrl-002.xht [ Failure ] @@ -1275,7 +1270,7 @@ crbug.com/591099 external/wpt/dom/ranges/Range-mutations-dataChange.html [ Timeout ] crbug.com/591099 external/wpt/dom/ranges/Range-set.html [ Timeout ] crbug.com/591099 external/wpt/dom/ranges/Range-surroundContents.html [ Timeout ] -crbug.com/591099 external/wpt/domxpath/xml_xpath_runner.html [ Timeout ] +crbug.com/591099 external/wpt/domxpath/xml_xpath_runner.html [ Pass Timeout ] crbug.com/591099 external/wpt/editing/run/backcolor.html [ Pass Timeout ] crbug.com/591099 external/wpt/editing/run/bold.html [ Timeout ] crbug.com/591099 external/wpt/editing/run/fontname.html [ Timeout ] @@ -1302,7 +1297,7 @@ crbug.com/591099 external/wpt/editing/run/removeformat.html [ Timeout ] crbug.com/591099 external/wpt/editing/run/strikethrough.html [ Timeout ] crbug.com/591099 external/wpt/editing/run/subscript.html [ Timeout ] -crbug.com/591099 external/wpt/editing/run/superscript.html [ Pass Timeout ] +crbug.com/591099 external/wpt/editing/run/superscript.html [ Timeout ] crbug.com/591099 external/wpt/editing/run/underline.html [ Timeout ] crbug.com/591099 external/wpt/encoding/api-invalid-label.html [ Timeout ] crbug.com/591099 external/wpt/encoding/eof-utf-8-two.html [ Pass ] @@ -1467,7 +1462,7 @@ crbug.com/714962 external/wpt/pointerevents/pointerevent_touch-action-auto-css_touch-manual.html [ Timeout ] crbug.com/591099 external/wpt/pointerevents/pointerevent_touch-action-button-test_touch-manual.html [ Timeout ] crbug.com/714962 external/wpt/pointerevents/pointerevent_touch-action-keyboard-manual.html [ Timeout ] -crbug.com/714962 external/wpt/pointerevents/pointerevent_touch-action-mouse-manual.html [ Pass Timeout ] +crbug.com/714962 external/wpt/pointerevents/pointerevent_touch-action-mouse-manual.html [ Timeout ] crbug.com/714962 external/wpt/pointerevents/pointerevent_touch-action-pan-left-css_touch-manual.html [ Pass ] crbug.com/714962 external/wpt/pointerevents/pointerevent_touch-action-pan-right-css_touch-manual.html [ Failure ] crbug.com/714962 external/wpt/pointerevents/pointerevent_touch-action-pan-x-pan-y_touch-manual.html [ Timeout ] @@ -1505,7 +1500,7 @@ crbug.com/591099 external/wpt/svg/interfaces.html [ Timeout ] crbug.com/591099 external/wpt/svg/linking/reftests/href-filter-element.html [ Failure ] crbug.com/591099 external/wpt/svg/path/bearing/absolute.svg [ Pass ] -crbug.com/591099 external/wpt/url/url-setters.html [ Timeout ] +crbug.com/591099 external/wpt/url/url-setters.html [ Pass Timeout ] crbug.com/591099 external/wpt/wasm/wasm_local_iframe_test.html [ Failure ] crbug.com/591099 external/wpt/webmessaging/broadcastchannel/sandbox.html [ Failure ] crbug.com/591099 external/wpt/webrtc/interfaces.html [ Pass Timeout ] @@ -1662,7 +1657,6 @@ crbug.com/591099 fast/block/positioning/complex-positioned-movement-inline-ancestor.html [ Crash ] crbug.com/591099 fast/block/positioning/complex-positioned-movement-inline.html [ Crash ] crbug.com/591099 fast/block/positioning/fixed-in-abs-height-change.html [ Crash ] -crbug.com/591099 fast/block/positioning/hittest-on-relative-positioned-children.html [ Failure Pass ] crbug.com/591099 fast/block/positioning/insert-positioned-in-anonymous-crash.html [ Crash ] crbug.com/591099 fast/block/positioning/move-with-auto-width.html [ Failure ] crbug.com/714962 fast/block/positioning/offsetLeft-offsetTop-multicolumn.html [ Failure ] @@ -1901,7 +1895,6 @@ crbug.com/591099 fast/css/clip-zooming.html [ Failure ] crbug.com/591099 fast/css/color-correction-on-backgrounds.html [ Failure ] crbug.com/591099 fast/css/color-correction.html [ Failure ] -crbug.com/591099 fast/css/containment/contain-paint-composited-scroll.html [ Failure Pass ] crbug.com/591099 fast/css/containment/size-and-layout-containment.html [ Failure ] crbug.com/591099 fast/css/content-counter-010.htm [ Failure ] crbug.com/591099 fast/css/css-imports.html [ Failure ] @@ -2103,9 +2096,6 @@ crbug.com/591099 fast/encoding/utf-16-big-endian.html [ Failure ] crbug.com/591099 fast/encoding/utf-16-little-endian.html [ Failure ] crbug.com/591099 fast/encoding/xmacroman-encoding-test.html [ Failure ] -crbug.com/591099 fast/events/autoscroll-should-not-stop-on-keypress.html [ Failure Pass ] -crbug.com/714962 fast/events/autoscroll-upwards-propagation-overflow-hidden-body.html [ Failure Pass ] -crbug.com/591099 fast/events/autoscroll-upwards-propagation-overflow-hidden-iframe-body.html [ Failure Pass ] crbug.com/714962 fast/events/document-elementFromPoint.html [ Failure ] crbug.com/714962 fast/events/drag-in-frames.html [ Failure ] crbug.com/714962 fast/events/event-on-culled_inline.html [ Failure ] @@ -2123,7 +2113,7 @@ crbug.com/591099 fast/events/pointerevents/mouse-pointer-capture.html [ Timeout ] crbug.com/591099 fast/events/pointerevents/mouse-pointer-event-properties.html [ Timeout ] crbug.com/591099 fast/events/pointerevents/mouse-pointer-preventdefault.html [ Timeout ] -crbug.com/591099 fast/events/pointerevents/multi-pointer-preventdefault.html [ Timeout ] +crbug.com/591099 fast/events/pointerevents/multi-pointer-preventdefault.html [ Pass Timeout ] crbug.com/591099 fast/events/pointerevents/touch-capture-in-iframe.html [ Timeout ] crbug.com/591099 fast/events/pointerevents/touch-capture.html [ Timeout ] crbug.com/714962 fast/events/pointerevents/touch-pointer-events.html [ Pass ] @@ -2139,7 +2129,7 @@ crbug.com/591099 fast/events/wheel/mouse-wheel-scroll-latching.html [ Pass ] crbug.com/591099 fast/events/wheel/wheel-scroll-latching-on-scrollbar.html [ Pass ] crbug.com/714962 fast/events/wheel/wheelevent-basic.html [ Failure ] -crbug.com/591099 fast/forms/calendar-picker/calendar-picker-key-operations.html [ Timeout ] +crbug.com/591099 fast/forms/calendar-picker/calendar-picker-key-operations.html [ Pass Timeout ] crbug.com/714962 fast/forms/calendar-picker/calendar-picker-mouse-operations.html [ Failure ] crbug.com/591099 fast/forms/calendar-picker/month-picker-key-operations.html [ Timeout ] crbug.com/714962 fast/forms/calendar-picker/month-picker-mouse-operations.html [ Failure ] @@ -2155,7 +2145,7 @@ crbug.com/591099 fast/forms/label/label-selection-by-textSelection-and-click.html [ Failure Pass ] crbug.com/591099 fast/forms/long-text-in-input.html [ Crash Failure ] crbug.com/591099 fast/forms/number/number-spinbutton-in-multi-column.html [ Failure ] -crbug.com/591099 fast/forms/range/range-stepup-stepdown-from-renderer.html [ Timeout ] +crbug.com/591099 fast/forms/range/range-stepup-stepdown-from-renderer.html [ Pass Timeout ] crbug.com/591099 fast/forms/range/slider-in-multi-column.html [ Failure ] crbug.com/591099 fast/forms/select/listbox-in-multi-column.html [ Failure ] crbug.com/591099 fast/forms/select/select-initial-position.html [ Failure ] @@ -2179,7 +2169,6 @@ crbug.com/714962 fast/forms/suggestion-picker/week-suggestion-picker-appearance.html [ Failure ] crbug.com/591099 fast/forms/text-control-intrinsic-widths.html [ Timeout ] crbug.com/591099 fast/forms/text/input-readonly-autoscroll.html [ Failure ] -crbug.com/591099 fast/forms/text/input-text-click-outside.html [ Failure Pass ] crbug.com/591099 fast/forms/textarea/textarea-align.html [ Failure ] crbug.com/591099 fast/forms/textarea/textarea-metrics.html [ Timeout ] crbug.com/714962 fast/forms/textarea/textarea-resize-above-min-size-and-below-initial-size.html [ Pass ] @@ -3118,20 +3107,15 @@ crbug.com/591099 fast/text/place-rtl-ellipsis-in-inline-blocks-align-left.html [ Failure ] crbug.com/591099 fast/text/place-rtl-ellipsis-in-inline-blocks-align-right.html [ Failure ] crbug.com/591099 fast/text/place-rtl-ellipsis-in-inline-blocks.html [ Failure ] -crbug.com/714962 fast/text/remove-zero-length-run.html [ Failure Pass ] -crbug.com/714962 fast/text/selection/atsui-rtl-override-selection.html [ Failure Pass ] crbug.com/714962 fast/text/selection/flexbox-selection-nested.html [ Failure ] crbug.com/591099 fast/text/selection/flexbox-selection.html [ Failure ] -crbug.com/591099 fast/text/selection/hebrew-selection.html [ Failure Pass ] crbug.com/591099 fast/text/selection/khmer-selection.html [ Failure ] crbug.com/591099 fast/text/selection/offsetForPosition-complex-fallback.html [ Failure ] crbug.com/714962 fast/text/selection/pre-wrap-overflow-selection.html [ Failure ] -crbug.com/714962 fast/text/selection/reset-drag-on-mouse-down.html [ Failure Pass ] crbug.com/591099 fast/text/selection/selection-hard-linebreak.html [ Failure ] crbug.com/591099 fast/text/selection/selection-rect-rounding.html [ Failure ] crbug.com/591099 fast/text/selection/selection-with-inline-padding.html [ Failure ] crbug.com/714962 fast/text/selection/shaping-selection-rect.html [ Failure ] -crbug.com/714962 fast/text/selection/thai-offsetForPosition-inside-character.html [ Failure Pass ] crbug.com/714962 fast/text/text-range-bounds.html [ Failure ] crbug.com/714962 fast/text/transform-text-first-line-capitalize.html [ Failure ] crbug.com/714962 fast/text/transform-text-first-line-lowercase.html [ Failure ] @@ -3146,7 +3130,8 @@ crbug.com/591099 fast/text/whitespace/pre-wrap-spaces-after-newline.html [ Failure ] crbug.com/591099 fast/text/zero-width-characters-complex-script.html [ Failure ] crbug.com/591099 fast/text/zero-width-characters.html [ Failure ] -crbug.com/591099 fast/webgl/texImage-imageBitmap-from-image-resize.html [ Timeout ] +crbug.com/591099 fast/webgl/texImage-imageBitmap-from-image-resize.html [ Pass Timeout ] +crbug.com/591099 fast/webgl/webgl-composite-modes.html [ Pass Timeout ] crbug.com/591099 fast/writing-mode/Kusa-Makura-background-canvas.html [ Failure ] crbug.com/591099 fast/writing-mode/auto-sizing-orthogonal-flows.html [ Failure ] crbug.com/714962 fast/writing-mode/background-vertical-lr.html [ Failure ] @@ -3328,7 +3313,7 @@ crbug.com/591099 http/tests/devtools/editor/text-editor-ctrl-d-2.js [ Timeout ] crbug.com/714962 http/tests/devtools/editor/text-editor-enter-behaviour.js [ Timeout ] crbug.com/714962 http/tests/devtools/editor/text-editor-formatter.js [ Timeout ] -crbug.com/591099 http/tests/devtools/editor/text-editor-goto-matching-bracket.js [ Timeout ] +crbug.com/591099 http/tests/devtools/editor/text-editor-goto-matching-bracket.js [ Pass Timeout ] crbug.com/714962 http/tests/devtools/editor/text-editor-indent-autodetection.js [ Timeout ] crbug.com/714962 http/tests/devtools/editor/text-editor-reveal-line.js [ Timeout ] crbug.com/591099 http/tests/devtools/editor/text-editor-word-jumps.js [ Timeout ] @@ -3338,14 +3323,15 @@ crbug.com/591099 http/tests/devtools/elements/highlight/highlight-css-shapes-outside-scroll.js [ Failure ] crbug.com/591099 http/tests/devtools/elements/highlight/highlight-css-shapes-outside.js [ Failure ] crbug.com/714962 http/tests/devtools/elements/inspect-pseudo-element.js [ Timeout ] +crbug.com/591099 http/tests/devtools/elements/styles-2/paste-property.js [ Pass Timeout ] crbug.com/591099 http/tests/devtools/elements/styles-3/style-rule-from-imported-stylesheet.js [ Pass ] crbug.com/591099 http/tests/devtools/elements/styles-3/styles-change-node-while-editing.js [ Pass ] crbug.com/591099 http/tests/devtools/elements/styles-3/styles-disable-inherited.js [ Failure ] crbug.com/591099 http/tests/devtools/elements/styles-4/styles-formatting.js [ Pass Timeout ] -crbug.com/591099 http/tests/devtools/elements/styles/styles-mouse-test.js [ Failure Pass ] crbug.com/714962 http/tests/devtools/jump-to-previous-editing-location.js [ Failure ] crbug.com/591099 http/tests/devtools/network/network-datareceived.js [ Failure ] crbug.com/591099 http/tests/devtools/oopif/oopif-elements-navigate-in.js [ Failure ] +crbug.com/591099 http/tests/devtools/search/source-frame-replace-2.js [ Pass Timeout ] crbug.com/714962 http/tests/devtools/service-workers/service-workers-view.js [ Failure ] crbug.com/591099 http/tests/devtools/text-autosizing-override.js [ Failure ] crbug.com/591099 http/tests/devtools/tracing/scroll-invalidations.js [ Failure ] @@ -3358,7 +3344,7 @@ crbug.com/591099 http/tests/feature-policy/payment-disabled.php [ Pass ] crbug.com/591099 http/tests/feature-policy/payment-enabledforall.php [ Pass ] crbug.com/591099 http/tests/images/restyle-decode-error.html [ Failure ] -crbug.com/783102 http/tests/incremental/frame-focus-before-load.html [ Timeout ] +crbug.com/783102 http/tests/incremental/frame-focus-before-load.html [ Pass Timeout ] crbug.com/591099 http/tests/incremental/slow-utf8-text.pl [ Pass Timeout ] crbug.com/591099 http/tests/inspector-protocol/network/response-interception-no-change-content-not-ready.js [ Pass ] crbug.com/591099 http/tests/inspector-protocol/network/response-interception-request-completes-network-closes.js [ Pass ] @@ -3384,7 +3370,7 @@ crbug.com/591099 http/tests/security/contentSecurityPolicy/source-list-parsing-04.html [ Failure ] crbug.com/591099 http/tests/security/cors-rfc1918/addressspace-document-appcache.html [ Crash Failure ] crbug.com/591099 http/tests/security/cors-rfc1918/addressspace-document-csp-appcache.html [ Crash Failure Pass ] -crbug.com/591099 http/tests/security/setDomainRelaxationForbiddenForURLScheme.html [ Crash ] +crbug.com/591099 http/tests/security/setDomainRelaxationForbiddenForURLScheme.html [ Crash Pass ] crbug.com/591099 http/tests/security/shape-image-cors-allow-origin.html [ Failure ] crbug.com/591099 http/tests/security/shape-image-cors-data-url.html [ Failure ] crbug.com/591099 http/tests/security/shape-image-cors-same-origin.html [ Failure ] @@ -3529,6 +3515,7 @@ crbug.com/591099 paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint.html [ Failure ] crbug.com/591099 paint/invalidation/delete-into-nested-block.html [ Failure ] crbug.com/591099 paint/invalidation/details-open-repaint.html [ Failure ] +crbug.com/591099 paint/invalidation/filters/filter-repaint-accelerated-on-accelerated-filter.html [ Pass Timeout ] crbug.com/591099 paint/invalidation/flexbox/align-content-change-keeping-geometry.html [ Failure ] crbug.com/714962 paint/invalidation/flexbox/align-content-change-no-flex.html [ Failure ] crbug.com/591099 paint/invalidation/flexbox/align-content-change.html [ Failure ] @@ -3827,6 +3814,8 @@ crbug.com/591099 paint/overflow/fixed-background-scroll-window.html [ Pass ] crbug.com/591099 paint/pagination/composited-paginated-inline.html [ Failure ] crbug.com/591099 paint/pagination/pagination-change-clip-crash.html [ Failure ] +crbug.com/591099 paint/selection/text-selection-drag-in-frame-scrolled.html [ Failure ] +crbug.com/591099 paint/selection/text-selection-drag-in-frame.html [ Failure ] crbug.com/714962 paint/selection/text-selection-drag.html [ Failure ] crbug.com/591099 paint/selection/text-selection-inline-block-rtl.html [ Failure ] crbug.com/591099 paint/selection/text-selection-inline-block.html [ Failure ] @@ -3971,7 +3960,6 @@ crbug.com/714962 svg/text/columns-do-not-apply.html [ Failure ] crbug.com/591099 svg/text/foreignObject-text-clipping-bug.xml [ Failure ] crbug.com/714962 svg/text/layout-inline-children-assert.html [ Failure ] -crbug.com/714962 svg/text/select-text-svgfont.html [ Failure Pass ] crbug.com/591099 svg/text/text-repaint-rects.xhtml [ Failure ] crbug.com/714962 svg/text/tspan-multiple-outline.svg [ Failure ] crbug.com/591099 svg/transforms/text-with-pattern-inside-transformed-html.xhtml [ Failure ] @@ -4240,8 +4228,8 @@ crbug.com/591099 virtual/incremental-shadow-dom/fast/dom/shadow/no-renderers-for-light-children.html [ Pass ] crbug.com/714962 virtual/incremental-shadow-dom/fast/dom/shadow/scrollbar.html [ Crash ] crbug.com/591099 virtual/incremental-shadow-dom/fast/dom/shadow/selections-in-shadow.html [ Timeout ] -crbug.com/591099 virtual/incremental-shadow-dom/html/details_summary/details-nested-1.html [ Failure ] -crbug.com/591099 virtual/incremental-shadow-dom/html/details_summary/details-nested-2.html [ Failure ] +crbug.com/591099 virtual/incremental-shadow-dom/html/details_summary/details-nested-1.html [ Failure Pass ] +crbug.com/591099 virtual/incremental-shadow-dom/html/details_summary/details-nested-2.html [ Failure Pass ] crbug.com/591099 virtual/incremental-shadow-dom/html/details_summary/details-writing-mode-align-center.html [ Failure ] crbug.com/591099 virtual/incremental-shadow-dom/html/details_summary/details-writing-mode-align-left.html [ Failure ] crbug.com/591099 virtual/incremental-shadow-dom/html/details_summary/details-writing-mode-align-right.html [ Failure ] @@ -4264,17 +4252,14 @@ crbug.com/591099 virtual/incremental-shadow-dom/shadow-dom/slotted-pseudo-element.html [ Pass ] crbug.com/591099 virtual/layout_ng/ [ Skip ] crbug.com/591099 virtual/mouseevent_fractional/fast/events/autoscroll-in-textfield.html [ Failure Pass ] -crbug.com/591099 virtual/mouseevent_fractional/fast/events/autoscroll-should-not-stop-on-keypress.html [ Failure Pass ] -crbug.com/714962 virtual/mouseevent_fractional/fast/events/autoscroll-upwards-propagation-overflow-hidden-body.html [ Failure Pass ] -crbug.com/591099 virtual/mouseevent_fractional/fast/events/autoscroll-upwards-propagation-overflow-hidden-iframe-body.html [ Failure Pass ] crbug.com/714962 virtual/mouseevent_fractional/fast/events/document-elementFromPoint.html [ Failure ] crbug.com/714962 virtual/mouseevent_fractional/fast/events/drag-in-frames.html [ Failure ] crbug.com/591099 virtual/mouseevent_fractional/fast/events/drag-on-removed-slider-does-not-crash.html [ Pass ] crbug.com/714962 virtual/mouseevent_fractional/fast/events/event-on-culled_inline.html [ Failure ] crbug.com/591099 virtual/mouseevent_fractional/fast/events/keyboardevent-getModifierState.html [ Timeout ] crbug.com/591099 virtual/mouseevent_fractional/fast/events/menu-key-context-menu-document-pinch-zoom.html [ Failure ] -crbug.com/714962 virtual/mouseevent_fractional/fast/events/middleClickAutoscroll-latching.html [ Timeout ] -crbug.com/714962 virtual/mouseevent_fractional/fast/events/mouse-down-on-pseudo-element-remove-crash.html [ Failure ] +crbug.com/714962 virtual/mouseevent_fractional/fast/events/middleClickAutoscroll-latching.html [ Pass Timeout ] +crbug.com/714962 virtual/mouseevent_fractional/fast/events/mouse-down-on-pseudo-element-remove-crash.html [ Failure Pass ] crbug.com/591099 virtual/mouseevent_fractional/fast/events/mouse-event-buttons-attribute.html [ Timeout ] crbug.com/591099 virtual/mouseevent_fractional/fast/events/mouse-relative-position.html [ Failure ] crbug.com/591099 virtual/mouseevent_fractional/fast/events/mouseevent-getModifierState.html [ Timeout ] @@ -4291,7 +4276,6 @@ crbug.com/591099 virtual/mouseevent_fractional/fast/events/scale-and-scroll-iframe-window.html [ Pass ] crbug.com/591099 virtual/mouseevent_fractional/fast/events/select-element.html [ Timeout ] crbug.com/591099 virtual/mouseevent_fractional/fast/events/selectstart-by-double-triple-clicks.html [ Failure ] -crbug.com/591099 virtual/mouseevent_fractional/fast/events/selectstart-by-single-click-with-shift.html [ Failure Pass ] crbug.com/591099 virtual/mouseevent_fractional/fast/events/sequential-focus-navigation-starting-point.html [ Failure ] crbug.com/591099 virtual/mouseevent_fractional/fast/events/touch/compositor-touch-hit-rects-scroll.html [ Failure ] crbug.com/591099 virtual/mouseevent_fractional/fast/events/touch/compositor-touch-hit-rects.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index 21c89cdc..b03e7b9 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -247,6 +247,10 @@ ### external/wpt/css/css-tables/ crbug.com/598134 external/wpt/css/css-tables/table-has-box-sizing-border-box-002.html [ Failure ] +crbug.com/708345 external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-001.html [ Failure ] +crbug.com/708345 external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-003.html [ Failure ] +crbug.com/708345 external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-004.html [ Failure ] +crbug.com/708345 external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-005.html [ Failure ] # ====== Layout team owned tests to here ====== @@ -624,6 +628,7 @@ crbug.com/626703 virtual/outofblink-cors/external/wpt/fetch/http-cache/status.html [ Pass Timeout ] crbug.com/736308 virtual/outofblink-cors/external/wpt/service-workers/service-worker/foreign-fetch-basics.https.html [ Timeout ] crbug.com/736308 virtual/outofblink-cors/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https.html [ Timeout ] +crbug.com/736308 virtual/outofblink-cors/external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https.html [ Timeout ] # Failing tests in dictionary order. crbug.com/736308 virtual/outofblink-cors/external/wpt/service-workers/service-worker/fetch-canvas-tainting-image-cache.https.html [ Failure ] @@ -899,26 +904,6 @@ crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-154.html [ Failure ] crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-216.html [ Failure ] crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-224.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-250.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-251.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-252.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-253.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-254.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-255.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-256.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-257.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-258.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-259.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-260.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-261.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-262.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-263.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-264.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-265.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-266.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-267.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-268.html [ Failure ] -crbug.com/817778 external/wpt/css/css-text/i18n/css3-text-line-break-opclns-269.html [ Failure ] crbug.com/817776 external/wpt/css/css-text/line-break/line-break-normal-025.xht [ Failure ] crbug.com/666657 external/wpt/css/css-text-decor/text-emphasis-color-001.xht [ Failure ] @@ -1388,12 +1373,11 @@ crbug.com/501659 http/tests/security/xss-DENIED-xml-external-entity.xhtml [ Failure ] crbug.com/501659 fast/css/stylesheet-candidate-nodes-crash.xhtml [ Failure ] -crbug.com/545140 [ Mac10.10 Mac10.11 Retina Mac10.12 ] fast/encoding/denormalised-voiced-japanese-chars.html [ Failure ] +crbug.com/545140 [ Mac ] fast/encoding/denormalised-voiced-japanese-chars.html [ Failure ] crbug.com/621772 fast/forms/color/color-suggestion-picker-with-scrollbar-appearance.html [ Pass Failure ] crbug.com/652995 fast/forms/text/input-text-scroll-left-on-blur.html [ Pass Failure ] -crbug.com/595483 [ Android ] editing/caret/caret-color.html [ Failure Crash ] crbug.com/595483 [ Android ] fast/invalid/009.html [ Failure Crash ] crbug.com/595483 [ Android ] fast/hidpi/clip-text-in-hidpi.html [ Failure Crash ] @@ -1700,6 +1684,8 @@ crbug.com/805463 external/wpt/acid/acid3/numbered-tests.html [ Skip ] # ====== New tests from wpt-importer added here ====== +crbug.com/626703 external/wpt/payment-request/change-shipping-option-select-last-manual.https.html [ Skip ] +crbug.com/626703 [ Mac10.13 ] external/wpt/css/css-text/word-break/word-break-break-all-004.html [ Failure ] crbug.com/626703 [ Android ] external/wpt/bluetooth/requestDevice/canonicalizeFilter/no-arguments.https.html [ Crash ] crbug.com/626703 external/wpt/css/css-text/line-break/line-break-strict-018b.xht [ Failure ] crbug.com/626703 external/wpt/css/css-text/line-break/line-break-strict-018a.xht [ Failure ] @@ -3258,6 +3244,9 @@ crbug.com/802915 css3/blending/isolation-should-include-non-local-background.html [ Failure ] +crbug.com/807838 external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https.html [ Crash Pass ] +crbug.com/807838 virtual/navigation-mojo-response/external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https.html [ Crash Pass ] + # Sheriff faulures 2017-12-12 crbug.com/794180 http/tests/devtools/layers/layer-compositing-reasons.js [ Failure Pass ] @@ -3353,17 +3342,6 @@ crbug.com/807110 external/wpt/media-source/mediasource-sequencemode-append-buffer.html [ Failure Pass ] crbug.com/807110 external/wpt/media-source/mediasource-sourcebuffer-mode-timestamps.html [ Failure Pass ] -################################################################################ -# Root Layer Scrolling expectations - -crbug.com/417782 paint/invalidation/window-resize/window-resize-vertical-writing-mode.html [ Crash ] -crbug.com/417782 virtual/disable-spv175/paint/invalidation/window-resize/window-resize-vertical-writing-mode.html [ Skip ] - -# End of Root Layer Scrolling expectations -################################################################################ - -crbug.com/813468 [ Mac ] virtual/navigation-mojo-response/http/tests/serviceworker/chromium/memory-cache.html [ Failure Pass ] - crbug.com/794338 media/video-rotation.html [ Skip ] crbug.com/811605 media/video-poster-after-loadedmetadata.html [ Failure Pass ] @@ -3375,8 +3353,6 @@ crbug.com/813704 [ Win7 Mac ] http/tests/images/png-partial-load-as-document.html [ Failure Pass ] -crbug.com/815050 [ Mac ] http/tests/serviceworker/chromium/memory-cache.html [ Failure Pass ] - crbug.com/806645 [ Win7 ] http/tests/devtools/elements/elements-panel-rewrite-href.js [ Failure Pass ] crbug.com/813216 [ Win7 ] http/tests/devtools/elements/styles-3/style-rule-from-imported-stylesheet.js [ Failure Pass ] @@ -3415,3 +3391,26 @@ crbug.com/818107 [ Android ] presentation/presentationconnectionavailableevent-ctor-mock.html [ Failure Crash ] crbug.com/818076 http/tests/devtools/oopif/oopif-elements-navigate-in.js [ Failure Pass ] crbug.com/818154 [ Linux Debug ] virtual/gpu-rasterization/images/gif-loop-count.html [ Failure Pass ] + +# Picture-in-Picture tests require PictureInPicture and UseSurfaceLayerForVideo features enabled. +crbug.com/806249 external/wpt/picture-in-picture/picture-in-picture-window.html [ Skip ] +crbug.com/806249 external/wpt/picture-in-picture/picture-in-picture-element.html [ Skip ] +crbug.com/806249 external/wpt/picture-in-picture/disable-picture-in-picture.html [ Skip ] +crbug.com/806249 external/wpt/picture-in-picture/shadow-dom.html [ Skip ] +crbug.com/806249 external/wpt/picture-in-picture/request-picture-in-picture.html [ Skip ] +crbug.com/806249 external/wpt/picture-in-picture/leave-picture-in-picture.html [ Skip ] +crbug.com/806249 external/wpt/picture-in-picture/enter-picture-in-picture.html [ Skip ] +crbug.com/806249 external/wpt/picture-in-picture/exit-picture-in-picture.html [ Skip ] +crbug.com/806249 external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html [ Skip ] +crbug.com/806249 external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy-attribute.https.sub.html [ Skip ] +crbug.com/806249 external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy.https.sub.html [ Skip ] +crbug.com/806249 external/wpt/feature-policy/picture-in-picture-default-feature-policy.https.sub.html [ Skip ] +crbug.com/806249 media/picture-in-picture/controls/picture-in-picture-button.html [ Skip ] +crbug.com/806249 media/picture-in-picture/picture-in-picture-enabled.html [ Skip ] +crbug.com/806249 virtual/picture-in-picture/external/wpt/feature-policy/autoplay-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html [ Skip ] +crbug.com/806249 virtual/picture-in-picture/external/wpt/feature-policy/autoplay-default-feature-policy.https.sub.html [ Skip ] +crbug.com/806249 virtual/picture-in-picture/external/wpt/feature-policy/autoplay-disabled-by-feature-policy.https.sub.html [ Skip ] +crbug.com/806249 virtual/unified-autoplay/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html [ Skip ] +crbug.com/806249 virtual/unified-autoplay/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy-attribute.https.sub.html [ Skip ] +crbug.com/806249 virtual/unified-autoplay/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy.https.sub.html [ Skip ] +crbug.com/806249 virtual/unified-autoplay/external/wpt/feature-policy/picture-in-picture-default-feature-policy.https.sub.html [ Skip ] \ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/VirtualTestSuites b/third_party/WebKit/LayoutTests/VirtualTestSuites index c73bfa7..78a6e36 100644 --- a/third_party/WebKit/LayoutTests/VirtualTestSuites +++ b/third_party/WebKit/LayoutTests/VirtualTestSuites
@@ -596,5 +596,20 @@ "prefix": "enable-webauthn", "base": "http/tests/credentialmanager/", "args": ["--enable-features=WebAuthentication"] + }, + { + "prefix": "picture-in-picture", + "base": "external/wpt/picture-in-picture", + "args": ["--enable-features=PictureInPicture,UseSurfaceLayerForVideo"] + }, + { + "prefix": "picture-in-picture", + "base": "external/wpt/feature-policy", + "args": ["--enable-features=PictureInPicture,UseSurfaceLayerForVideo"] + }, + { + "prefix": "picture-in-picture", + "base": "media/picture-in-picture", + "args": ["--enable-features=PictureInPicture,UseSurfaceLayerForVideo"] } ]
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/siblings-with-border-radius-ancestor-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/siblings-with-border-radius-ancestor-expected.png deleted file mode 100644 index ff3a0270..0000000 --- a/third_party/WebKit/LayoutTests/compositing/overflow/siblings-with-border-radius-ancestor-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json index 34ec369..4214f0258 100644 --- a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json +++ b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
@@ -3217,6 +3217,12 @@ {} ] ], + "css/selectors/focus-visible-001-manual.html": [ + [ + "/css/selectors/focus-visible-001-manual.html", + {} + ] + ], "css/selectors/hover-001-manual.html": [ [ "/css/selectors/hover-001-manual.html", @@ -4669,6 +4675,12 @@ {} ] ], + "payment-request/change-shipping-option-select-last-manual.https.html": [ + [ + "/payment-request/change-shipping-option-select-last-manual.https.html", + {} + ] + ], "payment-request/payment-response/complete-method-manual.https.html": [ [ "/payment-request/payment-response/complete-method-manual.https.html", @@ -49093,6 +49105,42 @@ {} ] ], + "css/css-tables/height-distribution/extra-height-given-to-all-row-groups-001.html": [ + [ + "/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-001.html", + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "css/css-tables/height-distribution/extra-height-given-to-all-row-groups-002.html": [ + [ + "/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-002.html", + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "css/css-tables/height-distribution/extra-height-given-to-all-row-groups-005.html": [ + [ + "/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-005.html", + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "css/css-tables/internal-containing-block-001.html": [ [ "/css/css-tables/internal-containing-block-001.html", @@ -122648,6 +122696,31 @@ {} ] ], + "css/css-text/white-space/seg-break-transformation-001-expected.txt": [ + [ + {} + ] + ], + "css/css-text/white-space/seg-break-transformation-002-expected.txt": [ + [ + {} + ] + ], + "css/css-text/white-space/seg-break-transformation-003-expected.txt": [ + [ + {} + ] + ], + "css/css-text/white-space/seg-break-transformation-008-expected.txt": [ + [ + {} + ] + ], + "css/css-text/white-space/seg-break-transformation-009-expected.txt": [ + [ + {} + ] + ], "css/css-text/word-break/reference/word-break-break-all-009-ref.xht": [ [ {} @@ -135143,6 +135216,16 @@ {} ] ], + "encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt": [ + [ + {} + ] + ], + "encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt": [ + [ + {} + ] + ], "encrypted-media/polyfill/cast-polyfill.js": [ [ {} @@ -150068,6 +150151,11 @@ {} ] ], + "infrastructure/assumptions/html-elements-expected.txt": [ + [ + {} + ] + ], "infrastructure/assumptions/initial-color-ref.html": [ [ {} @@ -150278,6 +150366,11 @@ {} ] ], + "interfaces/selection-api.idl": [ + [ + {} + ] + ], "interfaces/touchevents.idl": [ [ {} @@ -152053,6 +152146,16 @@ {} ] ], + "payment-handler/payment-instruments.https-expected.txt": [ + [ + {} + ] + ], + "payment-handler/payment-request-event.https-expected.txt": [ + [ + {} + ] + ], "payment-handler/register-and-activate-service-worker.js": [ [ {} @@ -152083,6 +152186,11 @@ {} ] ], + "payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt": [ + [ + {} + ] + ], "payment-request/allowpaymentrequest/common.sub.js": [ [ {} @@ -152248,7 +152356,7 @@ {} ] ], - "preload/link-header-preload-srcset.html.headers": [ + "preload/link-header-preload-srcset.tentative.html.headers": [ [ {} ] @@ -180798,6 +180906,18 @@ {} ] ], + "css/css-tables/height-distribution/extra-height-given-to-all-row-groups-003.html": [ + [ + "/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-003.html", + {} + ] + ], + "css/css-tables/height-distribution/extra-height-given-to-all-row-groups-004.html": [ + [ + "/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-004.html", + {} + ] + ], "css/css-tables/height-distribution/percentage-sizing-of-table-cell-children.html": [ [ "/css/css-tables/height-distribution/percentage-sizing-of-table-cell-children.html", @@ -215206,9 +215326,9 @@ {} ] ], - "preload/link-header-preload-srcset.html": [ + "preload/link-header-preload-srcset.tentative.html": [ [ - "/preload/link-header-preload-srcset.html", + "/preload/link-header-preload-srcset.tentative.html", {} ] ], @@ -289261,6 +289381,26 @@ "6b5dfdf5cddd682c347f7c8670459e3ad4e19ffe", "testharness" ], + "css/css-tables/height-distribution/extra-height-given-to-all-row-groups-001.html": [ + "0be96a3030ece25682ed695f3973e472c7753b26", + "reftest" + ], + "css/css-tables/height-distribution/extra-height-given-to-all-row-groups-002.html": [ + "3260b1ab45a802872d3831a01d50bc704dac6884", + "reftest" + ], + "css/css-tables/height-distribution/extra-height-given-to-all-row-groups-003.html": [ + "49cfbc7190e689dee7481034eb9a0cff192a7a53", + "testharness" + ], + "css/css-tables/height-distribution/extra-height-given-to-all-row-groups-004.html": [ + "b7c8a0bd61582531a622c020cdc0e39a04c18338", + "testharness" + ], + "css/css-tables/height-distribution/extra-height-given-to-all-row-groups-005.html": [ + "1d62418c7d244062887ab4237b254ce92121a32c", + "reftest" + ], "css/css-tables/height-distribution/percentage-sizing-of-table-cell-children.html": [ "55a759d84f38e6adf0f091c9c0ecaa69060cb51a", "testharness" @@ -295625,14 +295765,26 @@ "d1a3f3675a6dcf939b085989f4bc4c5b1c91bf20", "testharness" ], + "css/css-text/white-space/seg-break-transformation-001-expected.txt": [ + "e9aef94e209334fc752f771c7ea894e4bc0481bb", + "support" + ], "css/css-text/white-space/seg-break-transformation-001.html": [ "92c34f19a49c45964e8948a739aaba0b30d40767", "testharness" ], + "css/css-text/white-space/seg-break-transformation-002-expected.txt": [ + "0b848caa626b065c0a7bbc111c23a75531e90b41", + "support" + ], "css/css-text/white-space/seg-break-transformation-002.html": [ "0c41fa96834f7aaa27983164f26cb55d2d2e836a", "testharness" ], + "css/css-text/white-space/seg-break-transformation-003-expected.txt": [ + "d2e42a5e47dc1624241235c257596ae67d1b4313", + "support" + ], "css/css-text/white-space/seg-break-transformation-003.html": [ "e34e1ee7cdd22b533cfaa0f37df8a86021552bf0", "testharness" @@ -295653,10 +295805,18 @@ "98c47581bd8d2fdb4ee3fac4807d726cc902790f", "testharness" ], + "css/css-text/white-space/seg-break-transformation-008-expected.txt": [ + "dfa6d4dae632fa96c83833d29a5200196ac0f353", + "support" + ], "css/css-text/white-space/seg-break-transformation-008.html": [ "d580c1d0d588334b1d0617a7943c1b7c5cd3e36e", "testharness" ], + "css/css-text/white-space/seg-break-transformation-009-expected.txt": [ + "c0c105c48d6655fd49c46d90593a92d81d014fae", + "support" + ], "css/css-text/white-space/seg-break-transformation-009.html": [ "cbc23ecde69c29c7550af5484fc0354ac4aa80ac", "testharness" @@ -314465,6 +314625,10 @@ "b56479be3f0c6cdf9e59f54d197526e6d66c9b54", "testharness" ], + "css/selectors/focus-visible-001-manual.html": [ + "ba97353214ebd26847347a2cbb6dd726144b6a31", + "manual" + ], "css/selectors/focus-within-001-ref.html": [ "cd36270f1a34ea74b10b761cb153a7eb85b221bc", "support" @@ -321793,6 +321957,14 @@ "15a0b2950e25edcbff1b5b2e3d5807cb91d9e531", "testharness" ], + "encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt": [ + "68f9c155aba10ffc2e93ad5cf2e0f8cf2421b885", + "support" + ], + "encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt": [ + "99148318a9bf2777a568aa8559e913832b1b3fe5", + "support" + ], "encrypted-media/drm-mp4-playback-temporary-playduration-keystatus.html": [ "c5e7048bbfa4ce3d8f4cbb09a7b492532642b9e3", "testharness" @@ -344317,6 +344489,10 @@ "2f1a763d3e15a27a9220b1f084847f33092003d0", "reftest" ], + "infrastructure/assumptions/html-elements-expected.txt": [ + "8cd865cfe72e094c3892d29b2f73a31c2699369c", + "support" + ], "infrastructure/assumptions/html-elements.html": [ "9585f8fff4f585b8b4f31ea485f9d0195173772d", "testharness" @@ -344462,7 +344638,7 @@ "support" ], "interfaces/console.idl": [ - "14a90aae85ba0822b3dc7113a42cded55395765b", + "43ced34008dc73d05c79140d8dc33c60e2d9df3a", "support" ], "interfaces/css-typed-om.idl": [ @@ -344549,6 +344725,10 @@ "b280c2a72795d4abd55a361a0afd8adce70562dc", "support" ], + "interfaces/selection-api.idl": [ + "f9f483a150b0e918f653f6ce4e84eb9c044d921f", + "support" + ], "interfaces/touchevents.idl": [ "6ce4f601cda6cd3b99a300e0b28d2886647f06d3", "support" @@ -353833,10 +354013,18 @@ "b2c68838b3d5df98f17ccfd1bf65c4de6579ae65", "support" ], + "payment-handler/payment-instruments.https-expected.txt": [ + "0615649e764ffa42c8684cc27938df80844c71c9", + "support" + ], "payment-handler/payment-instruments.https.html": [ "14a67dbd2670c661d61ac8dc61c950e572369279", "testharness" ], + "payment-handler/payment-request-event.https-expected.txt": [ + "5ccf0e310f13dbc0300198d5b328ad86b0976966", + "support" + ], "payment-handler/payment-request-event.https.html": [ "f9556317297607b5e5f649343ae6f365a4df9552", "testharness" @@ -353877,6 +354065,10 @@ "e1aefd7497d3d5005df88d034fbde4e6b26823d6", "manual" ], + "payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt": [ + "e3a4754d784a88b66c2438bc5d626a954ab2d0b8", + "support" + ], "payment-request/PaymentCurrencyAmount/currencySystem-member.https.html": [ "7bfce9810c1afdc53a99fa0036c472f6cfbe5deb", "testharness" @@ -353969,6 +354161,10 @@ "9285ebf2cd716ea072c18fe668e95cf6ce4ec3de", "manual" ], + "payment-request/change-shipping-option-select-last-manual.https.html": [ + "644f9b275f175c6297f4bd0e93f8039b7d202257", + "manual" + ], "payment-request/historical.https-expected.txt": [ "a98767fbf7d24f102e1546aafe4ed6276c2e79eb", "support" @@ -354669,11 +354865,11 @@ "5cecc11ba51e0f6a7dcff46dd0c0c1a3fa8e3fc7", "support" ], - "preload/link-header-preload-srcset.html": [ + "preload/link-header-preload-srcset.tentative.html": [ "634a3b35d707560961cf7b0f41ed9a9f7e47d6b8", "testharness" ], - "preload/link-header-preload-srcset.html.headers": [ + "preload/link-header-preload-srcset.tentative.html.headers": [ "abd350bd4e82ddcc621bed94e975f4283d7df034", "support" ], @@ -363270,11 +363466,11 @@ "testharness" ], "selection/interfaces-expected.txt": [ - "4610698c744b6dcb05c79b7d5b943af78b19a703", + "3a228ece24f5df5e9421d35f981ac3fc0e96b3a8", "support" ], "selection/interfaces.html": [ - "1fb2684472fc29c5460b709908b6f0c4f779f1c1", + "78e92642e2562da8040c791e4c3a7ad1de53e600", "testharness" ], "selection/isCollapsed.html": [ @@ -367130,11 +367326,11 @@ "testharness" ], "streams/piping/error-propagation-forward-expected.txt": [ - "134e1c6fce18b8704d2e3c071af854172df5339d", + "9139e9c63e671c4208980e222cbc89613cabab09", "support" ], "streams/piping/error-propagation-forward.dedicatedworker-expected.txt": [ - "134e1c6fce18b8704d2e3c071af854172df5339d", + "9139e9c63e671c4208980e222cbc89613cabab09", "support" ], "streams/piping/error-propagation-forward.dedicatedworker.html": [ @@ -367150,7 +367346,7 @@ "support" ], "streams/piping/error-propagation-forward.serviceworker.https-expected.txt": [ - "08440ef6c64646b737918a62962f173566bbb34b", + "df94d5e5a66f6c3890cad0391f5512282192b4c7", "support" ], "streams/piping/error-propagation-forward.serviceworker.https.html": [ @@ -367158,7 +367354,7 @@ "testharness" ], "streams/piping/error-propagation-forward.sharedworker-expected.txt": [ - "134e1c6fce18b8704d2e3c071af854172df5339d", + "9139e9c63e671c4208980e222cbc89613cabab09", "support" ], "streams/piping/error-propagation-forward.sharedworker.html": [
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-001.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-001.html new file mode 100644 index 0000000..81698a19 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-001.html
@@ -0,0 +1,42 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="author" title="David Grogan" href="dgrogan@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-tables-3/#height-distribution-algorithm"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<link rel="bookmark" href="https://bugs.chromium.org/p/chromium/issues/detail?id=708345" /> +<meta name="flags" content="" /> +<meta name="assert" content="height of rows in thead are increased to match table height" /> +<title> +all row groups receive extra height distribution +</title> + +<style> +table { + background: green; + border-collapse:collapse; +} + +td { + padding:0px; +} + +#redSquare { + height: 100px; + width: 100px; + background-color: red; + position: absolute; + z-index: -1; +} +</style> + +<p>Test passes if there is a filled green square and <strong>no red</strong>. +</p> +<div id="redSquare"></div> +<table style="height:100px"> + <thead> + <tr> + <td><div style="display:inline-block; width:100px;"> + </div></td> + </tr> + </thead> +</table>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-002.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-002.html new file mode 100644 index 0000000..0bf8a894 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-002.html
@@ -0,0 +1,42 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="author" title="David Grogan" href="dgrogan@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-tables-3/#height-distribution-algorithm"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<link rel="bookmark" href="https://bugs.chromium.org/p/chromium/issues/detail?id=708345" /> +<meta name="flags" content="" /> +<meta name="assert" content="height of rows in tbody are increased to match table height" /> +<title> +all row groups receive extra height distribution +</title> + +<style> +table { + background: green; + border-collapse:collapse; +} + +td { + padding:0px; +} + +#redSquare { + height: 100px; + width: 100px; + background-color: red; + position: absolute; + z-index: -1; +} +</style> + +<p>Test passes if there is a filled green square and <strong>no red</strong>. +</p> +<div id="redSquare"></div> +<table style="height:100px"> + <tbody> + <tr> + <td><div style="display:inline-block; width:100px;"> + </div></td> + </tr> + </tbody> +</table>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-003.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-003.html new file mode 100644 index 0000000..285017b --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-003.html
@@ -0,0 +1,50 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<link rel="author" title="David Grogan" href="dgrogan@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-tables-3/#height-distribution-algorithm"> +<link rel="bookmark" href="https://bugs.chromium.org/p/chromium/issues/detail?id=708345" /> +<meta name="flags" content="" /> +<meta name="assert" content="All rows of equal intrinsic height should be increased the same amount, regardless of which group they are in, tbody+tbody case" /> +<title> +all row groups receive extra height distribution +</title> + +<style> +table { + border-collapse: collapse; +} + +td { + padding: 0px; +} + +td div { + width: 100px; + height:10px; +} + +tbody { + outline: 2px solid lightblue; +} + +</style> + +<table id="theTable" style="height:100px"> + <tbody data-expected-height=50> + <tr> + <td><div></div></td> + </tr> + </tbody> + <tbody data-expected-height=50> + <tr> + <td><div></div></td> + </tr> + </tbody> +</table> + +<script> +checkLayout('#theTable') +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-004.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-004.html new file mode 100644 index 0000000..0fcd48e --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-004.html
@@ -0,0 +1,50 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<link rel="author" title="David Grogan" href="dgrogan@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-tables-3/#height-distribution-algorithm"> +<link rel="bookmark" href="https://bugs.chromium.org/p/chromium/issues/detail?id=708345" /> +<meta name="flags" content="" /> +<meta name="assert" content="All rows of equal intrinsic height should be increased the same amount, regardless of which group they are in, thead+tbody case" /> +<title> +all row groups receive extra height distribution +</title> + +<style> +table { + border-collapse: collapse; +} + +td { + padding: 0px; +} + +td div { + width: 100px; + height:10px; +} + +thead, tbody { + outline: 2px solid lightblue; +} + +</style> + +<table id="theTable" style="height:100px"> + <thead data-expected-height=50> + <tr> + <td><div></div></td> + </tr> + </thead> + <tbody data-expected-height=50> + <tr> + <td><div></div></td> + </tr> + </tbody> +</table> + +<script> +checkLayout('#theTable') +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-005.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-005.html new file mode 100644 index 0000000..8d0411b0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-005.html
@@ -0,0 +1,42 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="author" title="David Grogan" href="dgrogan@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-tables-3/#height-distribution-algorithm"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<link rel="bookmark" href="https://bugs.chromium.org/p/chromium/issues/detail?id=708345" /> +<meta name="flags" content="" /> +<meta name="assert" content="height of rows in tfoot are increased to match table height" /> +<title> +all row groups receive extra height distribution +</title> + +<style> +table { + background: green; + border-collapse:collapse; +} + +td { + padding:0px; +} + +#redSquare { + height: 100px; + width: 100px; + background-color: red; + position: absolute; + z-index: -1; +} +</style> + +<p>Test passes if there is a filled green square and <strong>no red</strong>. +</p> +<div id="redSquare"></div> +<table style="height:100px"> + <tfoot> + <tr> + <td><div style="display:inline-block; width:100px;"> + </div></td> + </tr> + </tfoot> +</table>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-250.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-250.html deleted file mode 100644 index fe70b71..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-250.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 3041 HIRAGANA LETTER SMALL A</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-250-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 3041 HIRAGANA LETTER SMALL A (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>かかかぁな</div> - - - - - -<div class='ref'>かか<br />かぁな</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-251.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-251.html deleted file mode 100644 index 1e41acc..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-251.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 3043 HIRAGANA LETTER SMALL I</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-251-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 3043 HIRAGANA LETTER SMALL I (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>かかかぃな</div> - - - - - -<div class='ref'>かか<br />かぃな</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-252.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-252.html deleted file mode 100644 index 55d60aba..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-252.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 3045 HIRAGANA LETTER SMALL U</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-252-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 3045 HIRAGANA LETTER SMALL U (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>かかかぅな</div> - - - - - -<div class='ref'>かか<br />かぅな</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-253.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-253.html deleted file mode 100644 index 4a5acbb..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-253.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 3047 HIRAGANA LETTER SMALL E</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-253-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 3047 HIRAGANA LETTER SMALL E (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>かかかぇな</div> - - - - - -<div class='ref'>かか<br />かぇな</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-254.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-254.html deleted file mode 100644 index 005f8f9..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-254.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 3049 HIRAGANA LETTER SMALL O</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-254-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 3049 HIRAGANA LETTER SMALL O (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>かかかぉな</div> - - - - - -<div class='ref'>かか<br />かぉな</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-255.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-255.html deleted file mode 100644 index f147aad0..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-255.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 3063 HIRAGANA LETTER SMALL TU</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-255-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 3063 HIRAGANA LETTER SMALL TU (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>かかかっな</div> - - - - - -<div class='ref'>かか<br />かっな</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-256.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-256.html deleted file mode 100644 index 38afaeb..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-256.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 3083 HIRAGANA LETTER SMALL YA</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-256-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 3083 HIRAGANA LETTER SMALL YA (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>かかかゃな</div> - - - - - -<div class='ref'>かか<br />かゃな</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-257.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-257.html deleted file mode 100644 index cd6f95f..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-257.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 3085 HIRAGANA LETTER SMALL YU</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-257-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 3085 HIRAGANA LETTER SMALL YU (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>かかかゅな</div> - - - - - -<div class='ref'>かか<br />かゅな</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-258.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-258.html deleted file mode 100644 index 431f4b9..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-258.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 3087 HIRAGANA LETTER SMALL YO </title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-258-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 3087 HIRAGANA LETTER SMALL YO (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>かかかょな</div> - - - - - -<div class='ref'>かか<br />かょな</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-259.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-259.html deleted file mode 100644 index 8bb2bd3..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-259.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 308E HIRAGANA LETTER SMALL WA </title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-259-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 308E HIRAGANA LETTER SMALL WA (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>かかかゎな</div> - - - - - -<div class='ref'>かか<br />かゎな</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-260.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-260.html deleted file mode 100644 index 95b3e25..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-260.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 30A1 KATAKANA LETTER SMALL A</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-260-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 30A1 KATAKANA LETTER SMALL A (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> - - - -<div class='test'>カカカァナ</div> - - - - - -<div class='ref'>カカ<br />カァナ</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-261.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-261.html deleted file mode 100644 index 2336b927..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-261.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 30A3 KATAKANA LETTER SMALL I</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-261-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 30A3 KATAKANA LETTER SMALL I (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> - - - -<div class='test'>カカカィナ</div> - - - - - -<div class='ref'>カカ<br />カィナ</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-262.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-262.html deleted file mode 100644 index 1928589..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-262.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 30A5 KATAKANA LETTER SMALL U</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-262-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 30A5 KATAKANA LETTER SMALL U (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> - - - -<div class='test'>カカカゥナ</div> - - - - - -<div class='ref'>カカ<br />カゥナ</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-263.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-263.html deleted file mode 100644 index 59cf0b8..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-263.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 30A7 KATAKANA LETTER SMALL E</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-263-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 30A7 KATAKANA LETTER SMALL E (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> - - - -<div class='test'>カカカェナ</div> - - - - - -<div class='ref'>カカ<br />カェナ</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-264.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-264.html deleted file mode 100644 index 3bee434..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-264.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 30A9 KATAKANA LETTER SMALL O</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-264-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 30A9 KATAKANA LETTER SMALL O (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> - - - -<div class='test'>カカカォナ</div> - - - - - -<div class='ref'>カカ<br />カォナ</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-265.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-265.html deleted file mode 100644 index 8accd9e8..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-265.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 30C3 KATAKANA LETTER SMALL TU</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-265-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 30C3 KATAKANA LETTER SMALL TU (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> - - - -<div class='test'>カカカッナ</div> - - - - - -<div class='ref'>カカ<br />カッナ</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-266.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-266.html deleted file mode 100644 index a84f9c1..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-266.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 30E3 KATAKANA LETTER SMALL YA</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-266-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 30E3 KATAKANA LETTER SMALL YA (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> - - - -<div class='test'>カカカャナ</div> - - - - - -<div class='ref'>カカ<br />カャナ</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-267.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-267.html deleted file mode 100644 index 3aa2848d..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-267.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 30E5 KATAKANA LETTER SMALL YU</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-267-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 30E5 KATAKANA LETTER SMALL YU (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> - - - -<div class='test'>カカカュナ</div> - - - - - -<div class='ref'>カカ<br />カュナ</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-268.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-268.html deleted file mode 100644 index c9632a3..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-268.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 30E7 KATAKANA LETTER SMALL YO</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-268-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 30E7 KATAKANA LETTER SMALL YO (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> - - - -<div class='test'>カカカョナ</div> - - - - - -<div class='ref'>カカ<br />カョナ</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-269.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-269.html deleted file mode 100644 index 6bb5d1f6..0000000 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-text/i18n/css3-text-line-break-opclns-269.html +++ /dev/null
@@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 30EE KATAKANA LETTER SMALL WA</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-269-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="The browser will not allow the small kana character 30EE KATAKANA LETTER SMALL WA (which has the NS Non-Starter property) at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('support/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> - - - -<div class='test'>カカカヮナ</div> - - - - - -<div class='ref'>カカ<br />カヮナ</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/css/css-text/white-space/seg-break-transformation-008-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/css-text/white-space/seg-break-transformation-008-expected.txt similarity index 100% rename from third_party/WebKit/LayoutTests/platform/win/external/wpt/css/css-text/white-space/seg-break-transformation-008-expected.txt rename to third_party/WebKit/LayoutTests/external/wpt/css/css-text/white-space/seg-break-transformation-008-expected.txt
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt similarity index 100% rename from third_party/WebKit/LayoutTests/platform/win/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt rename to third_party/WebKit/LayoutTests/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt similarity index 100% rename from third_party/WebKit/LayoutTests/platform/win/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt rename to third_party/WebKit/LayoutTests/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/basic/integrity-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/basic/integrity-expected.txt new file mode 100644 index 0000000..c91ba4a7 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/basic/integrity-expected.txt
@@ -0,0 +1,18 @@ +This is a testharness.js-based test. +PASS Empty string integrity +PASS SHA-256 integrity +PASS SHA-384 integrity +PASS SHA-512 integrity +PASS Invalid integrity +PASS Multiple integrities: valid stronger than invalid +PASS Multiple integrities: invalid stronger than valid +PASS Multiple integrities: invalid as strong as valid +PASS Multiple integrities: both are valid +PASS Multiple integrities: both are invalid +PASS CORS empty integrity +PASS CORS SHA-512 integrity +PASS CORS invalid integrity +PASS Empty string integrity for opaque response +FAIL SHA-* integrity for opaque response assert_unreached: Should have rejected: undefined Reached unreachable code +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/basic/integrity-sharedworker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/basic/integrity-sharedworker-expected.txt new file mode 100644 index 0000000..c91ba4a7 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/basic/integrity-sharedworker-expected.txt
@@ -0,0 +1,18 @@ +This is a testharness.js-based test. +PASS Empty string integrity +PASS SHA-256 integrity +PASS SHA-384 integrity +PASS SHA-512 integrity +PASS Invalid integrity +PASS Multiple integrities: valid stronger than invalid +PASS Multiple integrities: invalid stronger than valid +PASS Multiple integrities: invalid as strong as valid +PASS Multiple integrities: both are valid +PASS Multiple integrities: both are invalid +PASS CORS empty integrity +PASS CORS SHA-512 integrity +PASS CORS invalid integrity +PASS Empty string integrity for opaque response +FAIL SHA-* integrity for opaque response assert_unreached: Should have rejected: undefined Reached unreachable code +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/basic/integrity-worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/basic/integrity-worker-expected.txt new file mode 100644 index 0000000..c91ba4a7 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/basic/integrity-worker-expected.txt
@@ -0,0 +1,18 @@ +This is a testharness.js-based test. +PASS Empty string integrity +PASS SHA-256 integrity +PASS SHA-384 integrity +PASS SHA-512 integrity +PASS Invalid integrity +PASS Multiple integrities: valid stronger than invalid +PASS Multiple integrities: invalid stronger than valid +PASS Multiple integrities: invalid as strong as valid +PASS Multiple integrities: both are valid +PASS Multiple integrities: both are invalid +PASS CORS empty integrity +PASS CORS SHA-512 integrity +PASS CORS invalid integrity +PASS Empty string integrity for opaque response +FAIL SHA-* integrity for opaque response assert_unreached: Should have rejected: undefined Reached unreachable code +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/basic/integrity.js b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/basic/integrity.js index 0a3c298..fb3f252 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/basic/integrity.js +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/basic/integrity.js
@@ -27,17 +27,17 @@ } } -var topSha256 = "sha256-KHIDZcXnR2oBHk9DrAA+5fFiR6JjudYjqoXtMR1zvzk="; -var topSha384 = "sha384-MgZYnnAzPM/MjhqfOIMfQK5qcFvGZsGLzx4Phd7/A8fHTqqLqXqKo8cNzY3xEPTL"; -var topSha512 = "sha512-D6yns0qxG0E7+TwkevZ4Jt5t7Iy3ugmAajG/dlf6Pado1JqTyneKXICDiqFIkLMRExgtvg8PlxbKTkYfRejSOg=="; -var invalidSha256 = "sha256-dKUcPOn/AlUjWIwcHeHNqYXPlvyGiq+2dWOdFcE+24I="; -var invalidSha512 = "sha512-oUceBRNxPxnY60g/VtPCj2syT4wo4EZh2CgYdWy9veW8+OsReTXoh7dizMGZafvx9+QhMS39L/gIkxnPIn41Zg=="; +const topSha256 = "sha256-KHIDZcXnR2oBHk9DrAA+5fFiR6JjudYjqoXtMR1zvzk="; +const topSha384 = "sha384-MgZYnnAzPM/MjhqfOIMfQK5qcFvGZsGLzx4Phd7/A8fHTqqLqXqKo8cNzY3xEPTL"; +const topSha512 = "sha512-D6yns0qxG0E7+TwkevZ4Jt5t7Iy3ugmAajG/dlf6Pado1JqTyneKXICDiqFIkLMRExgtvg8PlxbKTkYfRejSOg=="; +const invalidSha256 = "sha256-dKUcPOn/AlUjWIwcHeHNqYXPlvyGiq+2dWOdFcE+24I="; +const invalidSha512 = "sha512-oUceBRNxPxnY60g/VtPCj2syT4wo4EZh2CgYdWy9veW8+OsReTXoh7dizMGZafvx9+QhMS39L/gIkxnPIn41Zg=="; -var url = "../resources/top.txt"; -var corsUrl = "http://{{host}}:{{ports[http][1]}}" + dirname(location.pathname) + RESOURCES_DIR + "top.txt"; -/* Enable CORS*/ -corsUrl += "?pipe=header(Access-Control-Allow-Origin,*)"; -var corsUrl2 = "https://{{host}}:{{ports[https][0]}}/fetch/api/resource/top.txt"; +const path = dirname(location.pathname) + RESOURCES_DIR + "top.txt"; +const url = path; +const corsUrl = + `http://{{host}}:{{ports[http][1]}}${path}?pipe=header(Access-Control-Allow-Origin,*)`; +const corsUrl2 = `https://{{host}}:{{ports[https][0]}}${path}` integrity("Empty string integrity", url, "", /* initRequestMode */ undefined, /* shouldPass */ true);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/interfaces/console.idl b/third_party/WebKit/LayoutTests/external/wpt/interfaces/console.idl index 7f5da77..7351bfc 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/interfaces/console.idl +++ b/third_party/WebKit/LayoutTests/external/wpt/interfaces/console.idl
@@ -1,5 +1,6 @@ [Exposed=(Window,Worker,Worklet)] -namespace console { +namespace console { // but see namespace object requirements below + // Logging void assert(optional boolean condition = false, any... data); void clear(); void count(optional DOMString label = "default"); @@ -13,10 +14,12 @@ void dir(any item, optional object? options); void dirxml(any... data); + // Grouping void group(any... data); void groupCollapsed(any... data); void groupEnd(); + // Timing void time(optional DOMString label = "default"); void timeEnd(optional DOMString label = "default"); };
diff --git a/third_party/WebKit/LayoutTests/external/wpt/interfaces/selection-api.idl b/third_party/WebKit/LayoutTests/external/wpt/interfaces/selection-api.idl new file mode 100644 index 0000000..27efc2a --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/interfaces/selection-api.idl
@@ -0,0 +1,43 @@ +// http://w3c.github.io/selection-api/#selection-interface +interface Selection { + readonly attribute Node? anchorNode; + readonly attribute unsigned long anchorOffset; + readonly attribute Node? focusNode; + readonly attribute unsigned long focusOffset; + readonly attribute boolean isCollapsed; + readonly attribute unsigned long rangeCount; + readonly attribute DOMString type; + Range getRangeAt(unsigned long index); + void addRange(Range range); + void removeRange(Range range); + void removeAllRanges(); + void empty(); + void collapse(Node? node, optional unsigned long offset = 0); + void setPosition(Node? node, optional unsigned long offset = 0); + void collapseToStart(); + void collapseToEnd(); + void extend(Node node, optional unsigned long offset = 0); + void setBaseAndExtent(Node anchorNode, + unsigned long anchorOffset, + Node focusNode, + unsigned long focusOffset); + void selectAllChildren(Node node); + [CEReactions] + void deleteFromDocument(); + boolean containsNode(Node node, + optional boolean allowPartialContainment = false); + stringifier DOMString (); +}; + +partial interface Document { + Selection? getSelection(); +}; + +partial interface Window { + Selection? getSelection(); +}; + +partial interface GlobalEventHandlers { + attribute EventHandler onselectstart; + attribute EventHandler onselectionchange; +};
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt similarity index 100% rename from third_party/WebKit/LayoutTests/platform/win/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt rename to third_party/WebKit/LayoutTests/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt
diff --git a/third_party/WebKit/LayoutTests/external/wpt/payment-request/change-shipping-option-select-last-manual.https.html b/third_party/WebKit/LayoutTests/external/wpt/payment-request/change-shipping-option-select-last-manual.https.html new file mode 100644 index 0000000..c8e23aa --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/payment-request/change-shipping-option-select-last-manual.https.html
@@ -0,0 +1,92 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Test for PaymentDetailsBase's shippingOptions member</title> +<link rel="help" href="https://w3c.github.io/payment-request/#dom-paymentdetailsbase-shippingoptions"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +setup({ explicit_done: true, explicit_timeout: true }); +const validMethods = Object.freeze([ + { supportedMethods: "basic-card" }, + { supportedMethods: "https://apple.com/pay" }, +]); +const validAmount = Object.freeze({ currency: "USD", value: "5.00" }); +const validTotal = Object.freeze({ + label: "label", + amount: validAmount, +}); +const validDetails = Object.freeze({ total: validTotal }); + +const validShippingOption1 = Object.freeze({ + id: "fail-if-selected-1", + label: "FAIL if selected 1", + amount: validAmount, + selected: true, +}); + +const validShippingOption2 = Object.freeze({ + id: "fail-if-selected-2", + label: "FAIL if selected 2", + amount: validAmount, + selected: false, +}); + +const validShippingOption3 = Object.freeze({ + id: "pass-if-selected", + label: "THIS MUST BE AUTOMATICALLY SELECTED", + amount: validAmount, + selected: true, +}); + +function testShippingOptionChanged(button) { + button.disabled = true; + promise_test(async t => { + const detailsWithShippingOptions = { + ...validDetails, + shippingOptions: [ + validShippingOption1, + validShippingOption2, + validShippingOption3, + ], + }; + const request = new PaymentRequest( + validMethods, + detailsWithShippingOptions, + { requestShipping: true } + ); + assert_equals( + request.shippingOption, + "pass-if-selected", + "Must be 'pass-if-selected', as the selected member is true" + ); + request.onshippingoptionchange = () => { + assert_unreached("onshippingoptionchange fired unexpectedly"); + }; + const response = await request.show(); + assert_equals(response.shippingOption, "pass-if-selected"); + response.complete(); + }, button.textContent.trim()); + done(); +} +</script> + +<h2>PaymentRequest shippingOption attribute</h2> +<p> + Click on each button in sequence from top to bottom without refreshing the page. + Each button will bring up the Payment Request UI window. +</p> +<p> + When the payment sheet is presented, hit pay. +</p> +<ol> + <li> + <button onclick="testShippingOptionChanged(this)"> + When default shipping option is pre-selected, must not fire onshippingoptionchange + and PaymentResponse must reflect the pre-selected option. + </button> + </li> +</ol> +<small> + If you find a buggy test, please <a href="https://github.com/w3c/web-platform-tests/issues">file a bug</a> + and tag one of the <a href="https://github.com/w3c/web-platform-tests/blob/master/payment-request/OWNERS">owners</a>. +</small>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/preload/link-header-preload-srcset.html b/third_party/WebKit/LayoutTests/external/wpt/preload/link-header-preload-srcset.tentative.html similarity index 100% rename from third_party/WebKit/LayoutTests/external/wpt/preload/link-header-preload-srcset.html rename to third_party/WebKit/LayoutTests/external/wpt/preload/link-header-preload-srcset.tentative.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/preload/link-header-preload-srcset.html.headers b/third_party/WebKit/LayoutTests/external/wpt/preload/link-header-preload-srcset.tentative.html.headers similarity index 100% rename from third_party/WebKit/LayoutTests/external/wpt/preload/link-header-preload-srcset.html.headers rename to third_party/WebKit/LayoutTests/external/wpt/preload/link-header-preload-srcset.tentative.html.headers
diff --git a/third_party/WebKit/LayoutTests/external/wpt/selection/interfaces-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/selection/interfaces-expected.txt index f2473ff..db256ea 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/selection/interfaces-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/selection/interfaces-expected.txt
@@ -1,4 +1,107 @@ This is a testharness.js-based test. -FAIL Test driver promise_test: Unhandled rejection with value: "SVGElement implements ElementCSSInlineStyle, but SVGElement is undefined." +Found 103 tests; 99 PASS, 4 FAIL, 0 TIMEOUT, 0 NOTRUN. +PASS Test driver +PASS Document interface: operation getSelection() +PASS Unscopable handled correctly for getSelection() on Document +PASS Document interface: attribute onselectstart +PASS Unscopable handled correctly for onselectstart property on Document +PASS Document interface: attribute onselectionchange +PASS Unscopable handled correctly for onselectionchange property on Document +FAIL HTMLElement interface: attribute onselectstart assert_own_property: expected property "onselectstart" missing +PASS Unscopable handled correctly for onselectstart property on HTMLElement +FAIL HTMLElement interface: attribute onselectionchange assert_true: The prototype object must have a property "onselectionchange" expected true got false +PASS Unscopable handled correctly for onselectionchange property on HTMLElement +PASS Window interface: operation getSelection() +PASS Unscopable handled correctly for getSelection() on Window +FAIL Window interface: attribute onselectstart assert_own_property: The global object must have a property "onselectstart" expected property "onselectstart" missing +PASS Unscopable handled correctly for onselectstart property on Window +FAIL Window interface: attribute onselectionchange assert_own_property: The global object must have a property "onselectionchange" expected property "onselectionchange" missing +PASS Unscopable handled correctly for onselectionchange property on Window +PASS WorkerGlobalScope interface: existence and properties of interface object +PASS DedicatedWorkerGlobalScope interface: existence and properties of interface object +PASS SharedWorkerGlobalScope interface: existence and properties of interface object +PASS WorkerNavigator interface: existence and properties of interface object +PASS WorkerLocation interface: existence and properties of interface object +PASS Selection interface: existence and properties of interface object +PASS Selection interface object length +PASS Selection interface object name +PASS Selection interface: existence and properties of interface prototype object +PASS Selection interface: existence and properties of interface prototype object's "constructor" property +PASS Selection interface: existence and properties of interface prototype object's @@unscopables property +PASS Selection interface: attribute anchorNode +PASS Unscopable handled correctly for anchorNode property on Selection +PASS Selection interface: attribute anchorOffset +PASS Unscopable handled correctly for anchorOffset property on Selection +PASS Selection interface: attribute focusNode +PASS Unscopable handled correctly for focusNode property on Selection +PASS Selection interface: attribute focusOffset +PASS Unscopable handled correctly for focusOffset property on Selection +PASS Selection interface: attribute isCollapsed +PASS Unscopable handled correctly for isCollapsed property on Selection +PASS Selection interface: attribute rangeCount +PASS Unscopable handled correctly for rangeCount property on Selection +PASS Selection interface: attribute type +PASS Unscopable handled correctly for type property on Selection +PASS Selection interface: operation getRangeAt(unsigned long) +PASS Unscopable handled correctly for getRangeAt(unsigned long) on Selection +PASS Selection interface: operation addRange(Range) +PASS Unscopable handled correctly for addRange(Range) on Selection +PASS Selection interface: operation removeRange(Range) +PASS Unscopable handled correctly for removeRange(Range) on Selection +PASS Selection interface: operation removeAllRanges() +PASS Unscopable handled correctly for removeAllRanges() on Selection +PASS Selection interface: operation empty() +PASS Unscopable handled correctly for empty() on Selection +PASS Selection interface: operation collapse(Node, unsigned long) +PASS Unscopable handled correctly for collapse(Node, unsigned long) on Selection +PASS Selection interface: operation setPosition(Node, unsigned long) +PASS Unscopable handled correctly for setPosition(Node, unsigned long) on Selection +PASS Selection interface: operation collapseToStart() +PASS Unscopable handled correctly for collapseToStart() on Selection +PASS Selection interface: operation collapseToEnd() +PASS Unscopable handled correctly for collapseToEnd() on Selection +PASS Selection interface: operation extend(Node, unsigned long) +PASS Unscopable handled correctly for extend(Node, unsigned long) on Selection +PASS Selection interface: operation setBaseAndExtent(Node, unsigned long, Node, unsigned long) +PASS Unscopable handled correctly for setBaseAndExtent(Node, unsigned long, Node, unsigned long) on Selection +PASS Selection interface: operation selectAllChildren(Node) +PASS Unscopable handled correctly for selectAllChildren(Node) on Selection +PASS Selection interface: operation deleteFromDocument() +PASS Unscopable handled correctly for deleteFromDocument() on Selection +PASS Selection interface: operation containsNode(Node, boolean) +PASS Unscopable handled correctly for containsNode(Node, boolean) on Selection +PASS Selection interface: stringifier +PASS Selection must be primary interface of getSelection() +PASS Stringification of getSelection() +PASS Selection interface: getSelection() must inherit property "anchorNode" with the proper type +PASS Selection interface: getSelection() must inherit property "anchorOffset" with the proper type +PASS Selection interface: getSelection() must inherit property "focusNode" with the proper type +PASS Selection interface: getSelection() must inherit property "focusOffset" with the proper type +PASS Selection interface: getSelection() must inherit property "isCollapsed" with the proper type +PASS Selection interface: getSelection() must inherit property "rangeCount" with the proper type +PASS Selection interface: getSelection() must inherit property "type" with the proper type +PASS Selection interface: getSelection() must inherit property "getRangeAt(unsigned long)" with the proper type +PASS Selection interface: calling getRangeAt(unsigned long) on getSelection() with too few arguments must throw TypeError +PASS Selection interface: getSelection() must inherit property "addRange(Range)" with the proper type +PASS Selection interface: calling addRange(Range) on getSelection() with too few arguments must throw TypeError +PASS Selection interface: getSelection() must inherit property "removeRange(Range)" with the proper type +PASS Selection interface: calling removeRange(Range) on getSelection() with too few arguments must throw TypeError +PASS Selection interface: getSelection() must inherit property "removeAllRanges()" with the proper type +PASS Selection interface: getSelection() must inherit property "empty()" with the proper type +PASS Selection interface: getSelection() must inherit property "collapse(Node, unsigned long)" with the proper type +PASS Selection interface: calling collapse(Node, unsigned long) on getSelection() with too few arguments must throw TypeError +PASS Selection interface: getSelection() must inherit property "setPosition(Node, unsigned long)" with the proper type +PASS Selection interface: calling setPosition(Node, unsigned long) on getSelection() with too few arguments must throw TypeError +PASS Selection interface: getSelection() must inherit property "collapseToStart()" with the proper type +PASS Selection interface: getSelection() must inherit property "collapseToEnd()" with the proper type +PASS Selection interface: getSelection() must inherit property "extend(Node, unsigned long)" with the proper type +PASS Selection interface: calling extend(Node, unsigned long) on getSelection() with too few arguments must throw TypeError +PASS Selection interface: getSelection() must inherit property "setBaseAndExtent(Node, unsigned long, Node, unsigned long)" with the proper type +PASS Selection interface: calling setBaseAndExtent(Node, unsigned long, Node, unsigned long) on getSelection() with too few arguments must throw TypeError +PASS Selection interface: getSelection() must inherit property "selectAllChildren(Node)" with the proper type +PASS Selection interface: calling selectAllChildren(Node) on getSelection() with too few arguments must throw TypeError +PASS Selection interface: getSelection() must inherit property "deleteFromDocument()" with the proper type +PASS Selection interface: getSelection() must inherit property "containsNode(Node, boolean)" with the proper type +PASS Selection interface: calling containsNode(Node, boolean) on getSelection() with too few arguments must throw TypeError Harness: the test ran to completion.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/selection/interfaces.html b/third_party/WebKit/LayoutTests/external/wpt/selection/interfaces.html index 21b3f3e..6b72f28 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/selection/interfaces.html +++ b/third_party/WebKit/LayoutTests/external/wpt/selection/interfaces.html
@@ -5,58 +5,14 @@ <script src=/resources/testharnessreport.js></script> <script src=/resources/WebIDLParser.js></script> <script src=/resources/idlharness.js></script> -<script type=text/plain> -// http://w3c.github.io/selection-api/#selection-interface -interface Selection { - readonly attribute Node? anchorNode; - readonly attribute unsigned long anchorOffset; - readonly attribute Node? focusNode; - readonly attribute unsigned long focusOffset; - readonly attribute boolean isCollapsed; - readonly attribute unsigned long rangeCount; - readonly attribute DOMString type; - Range getRangeAt(unsigned long index); - void addRange(Range range); - void removeRange(Range range); - void removeAllRanges(); - void empty(); - void collapse(Node? node, optional unsigned long offset = 0); - void setPosition(Node? node, optional unsigned long offset = 0); - void collapseToStart(); - void collapseToEnd(); - void extend(Node node, optional unsigned long offset = 0); - void setBaseAndExtent(Node anchorNode, - unsigned long anchorOffset, - Node focusNode, - unsigned long focusOffset); - void selectAllChildren(Node node); - [CEReactions] - void deleteFromDocument(); - boolean containsNode(Node node, - optional boolean allowPartialContainment = false); - stringifier DOMString (); -}; - -partial interface Document { - Selection? getSelection(); -}; - -partial interface Window { - Selection? getSelection(); -}; - -partial interface GlobalEventHandlers { - attribute EventHandler onselectstart; - attribute EventHandler onselectionchange; -}; -</script> <script> "use strict"; -function doTest([dom, cssom, touchevents, uievents, html]) { +function doTest([selection, dom, cssom, touchevents, uievents, html]) { var idlArray = new IdlArray(); + idlArray.add_untested_idls('interface SVGElement {};'); idlArray.add_untested_idls(dom + cssom + touchevents + uievents + html); - idlArray.add_idls(document.querySelector("script[type=text\\/plain]").textContent); + idlArray.add_idls(selection); idlArray.add_objects({Selection: ['getSelection()']}); idlArray.test(); } @@ -66,7 +22,8 @@ } promise_test(function() { - return Promise.all([fetchData("/interfaces/dom.idl"), + return Promise.all([fetchData("/interfaces/selection-api.idl"), + fetchData("/interfaces/dom.idl"), fetchData("/interfaces/cssom.idl"), fetchData("/interfaces/touchevents.idl"), fetchData("/interfaces/uievents.idl"),
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/sandboxed-iframe-fetch-event-iframe.py b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/sandboxed-iframe-fetch-event-iframe.py index 4d84839..8b2244bf 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/sandboxed-iframe-fetch-event-iframe.py +++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/sandboxed-iframe-fetch-event-iframe.py
@@ -7,6 +7,9 @@ body = f.read() return (header, body) + if 'sandbox' in request.GET: + header.append(('Content-Security-Policy', + 'sandbox %s' % request.GET['sandbox'])) with open(os.path.join(os.path.dirname(__file__), 'sandboxed-iframe-fetch-event-iframe.html'), 'r') as f: body = f.read()
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https-expected.txt new file mode 100644 index 0000000..8e2f0cd --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https-expected.txt
@@ -0,0 +1,32 @@ +This is a testharness.js-based test. +PASS Prepare a service worker. +PASS Prepare a normal iframe. +PASS Prepare an iframe sandboxed by <iframe sandbox="allow-scripts">. +PASS Prepare an iframe sandboxed by <iframe sandbox="allow-scripts allow-same-origin">. +FAIL Prepare an iframe sandboxed by CSP HTTP header with allow-scripts. assert_false: Service worker should NOT control the sandboxed page expected false got true +PASS Prepare an iframe sandboxed by CSP HTTP header with allow-scripts and allow-same-origin. +PASS Fetch request from a normal iframe +PASS Fetch request from a worker in a normal iframe +PASS Request for an iframe in the normal iframe +PASS Request for an sandboxed iframe with allow-scripts flag in the normal iframe +PASS Request for an sandboxed iframe with allow-scripts and allow-same-origin flag in the normal iframe +PASS Fetch request from iframe sandboxed by an attribute with allow-scripts flag +PASS Fetch request from a worker in iframe sandboxed by an attribute with allow-scripts flag +PASS Request for an iframe in the iframe sandboxed by an attribute with allow-scripts flag +PASS Request for an sandboxed iframe with allow-scripts flag in the iframe sandboxed by an attribute with allow-scripts flag +PASS Request for an sandboxed iframe with allow-scripts and allow-same-origin flag in the iframe sandboxed by an attribute with allow-scripts flag +PASS Fetch request from iframe sandboxed by an attribute with allow-scripts and allow-same-origin flag +PASS Fetch request from a worker in iframe sandboxed by an attribute with allow-scripts and allow-same-origin flag +PASS Request for an iframe in the iframe sandboxed by an attribute with allow-scripts and allow-same-origin flag +PASS Request for an sandboxed iframe with allow-scripts flag in the iframe sandboxed by attribute with allow-scripts and allow-same-origin flag +PASS Request for an sandboxed iframe with allow-scripts and allow-same-origin flag in the iframe sandboxed by attribute with allow-scripts and allow-same-origin flag +FAIL Fetch request from iframe sandboxed by CSP HTTP header with allow-scripts flag assert_equals: The request should NOT be handled by SW. expected 0 but got 1 +PASS Request for an iframe in the iframe sandboxed by CSP HTTP header with allow-scripts flag +PASS Request for an sandboxed iframe with allow-scripts flag in the iframe sandboxed by CSP HTTP header with allow-scripts flag +PASS Request for an sandboxed iframe with allow-scripts and allow-same-origin flag in the iframe sandboxed by CSP HTTP header with allow-scripts flag +PASS Fetch request from iframe sandboxed by CSP HTTP header with allow-scripts and allow-same-origin flag +PASS Request for an iframe in the iframe sandboxed by CSP HTTP header with allow-scripts and allow-same-origin flag +PASS Request for an sandboxed iframe with allow-scripts flag in the iframe sandboxed by CSP HTTP header with allow-scripts and allow-same-origin flag +PASS Request for an sandboxed iframe with allow-scripts and allow-same-origin flag in the iframe sandboxed by CSP HTTP header with allow-scripts and allow-same-origin flag +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https.html index db012c2..e08b7164 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/sandboxed-iframe-fetch-event.https.html
@@ -52,6 +52,14 @@ // An iframe created by <iframe sandbox='allow-scripts allow-same-origin'>. // This should be controlled by a service worker. let sandboxed_same_origin_frame; +// An iframe whose response header has +// 'Content-Security-Policy: allow-scripts'. +// This should NOT be controlled by a service worker. +let sandboxed_frame_by_header; +// An iframe whose response header has +// 'Content-Security-Policy: allow-scripts allow-same-origin'. +// This should be controlled by a service worker. +let sandboxed_same_origin_frame_by_header; promise_test(t => { return service_worker_unregister_and_register(t, SCRIPT, SCOPE) @@ -111,6 +119,44 @@ '<iframe sandbox="allow-scripts allow-same-origin">.'); promise_test(t => { + const iframe_full_url = expected_base_url + '?sandbox=allow-scripts&' + + 'sandboxed-frame-by-header'; + return with_iframe(iframe_full_url) + .then(f => { + sandboxed_frame_by_header = f; + add_completion_callback(() => f.remove()); + return getResultsFromWorker(worker); + }) + .then(data => { + let requests = data.requests; + assert_equals(requests.length, 1, + 'Service worker should provide the response'); + assert_equals(requests[0], iframe_full_url); + assert_false(data.clients.includes(iframe_full_url), + 'Service worker should NOT control the sandboxed page'); + }); +}, 'Prepare an iframe sandboxed by CSP HTTP header with allow-scripts.'); + +promise_test(t => { + const iframe_full_url = + expected_base_url + '?sandbox=allow-scripts%20allow-same-origin&' + + 'sandboxed-iframe-same-origin-by-header'; + return with_iframe(iframe_full_url) + .then(f => { + sandboxed_same_origin_frame_by_header = f; + add_completion_callback(() => f.remove()); + return getResultsFromWorker(worker); + }) + .then(data => { + let requests = data.requests; + assert_equals(requests.length, 1); + assert_equals(requests[0], iframe_full_url); + assert_true(data.clients.includes(iframe_full_url)); + }) +}, 'Prepare an iframe sandboxed by CSP HTTP header with allow-scripts and ' + + 'allow-same-origin.'); + +promise_test(t => { let frame = normal_frame; return doTest(frame, 'fetch') .then(result => { @@ -353,5 +399,137 @@ }, 'Request for an sandboxed iframe with allow-scripts and ' + 'allow-same-origin flag in the iframe sandboxed by attribute with ' + 'allow-scripts and allow-same-origin flag'); + +promise_test(t => { + let frame = sandboxed_frame_by_header; + return doTest(frame, 'fetch') + .then(result => { + assert_equals(result, 'done'); + return getResultsFromWorker(worker); + }) + .then(data => { + assert_equals(data.requests.length, 0, + 'The request should NOT be handled by SW.'); + }); +}, 'Fetch request from iframe sandboxed by CSP HTTP header with ' + + 'allow-scripts flag'); + +promise_test(t => { + let frame = sandboxed_frame_by_header; + return doTest(frame, 'iframe') + .then(result => { + assert_equals(result, 'done'); + return getResultsFromWorker(worker); + }) + .then(data => { + assert_equals(data.requests.length, 0, + 'The request should NOT be handled by SW.'); + assert_false(data.clients.includes(frame.src + '&test=iframe')); + }); +}, 'Request for an iframe in the iframe sandboxed by CSP HTTP header with ' + + 'allow-scripts flag'); + +promise_test(t => { + let frame = sandboxed_frame_by_header; + return doTest(frame, 'sandboxed-iframe') + .then(result => { + assert_equals(result, 'done'); + return getResultsFromWorker(worker); + }) + .then(data => { + assert_equals(data.requests.length, 0, + 'The request should NOT be handled by SW.'); + assert_false(data.clients.includes( + frame.src + '&test=sandboxed-iframe')); + }); +}, 'Request for an sandboxed iframe with allow-scripts flag in the iframe ' + + 'sandboxed by CSP HTTP header with allow-scripts flag'); + +promise_test(t => { + let frame = sandboxed_frame_by_header; + return doTest(frame, 'sandboxed-iframe-same-origin') + .then(result => { + assert_equals(result, 'done'); + return getResultsFromWorker(worker); + }) + .then(data => { + assert_equals(data.requests.length, 0, + 'The request should NOT be handled by SW.'); + assert_false(data.clients.includes( + frame.src + '&test=sandboxed-iframe-same-origin')); + }); +}, 'Request for an sandboxed iframe with allow-scripts and ' + + 'allow-same-origin flag in the iframe sandboxed by CSP HTTP header with ' + + 'allow-scripts flag'); + +promise_test(t => { + let frame = sandboxed_same_origin_frame_by_header; + return doTest(frame, 'fetch') + .then(result => { + assert_equals(result, 'done'); + return getResultsFromWorker(worker); + }) + .then(data => { + let requests = data.requests; + assert_equals(requests.length, 1, + 'The request should be handled by SW.'); + assert_equals(requests[0], frame.src + '&test=fetch'); + }); +}, 'Fetch request from iframe sandboxed by CSP HTTP header with ' + + 'allow-scripts and allow-same-origin flag'); + +promise_test(t => { + let frame = sandboxed_same_origin_frame_by_header; + return doTest(frame, 'iframe') + .then(result => { + assert_equals(result, 'done'); + return getResultsFromWorker(worker); + }) + .then(data => { + let requests = data.requests; + assert_equals(requests.length, 1, + 'The request should be handled by SW.'); + assert_equals(requests[0], frame.src + '&test=iframe'); + assert_true(data.clients.includes(frame.src + '&test=iframe')); + }); +}, 'Request for an iframe in the iframe sandboxed by CSP HTTP header with ' + + 'allow-scripts and allow-same-origin flag'); + +promise_test(t => { + let frame = sandboxed_same_origin_frame_by_header; + return doTest(frame, 'sandboxed-iframe') + .then(result => { + assert_equals(result, 'done'); + return getResultsFromWorker(worker); + }) + .then(data => { + assert_equals(data.requests.length, 0, + 'The request should NOT be handled by SW.'); + assert_false( + data.clients.includes(frame.src + '&test=sandboxed-iframe')); + }); +}, 'Request for an sandboxed iframe with allow-scripts flag in the ' + + 'iframe sandboxed by CSP HTTP header with allow-scripts and ' + + 'allow-same-origin flag'); + +promise_test(t => { + let frame = sandboxed_same_origin_frame_by_header; + return doTest(frame, 'sandboxed-iframe-same-origin') + .then(result => { + assert_equals(result, 'done'); + return getResultsFromWorker(worker); + }) + .then(data => { + let requests = data.requests; + assert_equals(requests.length, 1, + 'The request should be handled by SW.'); + assert_equals(requests[0], + frame.src + '&test=sandboxed-iframe-same-origin'); + assert_true(data.clients.includes( + frame.src + '&test=sandboxed-iframe-same-origin')); + }); +}, 'Request for an sandboxed iframe with allow-scripts and ' + + 'allow-same-origin flag in the iframe sandboxed by CSP HTTP header with ' + + 'allow-scripts and allow-same-origin flag'); </script> </body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https-expected.txt new file mode 100644 index 0000000..b2dc1e1 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https-expected.txt
@@ -0,0 +1,8 @@ +This is a testharness.js-based test. +PASS Prepare a service worker. +FAIL Prepare an iframe sandboxed by CSP HTTP header with allow-scripts. assert_false: Service worker should NOT control the sandboxed page expected false got true +PASS Prepare an iframe sandboxed by CSP HTTP header with allow-scripts and allow-same-origin. +FAIL Fetch request from a worker in iframe sandboxed by CSP HTTP header allow-scripts flag assert_equals: The request should NOT be handled by SW. expected 0 but got 1 +PASS Fetch request from a worker in iframe sandboxed by CSP HTTP header with allow-scripts and allow-same-origin flag +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https.html new file mode 100644 index 0000000..c8480bf1b --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https.html
@@ -0,0 +1,132 @@ +<!DOCTYPE html> +<title>ServiceWorker FetchEvent issued from workers in an iframe sandboxed via CSP HTTP response header.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/test-helpers.sub.js"></script> +<body> +<script> +let lastCallbackId = 0; +let callbacks = {}; +function doTest(frame, type) { + return new Promise(function(resolve) { + var id = ++lastCallbackId; + callbacks[id] = resolve; + frame.contentWindow.postMessage({id: id, type: type}, '*'); + }); +} + +// Asks the service worker for data about requests and clients seen. The +// worker posts a message back with |data| where: +// |data.requests|: the requests the worker received FetchEvents for +// |data.clients|: the URLs of all the worker's clients +// The worker clears its data after responding. +function getResultsFromWorker(worker) { + return new Promise(resolve => { + let channel = new MessageChannel(); + channel.port1.onmessage = msg => { + resolve(msg.data); + }; + worker.postMessage({port: channel.port2}, [channel.port2]); + }); +} + +window.onmessage = function (e) { + message = e.data; + let id = message['id']; + let callback = callbacks[id]; + delete callbacks[id]; + callback(message['result']); +}; + +const SCOPE = 'resources/sandboxed-iframe-fetch-event-iframe.py'; +const SCRIPT = 'resources/sandboxed-iframe-fetch-event-worker.js'; +const expected_base_url = new URL(SCOPE, location.href); +// A service worker controlling |SCOPE|. +let worker; +// An iframe whose response header has +// 'Content-Security-Policy: allow-scripts'. +// This should NOT be controlled by a service worker. +let sandboxed_frame_by_header; +// An iframe whose response header has +// 'Content-Security-Policy: allow-scripts allow-same-origin'. +// This should be controlled by a service worker. +let sandboxed_same_origin_frame_by_header; + +promise_test(t => { + return service_worker_unregister_and_register(t, SCRIPT, SCOPE) + .then(function(registration) { + add_completion_callback(() => registration.unregister()); + worker = registration.installing; + return wait_for_state(t, registration.installing, 'activated'); + }); +}, 'Prepare a service worker.'); + +promise_test(t => { + const iframe_full_url = expected_base_url + '?sandbox=allow-scripts&' + + 'sandboxed-frame-by-header'; + return with_iframe(iframe_full_url) + .then(f => { + sandboxed_frame_by_header = f; + add_completion_callback(() => f.remove()); + return getResultsFromWorker(worker); + }) + .then(data => { + let requests = data.requests; + assert_equals(requests.length, 1, + 'Service worker should provide the response'); + assert_equals(requests[0], iframe_full_url); + assert_false(data.clients.includes(iframe_full_url), + 'Service worker should NOT control the sandboxed page'); + }); +}, 'Prepare an iframe sandboxed by CSP HTTP header with allow-scripts.'); + +promise_test(t => { + const iframe_full_url = + expected_base_url + '?sandbox=allow-scripts%20allow-same-origin&' + + 'sandboxed-iframe-same-origin-by-header'; + return with_iframe(iframe_full_url) + .then(f => { + sandboxed_same_origin_frame_by_header = f; + add_completion_callback(() => f.remove()); + return getResultsFromWorker(worker); + }) + .then(data => { + let requests = data.requests; + assert_equals(requests.length, 1); + assert_equals(requests[0], iframe_full_url); + assert_true(data.clients.includes(iframe_full_url)); + }) +}, 'Prepare an iframe sandboxed by CSP HTTP header with allow-scripts and ' + + 'allow-same-origin.'); + +promise_test(t => { + let frame = sandboxed_frame_by_header; + return doTest(frame, 'fetch-from-worker') + .then(result => { + assert_equals(result, 'done'); + return getResultsFromWorker(worker); + }) + .then(data => { + assert_equals(data.requests.length, 0, + 'The request should NOT be handled by SW.'); + }); +}, 'Fetch request from a worker in iframe sandboxed by CSP HTTP header ' + + 'allow-scripts flag'); + +promise_test(t => { + let frame = sandboxed_same_origin_frame_by_header; + return doTest(frame, 'fetch-from-worker') + .then(result => { + assert_equals(result, 'done'); + return getResultsFromWorker(worker); + }) + .then(data => { + let requests = data.requests; + assert_equals(requests.length, 1, + 'The request should be handled by SW.'); + assert_equals(requests[0], frame.src + '&test=fetch-from-worker'); + }); +}, 'Fetch request from a worker in iframe sandboxed by CSP HTTP header ' + + 'with allow-scripts and allow-same-origin flag'); +</script> +</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.serviceworker.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.serviceworker.https-expected.txt index 89691969..fc9298c 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.serviceworker.https-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.serviceworker.https-expected.txt
@@ -29,6 +29,8 @@ PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true PASS Errors must be propagated forward: shutdown must not occur until the final write completes -FAIL Errors must be propagated forward: abort should not happen until all queued writes complete assert_array_equals: abort should not be called before the second write completes property 2, expected "write" but got "abort" +FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true assert_equals: the pipe must not be complete expected false but got true +FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write assert_array_equals: the second chunk must have been written, but abort must not have happened yet property 2, expected "write" but got "abort" +FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true assert_false: the pipe should not complete while the second write is pending expected false got true Harness: the test ran to completion.
diff --git a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed01-expected.png b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed01-expected.png index 8786afe..41663be 100644 --- a/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed01-expected.png +++ b/third_party/WebKit/LayoutTests/fast/borders/borderRadiusDashed01-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-arc-circumference-expected.png b/third_party/WebKit/LayoutTests/fast/canvas/canvas-arc-circumference-expected.png index 949c0252c..d9c70447 100644 --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-arc-circumference-expected.png +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-arc-circumference-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/writing-mode/flipped-block-with-local-background-expected.html b/third_party/WebKit/LayoutTests/fast/writing-mode/flipped-block-with-local-background-expected.html new file mode 100644 index 0000000..bf8bf82 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/writing-mode/flipped-block-with-local-background-expected.html
@@ -0,0 +1,2 @@ +<!DOCTYPE html> +<div style="width:100px; height:100px; background:green;"></div>
diff --git a/third_party/WebKit/LayoutTests/fast/writing-mode/flipped-block-with-local-background.html b/third_party/WebKit/LayoutTests/fast/writing-mode/flipped-block-with-local-background.html new file mode 100644 index 0000000..79d41ef --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/writing-mode/flipped-block-with-local-background.html
@@ -0,0 +1,22 @@ +<!DOCTYPE html> +<style> +::-webkit-scrollbar { + display: none; +} + +#scroller { + position: relative; + z-index: 0; + width: 100px; + height: 100px; + overflow: scroll; + writing-mode: vertical-rl; + background: green; +} +</style> +<div id="scroller"> + <div style="width:200px"></div> +</div> +<script> + document.getElementById('scroller').scrollLeft = 0; +</script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/memory-cache.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/memory-cache.html index e5aabe5d..6354d62 100644 --- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/memory-cache.html +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/memory-cache.html
@@ -1,5 +1,7 @@ <!DOCTYPE html> <html> +<!-- This test should not be upstreamed to WPT because it tests the + Blink-specific memory cache and uses internals API to do that. --> <title>Service Worker: Memory Cache</title> <script src="../../resources/testharness.js"></script> <script src="../../resources/testharnessreport.js"></script> @@ -11,64 +13,60 @@ var sc = document.createElement('script'); sc.src = url; document.body.appendChild(sc); - return new Promise(function(resolve) { + return new Promise(resolve => { // This callback function is called by appending a script element. callback = function(data) { resolve(data); } }); } -async_test(function(t) { +promise_test(t => { var scope = 'resources/memory-cache-controlled.html'; var worker = 'resources/memory-cache-worker.js'; var json_url = '/serviceworker/chromium/resources/memory-cache.jsonp'; var registration; var frame; - var promises = []; - service_worker_unregister_and_register(t, worker, scope) - .then(function(r) { + return service_worker_unregister_and_register(t, worker, scope) + .then(r => { registration = r; return wait_for_state(t, r.installing, 'activated'); }) - .then(function() { return with_iframe(scope); }) - .then(function(f) { + .then(() => { return with_iframe(scope); }) + .then(f => { frame = f; // Request a json file from controlled page. assert_false( frame.contentWindow.internals.isLoadingFromMemoryCache(json_url), 'Cache for controlled page should be empty'); - promises.push(frame.contentWindow.getJSONP(json_url)); + return frame.contentWindow.getJSONP(json_url); + }) + .then(result => { + assert_equals( + result.src, + 'service worker', + 'Response for controlled page should be served by Service Worker'); + assert_true( + frame.contentWindow.internals.isLoadingFromMemoryCache(json_url), + 'Response for controlled page should be cached'); // Request a json file from non-controlled page. assert_false( internals.isLoadingFromMemoryCache(json_url), 'Cache for non-controlled page should be empty'); - promises.push(getJSONP(json_url)); - - return Promise.all(promises); + return getJSONP(json_url); }) - .then(function(results) { + .then(result => { assert_equals( - results[0].src, - 'service worker', - 'Response for controlled page should be served by Service Worker'); - assert_equals( - results[1].src, + result.src, 'network', 'Response for non-controlled page should be served by network'); assert_true( - frame.contentWindow.internals.isLoadingFromMemoryCache(json_url), - 'Response for controlled page should be cached'); - assert_true( internals.isLoadingFromMemoryCache(json_url), 'Response for non-controlled page should be cached'); + frame.remove(); return registration.unregister(); - }) - .then(function() { - t.done(); - }) - .catch(unreached_rejection(t)); + }); }, 'Non-controlled page should not use a cache filled by Service Worker'); </script>
diff --git a/third_party/WebKit/LayoutTests/media/picture-in-picture-enabled.html b/third_party/WebKit/LayoutTests/media/picture-in-picture-enabled.html deleted file mode 100644 index e8fa3a0..0000000 --- a/third_party/WebKit/LayoutTests/media/picture-in-picture-enabled.html +++ /dev/null
@@ -1,19 +0,0 @@ -<!DOCTYPE html> -<title>Test Picture-in-Picture disabled by system</title> -<script src="../resources/testharness.js"></script> -<script src="../resources/testharnessreport.js"></script> -<script src="../resources/testdriver.js"></script> -<script src="../resources/testdriver-vendor.js"></script> -<script src="../external/wpt/picture-in-picture/resources/picture-in-picture-helpers.js"></script> -<body></body> -<script> -promise_test(t => { - assert_true(document.pictureInPictureEnabled); - - window.internals.settings.setPictureInPictureEnabled(false); - assert_false(document.pictureInPictureEnabled); - - return promise_rejects(t, 'NotSupportedError', - requestPictureInPictureWithTrustedClick(document.createElement('video'))); -}); -</script>
diff --git a/third_party/WebKit/LayoutTests/media/controls/picture-in-picture-button.html b/third_party/WebKit/LayoutTests/media/picture-in-picture/controls/picture-in-picture-button.html similarity index 81% rename from third_party/WebKit/LayoutTests/media/controls/picture-in-picture-button.html rename to third_party/WebKit/LayoutTests/media/picture-in-picture/controls/picture-in-picture-button.html index bc494e1..e722e98 100644 --- a/third_party/WebKit/LayoutTests/media/controls/picture-in-picture-button.html +++ b/third_party/WebKit/LayoutTests/media/picture-in-picture/controls/picture-in-picture-button.html
@@ -1,17 +1,15 @@ <!DOCTYPE html> <title>media controls picture in picture button</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="../media-file.js"></script> -<script src="../media-controls.js"></script> +<script src="../../../resources/testharness.js"></script> +<script src="../../../resources/testharnessreport.js"></script> +<script src="../../media-file.js"></script> +<script src="../../media-controls.js"></script> <body> <script> async_test(t => { - enablePictureInPictureForTest(t); - var video = document.createElement('video'); video.setAttribute('controls', ''); - video.src = '../content/test.ogv'; + video.src = '../../content/test.ogv'; document.body.appendChild(video); video.onloadedmetadata = t.step_func_done(function() {
diff --git a/third_party/WebKit/LayoutTests/media/picture-in-picture/picture-in-picture-enabled.html b/third_party/WebKit/LayoutTests/media/picture-in-picture/picture-in-picture-enabled.html new file mode 100644 index 0000000..7576e09 --- /dev/null +++ b/third_party/WebKit/LayoutTests/media/picture-in-picture/picture-in-picture-enabled.html
@@ -0,0 +1,19 @@ +<!DOCTYPE html> +<title>Test Picture-in-Picture disabled by system</title> +<script src="../../resources/testharness.js"></script> +<script src="../../resources/testharnessreport.js"></script> +<script src="../../resources/testdriver.js"></script> +<script src="../../resources/testdriver-vendor.js"></script> +<script src="../../external/wpt/picture-in-picture/resources/picture-in-picture-helpers.js"></script> +<body></body> +<script> +promise_test(t => { + assert_true(document.pictureInPictureEnabled); + + window.internals.settings.setPictureInPictureEnabled(false); + assert_false(document.pictureInPictureEnabled); + + return promise_rejects(t, 'NotSupportedError', + requestPictureInPictureWithTrustedClick(document.createElement('video'))); +}); +</script>
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-overflowing-block-rl-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-overflowing-block-rl-expected.txt index 9f307bd8..c4a2e5b 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-overflowing-block-rl-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-overflowing-block-rl-expected.txt
@@ -29,7 +29,7 @@ }, { "object": "LayoutBlockFlow DIV id='elm'", - "rect": [8, 174, 500, 168], + "rect": [8, 175, 500, 166], "reason": "style change" } ]
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/animate-path-discrete-expected.png b/third_party/WebKit/LayoutTests/paint/invalidation/svg/animate-path-discrete-expected.png index 52709b2..7faa8a0 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/animate-path-discrete-expected.png +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/animate-path-discrete-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-bounce-expected.png b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-bounce-expected.png index 7c45db8b..c7b22bf 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-bounce-expected.png +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-bounce-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-expected.png b/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-expected.png new file mode 100644 index 0000000..cf1cf1b --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-expected.txt b/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-expected.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-expected.txt
@@ -0,0 +1 @@ +
diff --git a/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-scrolled-expected.png b/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-scrolled-expected.png new file mode 100644 index 0000000..f2d1b59 --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-scrolled-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-scrolled-expected.txt b/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-scrolled-expected.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-scrolled-expected.txt
@@ -0,0 +1 @@ +
diff --git a/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-scrolled.html b/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-scrolled.html new file mode 100644 index 0000000..bbd2bc9 --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame-scrolled.html
@@ -0,0 +1,34 @@ +<!DOCTYPE html> +<script src="../../resources/ahem.js"></script> +<script src="../../resources/run-after-layout-and-paint.js"></script> +<script> +onload = function() { + if (!window.testRunner) + return; + + testRunner.dumpDragImage(); + iframe.contentWindow.scrollBy(0, 123); + runAfterLayoutAndPaint(function() { + iframe.contentWindow.getSelection().selectAllChildren(iframe.contentDocument.body); + var x = iframe.offsetLeft + iframe.offsetWidth / 2; + var y = iframe.offsetTop + iframe.offsetHeight / 2; + eventSender.dragMode = true; + eventSender.mouseMoveTo(x, y); + eventSender.mouseDown(); + eventSender.leapForward(200); + eventSender.mouseMoveTo(x + 50, y + 50); + eventSender.mouseUp(); + }, true); +} +</script> +<iframe id="iframe" style="position: absolute; top: 200px; left: 300px; width: 300px; height: 200px; border: none" + srcdoc=" + <!DOCTYPE html> + <style> + body { + color: green; + font: 25px/1 Ahem; + } + </style> + To run this test manually, select some text and drag it around. The dragged text should be clipped in the same way as the original text."> +</iframe>
diff --git a/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame.html b/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame.html new file mode 100644 index 0000000..67b9aad --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag-in-frame.html
@@ -0,0 +1,30 @@ +<!DOCTYPE html> +<script src="../../resources/ahem.js"></script> +<script> +onload = function() { + if (!window.testRunner) + return; + + testRunner.dumpDragImage(); + iframe.contentWindow.getSelection().selectAllChildren(iframe.contentDocument.body); + var x = iframe.offsetLeft + iframe.offsetWidth / 2; + var y = iframe.offsetTop + iframe.offsetHeight / 2; + eventSender.dragMode = true; + eventSender.mouseMoveTo(x, y); + eventSender.mouseDown(); + eventSender.leapForward(200); + eventSender.mouseMoveTo(x + 50, y + 50); + eventSender.mouseUp(); +} +</script> +<iframe id="iframe" style="position: absolute; top: 200px; left: 300px; width: 300px; height: 200px; border: none" + srcdoc=" + <!DOCTYPE html> + <style> + body { + color: green; + font: 25px/1 Ahem; + } + </style> + To run this test manually, select some text and drag it around. The dragged text should be clipped in the same way as the original text."> +</iframe>
diff --git a/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag.html b/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag.html index 23c92b5..2bd66a8 100644 --- a/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag.html +++ b/third_party/WebKit/LayoutTests/paint/selection/text-selection-drag.html
@@ -1,6 +1,7 @@ <!DOCTYPE html> <html> <head> +<script src="../../resources/ahem.js"></script> <style> body { color: green;
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt index 504102e5..0fdd581 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt
@@ -2,13 +2,23 @@ "layers": [ { "name": "LayoutView #document", - "bounds": [939, 235], + "bounds": [600, 250], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [600, 235], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [939, 235], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { - "object": "LayoutView #document", + "object": "Scrolling Contents Layer", "rect": [0, 0, 939, 235], "reason": "paint property change" }, @@ -18,12 +28,7 @@ "reason": "paint property change" }, { - "object": "LayoutView #document", - "rect": [0, 0, 600, 500], - "reason": "full" - }, - { - "object": "LayoutView #document", + "object": "Scrolling Contents Layer", "rect": [0, 0, 600, 235], "reason": "paint property change" }, @@ -44,85 +49,90 @@ [0, 1, 0, 0], [0, 0, 1, 0], [-339, 0, 0, 1] - ] + ], + "flattenInheritedTransform": false } ], "objectPaintInvalidations": [ { + "object": "Scrolling Contents Layer", + "reason": "background on scrolling contents layer" + }, + { + "object": "LayoutView #document", + "reason": "incremental" + }, + { "object": "LayoutView #document", "reason": "geometry" }, { - "object": "LayoutView #document", - "reason": "subtree" - }, - { "object": "LayoutBlockFlow HTML", - "reason": "subtree" + "reason": "geometry" }, { "object": "LayoutBlockFlow BODY", - "reason": "subtree" + "reason": "geometry" }, { "object": "RootInlineBox", - "reason": "subtree" + "reason": "geometry" }, { "object": "LayoutText #text", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'AAAA'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'BBBB'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'CCCC'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'DDDD'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'EEEE'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'FFFF'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'GGGG'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'HHHH'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'IIII JJJJ'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'KKKK'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'LLLL'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'MMMM'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'NNNN'", - "reason": "subtree" + "reason": "geometry" } ] } @@ -130,18 +140,23 @@ "layers": [ { "name": "LayoutView #document", - "bounds": [939, 235], + "bounds": [400, 250], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [400, 235], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [939, 235], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { - "object": "LayoutView #document", - "rect": [0, 0, 939, 235], - "reason": "full" - }, - { - "object": "LayoutView #document", + "object": "Scrolling Contents Layer", "rect": [0, 0, 939, 235], "reason": "paint property change" }, @@ -162,85 +177,90 @@ [0, 1, 0, 0], [0, 0, 1, 0], [-539, 0, 0, 1] - ] + ], + "flattenInheritedTransform": false } ], "objectPaintInvalidations": [ { + "object": "Scrolling Contents Layer", + "reason": "background on scrolling contents layer" + }, + { + "object": "LayoutView #document", + "reason": "incremental" + }, + { "object": "LayoutView #document", "reason": "geometry" }, { - "object": "LayoutView #document", - "reason": "subtree" - }, - { "object": "LayoutBlockFlow HTML", - "reason": "subtree" + "reason": "geometry" }, { "object": "LayoutBlockFlow BODY", - "reason": "subtree" + "reason": "geometry" }, { "object": "RootInlineBox", - "reason": "subtree" + "reason": "geometry" }, { "object": "LayoutText #text", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'AAAA'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'BBBB'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'CCCC'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'DDDD'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'EEEE'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'FFFF'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'GGGG'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'HHHH'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'IIII JJJJ'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'KKKK'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'LLLL'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'MMMM'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'NNNN'", - "reason": "subtree" + "reason": "geometry" } ] } @@ -250,21 +270,26 @@ "name": "LayoutView #document", "bounds": [400, 600], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [400, 600], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [400, 600], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { - "object": "LayoutView #document", - "rect": [0, 0, 939, 235], - "reason": "full" - }, - { - "object": "LayoutView #document", + "object": "Scrolling Contents Layer", "rect": [0, 0, 400, 600], "reason": "paint property change" }, { - "object": "LayoutView #document", + "object": "Scrolling Contents Layer", "rect": [0, 0, 400, 235], "reason": "paint property change" }, @@ -283,48 +308,52 @@ ], "objectPaintInvalidations": [ { + "object": "Scrolling Contents Layer", + "reason": "background on scrolling contents layer" + }, + { + "object": "LayoutView #document", + "reason": "incremental" + }, + { "object": "LayoutView #document", "reason": "geometry" }, { - "object": "LayoutView #document", - "reason": "subtree" - }, - { "object": "LayoutBlockFlow HTML", - "reason": "subtree" + "reason": "geometry" }, { "object": "LayoutBlockFlow BODY", - "reason": "subtree" + "reason": "geometry" }, { "object": "RootInlineBox", - "reason": "subtree" + "reason": "geometry" }, { "object": "LayoutText #text", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'AAAA BBBB CCCC'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'DDDD EEEE FFFF'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'GGGG HHHH IIII JJJJ'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'KKKK LLLL MMMM'", - "reason": "subtree" + "reason": "geometry" }, { "object": "InlineTextBox 'NNNN'", - "reason": "subtree" + "reason": "geometry" } ] } @@ -334,11 +363,21 @@ "name": "LayoutView #document", "bounds": [800, 600], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [800, 600], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [800, 600], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { - "object": "LayoutView #document", + "object": "Scrolling Contents Layer", "rect": [400, 0, 400, 600], "reason": "incremental" }, @@ -397,6 +436,10 @@ ], "objectPaintInvalidations": [ { + "object": "Scrolling Contents Layer", + "reason": "incremental" + }, + { "object": "LayoutView #document", "reason": "incremental" },
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/text/font-format-support-cbdt-sbix-cff2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/text/font-format-support-cbdt-sbix-cff2-expected.png deleted file mode 100644 index b82a785..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/text/font-format-support-cbdt-sbix-cff2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/border-radius-styles-with-composited-child-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/border-radius-styles-with-composited-child-expected.png deleted file mode 100644 index f11a15d..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/border-radius-styles-with-composited-child-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-04-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-04-d-expected.png deleted file mode 100644 index e5c0d52..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-04-d-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-34-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-34-d-expected.png deleted file mode 100644 index 38ac33b8..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-34-d-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-44-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-44-d-expected.png deleted file mode 100644 index ee74d16..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-44-d-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-47-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-47-d-expected.png deleted file mode 100644 index a454731..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-47-d-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-49-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-49-d-expected.png deleted file mode 100644 index 4918ced..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css2.1/t170602-bdr-conflct-w-49-d-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/caret/caret-painting-low-dpi-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/caret/caret-painting-low-dpi-expected.png deleted file mode 100644 index 60f1e2bc6..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/caret/caret-painting-low-dpi-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/caret/caret-position-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/caret/caret-position-expected.png deleted file mode 100644 index 94c713b..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/caret/caret-position-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/input/caret-at-the-edge-of-input-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/input/caret-at-the-edge-of-input-expected.png deleted file mode 100644 index 0cf9d64..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/input/caret-at-the-edge-of-input-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/inserting/4960120-1-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/inserting/4960120-1-expected.png deleted file mode 100644 index ecb32fda..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/inserting/4960120-1-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/inserting/editable-inline-element-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/inserting/editable-inline-element-expected.png deleted file mode 100644 index 0d4be1fd..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/inserting/editable-inline-element-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-ltr-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-ltr-2-expected.png deleted file mode 100644 index fd5a214..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-ltr-2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-ltr-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-ltr-expected.png deleted file mode 100644 index 3a6ac60..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/editing/selection/caret-ltr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-008-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-008-expected.txt deleted file mode 100644 index 69421f29..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/css-text/white-space/seg-break-transformation-008-expected.txt +++ /dev/null
@@ -1,9 +0,0 @@ -This is a testharness.js-based test. -FAIL linebreak only assert_equals: expected 192 but got 199 -FAIL spaces linebreak assert_equals: expected 192 but got 199 -FAIL linebreak spaces assert_equals: expected 192 but got 199 -FAIL spaces linebreak spaces assert_equals: expected 192 but got 199 -FAIL multiple linebreaks assert_equals: expected 192 but got 199 -FAIL multiple linebreaks + spaces assert_equals: expected 192 but got 199 -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt deleted file mode 100644 index 957e32b..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL drm, temporary, mp4, playback with limited playduration, single key navigator.requestMediaKeySystemAccess is not a function -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt deleted file mode 100644 index 148c250..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/encrypted-media/drm-mp4-playback-temporary-playduration-keystatus-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL drm, temporary, mp4, playback with limited playduration, check keystatus, single key navigator.requestMediaKeySystemAccess is not a function -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt deleted file mode 100644 index 4660a2de..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/payment-request/PaymentCurrencyAmount/currencySystem-member.https-expected.txt +++ /dev/null
@@ -1,16 +0,0 @@ -This is a testharness.js-based test. -FAIL Must throw if it encounters an unknown currencySystem assert_throws: function "() => { - const invalidAmount = { - ...validAmount, - currencySystem: "this will cause the TypeError" - } - const invalidDetails = { - total: { - label: "", - amount: invalidAmount, - }, - }; - const request = new PaymentRequest(validMethods, invalidDetails); - }" did not throw -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/streams/piping/error-propagation-forward.serviceworker.https-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/streams/piping/error-propagation-forward.serviceworker.https-expected.txt deleted file mode 100644 index fc9298c..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/streams/piping/error-propagation-forward.serviceworker.https-expected.txt +++ /dev/null
@@ -1,36 +0,0 @@ -This is a testharness.js-based test. -PASS Service worker test setup -PASS Errors must be propagated forward: starts errored; preventAbort = false; fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = false; rejected abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = undefined (falsy); fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = null (falsy); fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = false (falsy); fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = 0 (falsy); fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = -0 (falsy); fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = NaN (falsy); fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = (falsy); fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = true (truthy) -PASS Errors must be propagated forward: starts errored; preventAbort = a (truthy) -PASS Errors must be propagated forward: starts errored; preventAbort = 1 (truthy) -PASS Errors must be propagated forward: starts errored; preventAbort = Symbol() (truthy) -PASS Errors must be propagated forward: starts errored; preventAbort = [object Object] (truthy) -PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true -PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true, preventClose = true -PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; fulfilled abort promise -PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; rejected abort promise -PASS Errors must be propagated forward: becomes errored while empty; preventAbort = true -PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; fulfilled abort promise -PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; rejected abort promise -PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = true -PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; fulfilled abort promise -PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; rejected abort promise -PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = true -PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; fulfilled abort promise -PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise -PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true -PASS Errors must be propagated forward: shutdown must not occur until the final write completes -FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true assert_equals: the pipe must not be complete expected false but got true -FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write assert_array_equals: the second chunk must have been written, but abort must not have happened yet property 2, expected "write" but got "abort" -FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true assert_false: the pipe should not complete while the second write is pending expected false got true -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-huge-assert-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-huge-assert-expected.png deleted file mode 100644 index 191276e..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-huge-assert-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-with-composited-child-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-with-composited-child-expected.png deleted file mode 100644 index 255e5d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/border-radius-with-composited-child-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed01-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed01-expected.png deleted file mode 100644 index 41663be..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/borders/borderRadiusDashed01-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/box-shadow/inset-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/box-shadow/inset-expected.png deleted file mode 100644 index 78eae785..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/box-shadow/inset-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-arc-circumference-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-arc-circumference-expected.png deleted file mode 100644 index d9c70447..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/canvas/canvas-arc-circumference-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/clip/overflow-border-radius-composited-parent-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/clip/overflow-border-radius-composited-parent-expected.png deleted file mode 100644 index 39a83dd..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/clip/overflow-border-radius-composited-parent-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-outline-width-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-outline-width-expected.png deleted file mode 100644 index 9b56b35..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/css/focus-ring-outline-width-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png deleted file mode 100644 index 84ddd67..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/week-picker-appearance-step-expected.png deleted file mode 100644 index 4610e15c1..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/date/date-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/date/date-appearance-basic-expected.png deleted file mode 100644 index 9626b909..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/date/date-appearance-basic-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/number/number-appearance-rtl-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/number/number-appearance-rtl-expected.png deleted file mode 100644 index dc508c7..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/number/number-appearance-rtl-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/slider-padding-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/slider-padding-expected.png deleted file mode 100644 index 599c318..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/range/slider-padding-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png deleted file mode 100644 index 8f8f443..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/week-suggestion-picker-appearance-rtl-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/week-suggestion-picker-appearance-rtl-expected.png deleted file mode 100644 index 70c440f..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/week-suggestion-picker-appearance-rtl-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png deleted file mode 100644 index 90260d5f..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-drag-down-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-drag-down-expected.png deleted file mode 100644 index 20698107..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/forms/text/input-text-drag-down-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/continuation-outlines-with-layers-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/continuation-outlines-with-layers-expected.png deleted file mode 100644 index e6524df..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/inline/continuation-outlines-with-layers-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/border-collapsing/002-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/border-collapsing/002-expected.png deleted file mode 100644 index 02f7b960..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/table/border-collapsing/002-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-008-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-008-expected.png deleted file mode 100644 index e1e0829..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-008-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-clip-002-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-clip-002-expected.png deleted file mode 100644 index 7a88494..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-clip-002-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-not-inherited-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-not-inherited-001-expected.png deleted file mode 100644 index a8ba763..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/ietestcenter/css3/bordersbackgrounds/border-radius-not-inherited-001-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-circle-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-circle-focus-ring-expected.png deleted file mode 100644 index c0b110c..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-circle-focus-ring-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-expected.png deleted file mode 100644 index 8424262..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-zoom-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-zoom-expected.png deleted file mode 100644 index c691b74..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-focus-ring-zoom-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-overflowing-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-overflowing-polygon-focus-ring-expected.png deleted file mode 100644 index 12f8146..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/images/imagemap-overflowing-polygon-focus-ring-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-overflowing-block-rl-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-overflowing-block-rl-expected.txt deleted file mode 100644 index c4a2e5b..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-overflowing-block-rl-expected.txt +++ /dev/null
@@ -1,53 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='elm'", - "rect": [8, 8, 792, 167], - "reason": "style change" - }, - { - "object": "LayoutBlockFlow DIV id='elm'", - "rect": [0, 341, 508, 167], - "reason": "style change" - }, - { - "object": "LayoutBlockFlow DIV id='elm'", - "rect": [8, 175, 500, 166], - "reason": "style change" - } - ] - } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='elm'", - "reason": "style change" - }, - { - "object": "LayoutBlockFlow DIV id='elm'", - "reason": "style change" - }, - { - "object": "LayoutBlockFlow DIV id='elm'", - "reason": "style change" - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/focus-ring-expected.png deleted file mode 100644 index 8a218f0..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/focus-ring-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/layer-child-outline-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/layer-child-outline-expected.png deleted file mode 100644 index f7499c8..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/outline/layer-child-outline-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/animate-path-discrete-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/animate-path-discrete-expected.png deleted file mode 100644 index 7faa8a0..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/animate-path-discrete-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-bounce-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-bounce-expected.png deleted file mode 100644 index c7b22bf..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/svg/js-update-bounce-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/selection/text-selection-with-composition-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/selection/text-selection-with-composition-expected.png deleted file mode 100644 index 6ba0e95..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/selection/text-selection-with-composition-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-34-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-34-t-expected.png deleted file mode 100644 index 35aa0090..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-34-t-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-37-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-37-t-expected.png deleted file mode 100644 index 3e9d976..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/animate-elem-37-t-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/extend-namespace-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/extend-namespace-01-f-expected.png deleted file mode 100644 index d95c225..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/extend-namespace-01-f-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/interact-zoom-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/interact-zoom-01-t-expected.png deleted file mode 100644 index 879a13e8..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/interact-zoom-01-t-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/painting-marker-02-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/painting-marker-02-f-expected.png deleted file mode 100644 index 9ba5cff..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/painting-marker-02-f-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/painting-stroke-03-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/painting-stroke-03-t-expected.png deleted file mode 100644 index 241873f..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/painting-stroke-03-t-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/script-handle-03-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/script-handle-03-b-expected.png deleted file mode 100644 index baa5dff..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/script-handle-03-b-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/script-handle-04-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/script-handle-04-b-expected.png deleted file mode 100644 index e689ccc..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/script-handle-04-b-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.png deleted file mode 100644 index aefbd9e..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textDecoration-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textDecoration-expected.png deleted file mode 100644 index 5bb1931..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/batik/text/textDecoration-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/clip-path/clip-path-evenodd-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/clip-path/clip-path-evenodd-expected.png deleted file mode 100644 index 8d84556d..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/clip-path/clip-path-evenodd-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/focus-ring-expected.png deleted file mode 100644 index a9240fe..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/focus-ring-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/no-inherited-dashed-stroke-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/no-inherited-dashed-stroke-expected.png deleted file mode 100644 index 7656c37..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/no-inherited-dashed-stroke-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/non-scaling-stroke-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/non-scaling-stroke-expected.png deleted file mode 100644 index b2dd42c2..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/custom/non-scaling-stroke-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-in-positioned-container-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-in-positioned-container-expected.png deleted file mode 100644 index 5581ad3..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-in-positioned-container-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-expected.png deleted file mode 100644 index 316c7d1c..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-zoom-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-zoom-expected.png deleted file mode 100644 index ad0d2b1..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-focus-ring-zoom-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png deleted file mode 100644 index beb21b6..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu-rasterization/images/imagemap-overflowing-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu-rasterization/images/imagemap-overflowing-polygon-focus-ring-expected.png deleted file mode 100644 index 03f4ef0..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/gpu-rasterization/images/imagemap-overflowing-polygon-focus-ring-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/scrollbars/border-box-rect-clips-scrollbars-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/scrollbars/border-box-rect-clips-scrollbars-expected.png deleted file mode 100644 index fe84b7e8..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/prefer_compositing_to_lcd_text/scrollbars/border-box-rect-clips-scrollbars-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/font-format-support-cbdt-sbix-cff2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/font-format-support-cbdt-sbix-cff2-expected.png deleted file mode 100644 index b82a785..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/font-format-support-cbdt-sbix-cff2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-styles-with-composited-child-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-styles-with-composited-child-expected.png index 9592472..f11a15d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-styles-with-composited-child-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/border-radius-styles-with-composited-child-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/siblings-with-border-radius-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/siblings-with-border-radius-ancestor-expected.png similarity index 100% rename from third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/overflow/siblings-with-border-radius-ancestor-expected.png rename to third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/siblings-with-border-radius-ancestor-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-04-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-04-d-expected.png index aa7226d..e5c0d52 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-04-d-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-04-d-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-34-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-34-d-expected.png index 1ef9fe1..38ac33b8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-34-d-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-34-d-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-44-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-44-d-expected.png index 6b92cdf..ee74d16 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-44-d-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-44-d-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-47-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-47-d-expected.png index f4e8d7b..a454731 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-47-d-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-47-d-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-49-d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-49-d-expected.png index 70565cb..4918ced 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-49-d-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/css2.1/t170602-bdr-conflct-w-49-d-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-painting-low-dpi-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-painting-low-dpi-expected.png index 484e855c..60f1e2bc6 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-painting-low-dpi-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-painting-low-dpi-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-position-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-position-expected.png index 3c848b8..94c713b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-position-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/editing/caret/caret-position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/input/caret-at-the-edge-of-input-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/input/caret-at-the-edge-of-input-expected.png index f2f72c2b..0cf9d64 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/editing/input/caret-at-the-edge-of-input-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/editing/input/caret-at-the-edge-of-input-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/inserting/4960120-1-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/inserting/4960120-1-expected.png index f48d313..ecb32fda 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/editing/inserting/4960120-1-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/editing/inserting/4960120-1-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/inserting/editable-inline-element-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/inserting/editable-inline-element-expected.png index d15b1daf..0d4be1fd 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/editing/inserting/editable-inline-element-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/editing/inserting/editable-inline-element-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-2-expected.png index 0a7a3e4..fd5a214 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-2-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-2-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-expected.png index f2cf7d94..3a6ac60 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/editing/selection/caret-ltr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-huge-assert-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-huge-assert-expected.png index 1d48345a..191276e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-huge-assert-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-huge-assert-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-composited-child-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-composited-child-expected.png index 0de0385..255e5d5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-composited-child-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-composited-child-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-expected.png index 1221115b..78eae785 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/clip/overflow-border-radius-composited-parent-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/clip/overflow-border-radius-composited-parent-expected.png index 7895a95..39a83dd 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/clip/overflow-border-radius-composited-parent-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/clip/overflow-border-radius-composited-parent-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-outline-width-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-outline-width-expected.png index d0f7f1a..9b56b35 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-outline-width-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/focus-ring-outline-width-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png index d8698ad..84ddd67 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index bb2f6f7..4610e15c1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/date/date-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/date/date-appearance-basic-expected.png index d8c8317..9626b909 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/date/date-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/date/date-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/number/number-appearance-rtl-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/number/number-appearance-rtl-expected.png index 5d18cc4f..dc508c7 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/number/number-appearance-rtl-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/number/number-appearance-rtl-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.png index cddbd84..599c318 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png index 53bae82..8f8f443 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/week-suggestion-picker-appearance-rtl-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/week-suggestion-picker-appearance-rtl-expected.png index 48faba3..70c440f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/week-suggestion-picker-appearance-rtl-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/week-suggestion-picker-appearance-rtl-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png index 09ce990..90260d5f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-drag-down-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-drag-down-expected.png index b4f0271..20698107 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-drag-down-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/input-text-drag-down-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-expected.png index 6882dfc..e6524df 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/002-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/002-expected.png index 630872cf..02f7b960 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/002-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/table/border-collapsing/002-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/text/font-format-support-cbdt-sbix-cff2-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/text/font-format-support-cbdt-sbix-cff2-expected.png index f60be79..e85a296 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/text/font-format-support-cbdt-sbix-cff2-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/text/font-format-support-cbdt-sbix-cff2-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png index 2a857a9..db258c87 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/text/font-format-support-cbdt-sbix-cff2-vertical-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/text/variable-fonts/cff2-variations-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/text/variable-fonts/cff2-variations-expected.png new file mode 100644 index 0000000..3dbfecf --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/text/variable-fonts/cff2-variations-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-008-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-008-expected.png index a53ae312..e1e0829 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-008-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-008-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-clip-002-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-clip-002-expected.png index d7a9d950..7a88494 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-clip-002-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-clip-002-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-not-inherited-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-not-inherited-001-expected.png index 7f2506c0..a8ba763 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-not-inherited-001-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/border-radius-not-inherited-001-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-circle-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-circle-focus-ring-expected.png index 0c56e8c..c0b110c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-circle-focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-circle-focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-expected.png index 3350e4a..8424262 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-zoom-expected.png b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-zoom-expected.png index 5513f48b..c691b74 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-zoom-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-focus-ring-zoom-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-overflowing-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-overflowing-polygon-focus-ring-expected.png index a0f1d640f..12f8146 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-overflowing-polygon-focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/images/imagemap-overflowing-polygon-focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/focus-ring-expected.png index 2200319..8a218f0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/layer-child-outline-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/layer-child-outline-expected.png index 9a654e1..f7499c8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/layer-child-outline-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/outline/layer-child-outline-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt index 5b75f0c..a15fc66 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt
@@ -2,50 +2,40 @@ "layers": [ { "name": "LayoutView #document", - "bounds": [913, 235], + "bounds": [600, 250], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [600, 235], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [913, 235], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { - "object": "LayoutView #document", + "object": "Scrolling Contents Layer", "rect": [0, 0, 913, 235], - "reason": "geometry" + "reason": "paint property change" }, { - "object": "LayoutBlockFlow BODY", - "rect": [8, 8, 897, 219], - "reason": "geometry" - }, - { - "object": "LayoutText #text", + "object": "LayoutBlockFlow HTML", "rect": [8, 8, 897, 214], - "reason": "geometry" + "reason": "paint property change" }, { - "object": "LayoutView #document", - "rect": [313, 0, 600, 500], - "reason": "geometry" + "object": "Scrolling Contents Layer", + "rect": [0, 0, 600, 235], + "reason": "paint property change" }, { - "object": "LayoutView #document", - "rect": [0, 0, 600, 500], - "reason": "full" - }, - { - "object": "LayoutView #document", - "rect": [313, 235, 600, 15], - "reason": "scroll control" - }, - { - "object": "LayoutBlockFlow BODY", - "rect": [491, 8, 414, 484], - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "rect": [491, 8, 414, 484], - "reason": "geometry" + "object": "LayoutBlockFlow HTML", + "rect": [178, 8, 414, 227], + "reason": "paint property change" } ], "transform": 1 @@ -59,13 +49,18 @@ [0, 1, 0, 0], [0, 0, 1, 0], [-313, 0, 0, 1] - ] + ], + "flattenInheritedTransform": false } ], "objectPaintInvalidations": [ { + "object": "Scrolling Contents Layer", + "reason": "background on scrolling contents layer" + }, + { "object": "LayoutView #document", - "reason": "geometry" + "reason": "incremental" }, { "object": "LayoutView #document", @@ -145,55 +140,30 @@ "layers": [ { "name": "LayoutView #document", - "bounds": [913, 235], + "bounds": [400, 250], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [400, 235], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [913, 235], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { - "object": "LayoutView #document", - "rect": [200, 0, 913, 235], - "reason": "geometry" - }, - { - "object": "LayoutView #document", + "object": "Scrolling Contents Layer", "rect": [0, 0, 913, 235], - "reason": "full" + "reason": "paint property change" }, { - "object": "LayoutView #document", - "rect": [0, 0, 913, 235], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow BODY", - "rect": [208, 8, 897, 219], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow BODY", - "rect": [8, 8, 897, 219], - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "rect": [208, 8, 897, 214], - "reason": "geometry" - }, - { - "object": "LayoutText #text", + "object": "LayoutBlockFlow HTML", "rect": [8, 8, 897, 214], - "reason": "geometry" - }, - { - "object": "LayoutView #document", - "rect": [513, 235, 600, 15], - "reason": "scroll control" - }, - { - "object": "LayoutView #document", - "rect": [513, 235, 400, 15], - "reason": "scroll control" + "reason": "paint property change" } ], "transform": 1 @@ -207,13 +177,18 @@ [0, 1, 0, 0], [0, 0, 1, 0], [-513, 0, 0, 1] - ] + ], + "flattenInheritedTransform": false } ], "objectPaintInvalidations": [ { + "object": "Scrolling Contents Layer", + "reason": "background on scrolling contents layer" + }, + { "object": "LayoutView #document", - "reason": "geometry" + "reason": "incremental" }, { "object": "LayoutView #document", @@ -295,56 +270,50 @@ "name": "LayoutView #document", "bounds": [400, 600], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [400, 600], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [400, 600], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { - "object": "LayoutView #document", - "rect": [0, 0, 913, 235], - "reason": "full" - }, - { - "object": "LayoutView #document", - "rect": [-513, 0, 913, 235], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow BODY", - "rect": [-505, 8, 897, 219], - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "rect": [-505, 8, 897, 214], - "reason": "geometry" - }, - { - "object": "LayoutView #document", + "object": "Scrolling Contents Layer", "rect": [0, 0, 400, 600], - "reason": "geometry" + "reason": "paint property change" }, { - "object": "LayoutView #document", - "rect": [0, 235, 400, 15], - "reason": "scroll control" + "object": "Scrolling Contents Layer", + "rect": [0, 0, 400, 235], + "reason": "paint property change" }, { - "object": "LayoutBlockFlow BODY", - "rect": [47, 8, 345, 584], - "reason": "geometry" + "object": "LayoutBlockFlow HTML", + "rect": [8, 8, 392, 214], + "reason": "paint property change" }, { - "object": "LayoutText #text", + "object": "LayoutBlockFlow HTML", "rect": [47, 8, 345, 565], - "reason": "geometry" + "reason": "paint property change" } ] } ], "objectPaintInvalidations": [ { + "object": "Scrolling Contents Layer", + "reason": "background on scrolling contents layer" + }, + { "object": "LayoutView #document", - "reason": "geometry" + "reason": "incremental" }, { "object": "LayoutView #document", @@ -394,31 +363,71 @@ "name": "LayoutView #document", "bounds": [800, 600], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [800, 600], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [800, 600], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { - "object": "LayoutView #document", + "object": "Scrolling Contents Layer", "rect": [400, 0, 400, 600], "reason": "incremental" }, { - "object": "LayoutBlockFlow BODY", - "rect": [447, 8, 345, 584], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow BODY", - "rect": [47, 8, 345, 584], - "reason": "geometry" - }, - { - "object": "LayoutText #text", + "object": "InlineTextBox 'AAAA BBBB CCCC'", "rect": [447, 8, 345, 565], "reason": "geometry" }, { - "object": "LayoutText #text", + "object": "InlineTextBox 'DDDD EEEE FFFF'", + "rect": [447, 8, 345, 565], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'GGGG HHHH IIII JJJJ'", + "rect": [447, 8, 345, 565], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'KKKK LLLL MMMM'", + "rect": [447, 8, 345, 565], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'NNNN'", + "rect": [447, 8, 345, 565], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'AAAA BBBB CCCC'", + "rect": [47, 8, 345, 565], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'DDDD EEEE FFFF'", + "rect": [47, 8, 345, 565], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'GGGG HHHH IIII JJJJ'", + "rect": [47, 8, 345, 565], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'KKKK LLLL MMMM'", + "rect": [47, 8, 345, 565], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'NNNN'", "rect": [47, 8, 345, 565], "reason": "geometry" } @@ -427,10 +436,18 @@ ], "objectPaintInvalidations": [ { + "object": "Scrolling Contents Layer", + "reason": "incremental" + }, + { "object": "LayoutView #document", "reason": "incremental" }, { + "object": "LayoutBlockFlow HTML", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow BODY", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/selection/text-selection-with-composition-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/selection/text-selection-with-composition-expected.png index 2826085..6ba0e95 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/selection/text-selection-with-composition-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/selection/text-selection-with-composition-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-34-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-34-t-expected.png index b4c41bb..35aa0090 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-34-t-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-34-t-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-37-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-37-t-expected.png index a5953f9..3e9d976 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-37-t-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-37-t-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/extend-namespace-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/extend-namespace-01-f-expected.png index 2faac7a..d95c225 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/extend-namespace-01-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/extend-namespace-01-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-zoom-01-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-zoom-01-t-expected.png index ae6868d..879a13e8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-zoom-01-t-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-zoom-01-t-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-marker-02-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-marker-02-f-expected.png index 222ab34c..9ba5cff 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-marker-02-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-marker-02-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-stroke-03-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-stroke-03-t-expected.png index fbab8c02..241873f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-stroke-03-t-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-stroke-03-t-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/script-handle-03-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/script-handle-03-b-expected.png index 1d36f52d..baa5dff 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/script-handle-03-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/script-handle-03-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/script-handle-04-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/script-handle-04-b-expected.png index 4c30157..e689ccc 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/script-handle-04-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/script-handle-04-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.png index 99f7ab6..aefbd9e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textDecoration-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textDecoration-expected.png index c8039bce..5bb1931 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textDecoration-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textDecoration-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/focus-ring-expected.png index 88544088..a9240fe 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/no-inherited-dashed-stroke-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/no-inherited-dashed-stroke-expected.png index 9f8ad5a7..7656c37 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/no-inherited-dashed-stroke-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/no-inherited-dashed-stroke-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-in-positioned-container-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-in-positioned-container-expected.png index efa7744..5581ad3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-in-positioned-container-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-in-positioned-container-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-expected.png index 99c6734c..316c7d1c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-zoom-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-zoom-expected.png index 281176ed..ad0d2b1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-zoom-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-zoom-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png index fd6a710..beb21b6 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/imagemap-overflowing-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/imagemap-overflowing-polygon-focus-ring-expected.png index f0eb0cf..03f4ef0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/imagemap-overflowing-polygon-focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/imagemap-overflowing-polygon-focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/scrollbars/border-box-rect-clips-scrollbars-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/scrollbars/border-box-rect-clips-scrollbars-expected.png index e83464152..fe84b7e8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/scrollbars/border-box-rect-clips-scrollbars-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/scrollbars/border-box-rect-clips-scrollbars-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/external/wpt/streams/piping/error-propagation-forward.serviceworker.https-expected.txt b/third_party/WebKit/LayoutTests/platform/win/external/wpt/streams/piping/error-propagation-forward.serviceworker.https-expected.txt deleted file mode 100644 index fc9298c..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/external/wpt/streams/piping/error-propagation-forward.serviceworker.https-expected.txt +++ /dev/null
@@ -1,36 +0,0 @@ -This is a testharness.js-based test. -PASS Service worker test setup -PASS Errors must be propagated forward: starts errored; preventAbort = false; fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = false; rejected abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = undefined (falsy); fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = null (falsy); fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = false (falsy); fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = 0 (falsy); fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = -0 (falsy); fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = NaN (falsy); fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = (falsy); fulfilled abort promise -PASS Errors must be propagated forward: starts errored; preventAbort = true (truthy) -PASS Errors must be propagated forward: starts errored; preventAbort = a (truthy) -PASS Errors must be propagated forward: starts errored; preventAbort = 1 (truthy) -PASS Errors must be propagated forward: starts errored; preventAbort = Symbol() (truthy) -PASS Errors must be propagated forward: starts errored; preventAbort = [object Object] (truthy) -PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true -PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true, preventClose = true -PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; fulfilled abort promise -PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; rejected abort promise -PASS Errors must be propagated forward: becomes errored while empty; preventAbort = true -PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; fulfilled abort promise -PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; rejected abort promise -PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = true -PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; fulfilled abort promise -PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; rejected abort promise -PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = true -PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; fulfilled abort promise -PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise -PASS Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true -PASS Errors must be propagated forward: shutdown must not occur until the final write completes -FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true assert_equals: the pipe must not be complete expected false but got true -FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write assert_array_equals: the second chunk must have been written, but abort must not have happened yet property 2, expected "write" but got "abort" -FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true assert_false: the pipe should not complete while the second write is pending expected false got true -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed01-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed01-expected.png deleted file mode 100644 index 41663be..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/borderRadiusDashed01-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-arc-circumference-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-arc-circumference-expected.png deleted file mode 100644 index d9c70447..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-arc-circumference-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/multicol/multicol-with-overflowing-block-rl-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/multicol/multicol-with-overflowing-block-rl-expected.txt deleted file mode 100644 index c4a2e5b..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/multicol/multicol-with-overflowing-block-rl-expected.txt +++ /dev/null
@@ -1,53 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='elm'", - "rect": [8, 8, 792, 167], - "reason": "style change" - }, - { - "object": "LayoutBlockFlow DIV id='elm'", - "rect": [0, 341, 508, 167], - "reason": "style change" - }, - { - "object": "LayoutBlockFlow DIV id='elm'", - "rect": [8, 175, 500, 166], - "reason": "style change" - } - ] - } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='elm'", - "reason": "style change" - }, - { - "object": "LayoutBlockFlow DIV id='elm'", - "reason": "style change" - }, - { - "object": "LayoutBlockFlow DIV id='elm'", - "reason": "style change" - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/animate-path-discrete-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/animate-path-discrete-expected.png deleted file mode 100644 index 7faa8a0..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/animate-path-discrete-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-bounce-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-bounce-expected.png deleted file mode 100644 index c7b22bf..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-update-bounce-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt similarity index 67% copy from third_party/WebKit/LayoutTests/platform/win7/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt copy to third_party/WebKit/LayoutTests/platform/win/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt index 6002839..157296f7 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt
@@ -2,50 +2,40 @@ "layers": [ { "name": "LayoutView #document", - "bounds": [939, 235], + "bounds": [600, 250], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [600, 235], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [939, 235], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { - "object": "LayoutView #document", + "object": "Scrolling Contents Layer", "rect": [0, 0, 939, 235], - "reason": "geometry" + "reason": "paint property change" }, { - "object": "LayoutBlockFlow BODY", - "rect": [8, 8, 923, 219], - "reason": "geometry" - }, - { - "object": "LayoutText #text", + "object": "LayoutBlockFlow HTML", "rect": [9, 7, 921, 213], - "reason": "geometry" + "reason": "paint property change" }, { - "object": "LayoutView #document", - "rect": [339, 0, 600, 500], - "reason": "geometry" + "object": "Scrolling Contents Layer", + "rect": [0, 0, 600, 235], + "reason": "paint property change" }, { - "object": "LayoutView #document", - "rect": [0, 0, 600, 500], - "reason": "full" - }, - { - "object": "LayoutView #document", - "rect": [339, 235, 600, 15], - "reason": "scroll control" - }, - { - "object": "LayoutBlockFlow BODY", - "rect": [505, 8, 426, 484], - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "rect": [506, 8, 424, 470], - "reason": "geometry" + "object": "LayoutBlockFlow HTML", + "rect": [167, 8, 424, 227], + "reason": "paint property change" } ], "transform": 1 @@ -59,13 +49,18 @@ [0, 1, 0, 0], [0, 0, 1, 0], [-339, 0, 0, 1] - ] + ], + "flattenInheritedTransform": false } ], "objectPaintInvalidations": [ { + "object": "Scrolling Contents Layer", + "reason": "background on scrolling contents layer" + }, + { "object": "LayoutView #document", - "reason": "geometry" + "reason": "incremental" }, { "object": "LayoutView #document", @@ -145,55 +140,30 @@ "layers": [ { "name": "LayoutView #document", - "bounds": [939, 235], + "bounds": [400, 250], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [400, 235], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [939, 235], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { - "object": "LayoutView #document", - "rect": [200, 0, 939, 235], - "reason": "geometry" - }, - { - "object": "LayoutView #document", + "object": "Scrolling Contents Layer", "rect": [0, 0, 939, 235], - "reason": "full" + "reason": "paint property change" }, { - "object": "LayoutView #document", - "rect": [0, 0, 939, 235], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow BODY", - "rect": [208, 8, 923, 219], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow BODY", - "rect": [8, 8, 923, 219], - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "rect": [209, 7, 921, 213], - "reason": "geometry" - }, - { - "object": "LayoutText #text", + "object": "LayoutBlockFlow HTML", "rect": [9, 7, 921, 213], - "reason": "geometry" - }, - { - "object": "LayoutView #document", - "rect": [539, 235, 600, 15], - "reason": "scroll control" - }, - { - "object": "LayoutView #document", - "rect": [539, 235, 400, 15], - "reason": "scroll control" + "reason": "paint property change" } ], "transform": 1 @@ -207,13 +177,18 @@ [0, 1, 0, 0], [0, 0, 1, 0], [-539, 0, 0, 1] - ] + ], + "flattenInheritedTransform": false } ], "objectPaintInvalidations": [ { + "object": "Scrolling Contents Layer", + "reason": "background on scrolling contents layer" + }, + { "object": "LayoutView #document", - "reason": "geometry" + "reason": "incremental" }, { "object": "LayoutView #document", @@ -295,56 +270,50 @@ "name": "LayoutView #document", "bounds": [400, 600], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [400, 600], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [400, 600], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { - "object": "LayoutView #document", - "rect": [0, 0, 939, 235], - "reason": "full" - }, - { - "object": "LayoutView #document", - "rect": [-539, 0, 939, 235], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow BODY", - "rect": [-531, 8, 923, 219], - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "rect": [-530, 7, 921, 213], - "reason": "geometry" - }, - { - "object": "LayoutView #document", + "object": "Scrolling Contents Layer", "rect": [0, 0, 400, 600], - "reason": "geometry" + "reason": "paint property change" }, { - "object": "LayoutView #document", - "rect": [0, 235, 400, 15], - "reason": "scroll control" + "object": "Scrolling Contents Layer", + "rect": [0, 0, 400, 235], + "reason": "paint property change" }, { - "object": "LayoutBlockFlow BODY", - "rect": [37, 8, 355, 584], - "reason": "geometry" + "object": "LayoutBlockFlow HTML", + "rect": [9, 7, 391, 213], + "reason": "paint property change" }, { - "object": "LayoutText #text", + "object": "LayoutBlockFlow HTML", "rect": [38, 7, 353, 554], - "reason": "geometry" + "reason": "paint property change" } ] } ], "objectPaintInvalidations": [ { + "object": "Scrolling Contents Layer", + "reason": "background on scrolling contents layer" + }, + { "object": "LayoutView #document", - "reason": "geometry" + "reason": "incremental" }, { "object": "LayoutView #document", @@ -394,31 +363,71 @@ "name": "LayoutView #document", "bounds": [800, 600], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [800, 600], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [800, 600], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { - "object": "LayoutView #document", + "object": "Scrolling Contents Layer", "rect": [400, 0, 400, 600], "reason": "incremental" }, { - "object": "LayoutBlockFlow BODY", - "rect": [437, 8, 355, 584], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow BODY", - "rect": [37, 8, 355, 584], - "reason": "geometry" - }, - { - "object": "LayoutText #text", + "object": "InlineTextBox 'AAAA BBBB CCCC'", "rect": [438, 7, 353, 554], "reason": "geometry" }, { - "object": "LayoutText #text", + "object": "InlineTextBox 'DDDD EEEE FFFF'", + "rect": [438, 7, 353, 554], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'GGGG HHHH IIII JJJJ'", + "rect": [438, 7, 353, 554], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'KKKK LLLL MMMM'", + "rect": [438, 7, 353, 554], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'NNNN'", + "rect": [438, 7, 353, 554], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'AAAA BBBB CCCC'", + "rect": [38, 7, 353, 554], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'DDDD EEEE FFFF'", + "rect": [38, 7, 353, 554], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'GGGG HHHH IIII JJJJ'", + "rect": [38, 7, 353, 554], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'KKKK LLLL MMMM'", + "rect": [38, 7, 353, 554], + "reason": "geometry" + }, + { + "object": "InlineTextBox 'NNNN'", "rect": [38, 7, 353, 554], "reason": "geometry" } @@ -427,10 +436,18 @@ ], "objectPaintInvalidations": [ { + "object": "Scrolling Contents Layer", + "reason": "incremental" + }, + { "object": "LayoutView #document", "reason": "incremental" }, { + "object": "LayoutBlockFlow HTML", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow BODY", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/clip-path/clip-path-evenodd-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/clip-path/clip-path-evenodd-expected.png deleted file mode 100644 index 8d84556d..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/clip-path/clip-path-evenodd-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/non-scaling-stroke-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/non-scaling-stroke-expected.png deleted file mode 100644 index b2dd42c2..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/non-scaling-stroke-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-evenodd-expected.png b/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-evenodd-expected.png index 9298385..8d84556d 100644 --- a/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-evenodd-expected.png +++ b/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-evenodd-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/custom/non-scaling-stroke-expected.png b/third_party/WebKit/LayoutTests/svg/custom/non-scaling-stroke-expected.png index c9d78a8..b2dd42c2 100644 --- a/third_party/WebKit/LayoutTests/svg/custom/non-scaling-stroke-expected.png +++ b/third_party/WebKit/LayoutTests/svg/custom/non-scaling-stroke-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt b/third_party/WebKit/LayoutTests/virtual/disable-spv175/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt similarity index 78% rename from third_party/WebKit/LayoutTests/platform/win7/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt rename to third_party/WebKit/LayoutTests/virtual/disable-spv175/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt index 6002839..aa7e9770 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt +++ b/third_party/WebKit/LayoutTests/virtual/disable-spv175/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt
@@ -2,15 +2,25 @@ "layers": [ { "name": "LayoutView #document", - "bounds": [939, 235], + "bounds": [600, 250], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [600, 235], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [939, 235], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { "object": "LayoutView #document", "rect": [0, 0, 939, 235], - "reason": "geometry" + "reason": "background on scrolling contents layer" }, { "object": "LayoutBlockFlow BODY", @@ -19,23 +29,13 @@ }, { "object": "LayoutText #text", - "rect": [9, 7, 921, 213], + "rect": [10, 7, 920, 213], "reason": "geometry" }, { "object": "LayoutView #document", "rect": [339, 0, 600, 500], - "reason": "geometry" - }, - { - "object": "LayoutView #document", - "rect": [0, 0, 600, 500], - "reason": "full" - }, - { - "object": "LayoutView #document", - "rect": [339, 235, 600, 15], - "reason": "scroll control" + "reason": "background on scrolling contents layer" }, { "object": "LayoutBlockFlow BODY", @@ -44,7 +44,7 @@ }, { "object": "LayoutText #text", - "rect": [506, 8, 424, 470], + "rect": [507, 8, 423, 482], "reason": "geometry" } ], @@ -59,20 +59,21 @@ [0, 1, 0, 0], [0, 0, 1, 0], [-339, 0, 0, 1] - ] + ], + "flattenInheritedTransform": false } ], "objectPaintInvalidations": [ { - "object": "LayoutView #document", - "reason": "geometry" + "object": "Scrolling Contents Layer", + "reason": "background on scrolling contents layer" }, { "object": "LayoutView #document", - "reason": "geometry" + "reason": "incremental" }, { - "object": "LayoutBlockFlow HTML", + "object": "LayoutView #document", "reason": "geometry" }, { @@ -145,25 +146,30 @@ "layers": [ { "name": "LayoutView #document", - "bounds": [939, 235], + "bounds": [400, 250], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [400, 235], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [939, 235], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { "object": "LayoutView #document", "rect": [200, 0, 939, 235], - "reason": "geometry" + "reason": "background on scrolling contents layer" }, { "object": "LayoutView #document", "rect": [0, 0, 939, 235], - "reason": "full" - }, - { - "object": "LayoutView #document", - "rect": [0, 0, 939, 235], - "reason": "geometry" + "reason": "background on scrolling contents layer" }, { "object": "LayoutBlockFlow BODY", @@ -177,23 +183,13 @@ }, { "object": "LayoutText #text", - "rect": [209, 7, 921, 213], + "rect": [210, 7, 920, 213], "reason": "geometry" }, { "object": "LayoutText #text", - "rect": [9, 7, 921, 213], + "rect": [10, 7, 920, 213], "reason": "geometry" - }, - { - "object": "LayoutView #document", - "rect": [539, 235, 600, 15], - "reason": "scroll control" - }, - { - "object": "LayoutView #document", - "rect": [539, 235, 400, 15], - "reason": "scroll control" } ], "transform": 1 @@ -207,20 +203,21 @@ [0, 1, 0, 0], [0, 0, 1, 0], [-539, 0, 0, 1] - ] + ], + "flattenInheritedTransform": false } ], "objectPaintInvalidations": [ { - "object": "LayoutView #document", - "reason": "geometry" + "object": "Scrolling Contents Layer", + "reason": "background on scrolling contents layer" }, { "object": "LayoutView #document", - "reason": "geometry" + "reason": "incremental" }, { - "object": "LayoutBlockFlow HTML", + "object": "LayoutView #document", "reason": "geometry" }, { @@ -295,18 +292,23 @@ "name": "LayoutView #document", "bounds": [400, 600], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [400, 600], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [400, 600], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { "object": "LayoutView #document", - "rect": [0, 0, 939, 235], - "reason": "full" - }, - { - "object": "LayoutView #document", "rect": [-539, 0, 939, 235], - "reason": "geometry" + "reason": "background on scrolling contents layer" }, { "object": "LayoutBlockFlow BODY", @@ -315,18 +317,13 @@ }, { "object": "LayoutText #text", - "rect": [-530, 7, 921, 213], + "rect": [-529, 7, 920, 213], "reason": "geometry" }, { "object": "LayoutView #document", "rect": [0, 0, 400, 600], - "reason": "geometry" - }, - { - "object": "LayoutView #document", - "rect": [0, 235, 400, 15], - "reason": "scroll control" + "reason": "background on scrolling contents layer" }, { "object": "LayoutBlockFlow BODY", @@ -335,7 +332,7 @@ }, { "object": "LayoutText #text", - "rect": [38, 7, 353, 554], + "rect": [39, 7, 352, 563], "reason": "geometry" } ] @@ -343,15 +340,15 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutView #document", - "reason": "geometry" + "object": "Scrolling Contents Layer", + "reason": "background on scrolling contents layer" }, { "object": "LayoutView #document", - "reason": "geometry" + "reason": "incremental" }, { - "object": "LayoutBlockFlow HTML", + "object": "LayoutView #document", "reason": "geometry" }, { @@ -394,13 +391,23 @@ "name": "LayoutView #document", "bounds": [800, 600], "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [800, 600], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [800, 600], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "paintInvalidations": [ { "object": "LayoutView #document", "rect": [400, 0, 400, 600], - "reason": "incremental" + "reason": "background on scrolling contents layer" }, { "object": "LayoutBlockFlow BODY", @@ -414,12 +421,12 @@ }, { "object": "LayoutText #text", - "rect": [438, 7, 353, 554], + "rect": [439, 7, 352, 563], "reason": "geometry" }, { "object": "LayoutText #text", - "rect": [38, 7, 353, 554], + "rect": [39, 7, 352, 563], "reason": "geometry" } ] @@ -427,6 +434,10 @@ ], "objectPaintInvalidations": [ { + "object": "Scrolling Contents Layer", + "reason": "background on scrolling contents layer" + }, + { "object": "LayoutView #document", "reason": "incremental" },
diff --git a/third_party/WebKit/LayoutTests/virtual/picture-in-picture/external/wpt/feature-policy/README.txt b/third_party/WebKit/LayoutTests/virtual/picture-in-picture/external/wpt/feature-policy/README.txt new file mode 100644 index 0000000..72016a7 --- /dev/null +++ b/third_party/WebKit/LayoutTests/virtual/picture-in-picture/external/wpt/feature-policy/README.txt
@@ -0,0 +1 @@ +This suite runs Picture-in-Picture tests with PictureInPicture and UseSurfaceLayerForVideo features enabled.
diff --git a/third_party/WebKit/LayoutTests/virtual/picture-in-picture/external/wpt/picture-in-picture/README.txt b/third_party/WebKit/LayoutTests/virtual/picture-in-picture/external/wpt/picture-in-picture/README.txt new file mode 100644 index 0000000..72016a7 --- /dev/null +++ b/third_party/WebKit/LayoutTests/virtual/picture-in-picture/external/wpt/picture-in-picture/README.txt
@@ -0,0 +1 @@ +This suite runs Picture-in-Picture tests with PictureInPicture and UseSurfaceLayerForVideo features enabled.
diff --git a/third_party/WebKit/LayoutTests/virtual/picture-in-picture/media/picture-in-picture/README.txt b/third_party/WebKit/LayoutTests/virtual/picture-in-picture/media/picture-in-picture/README.txt new file mode 100644 index 0000000..72016a7 --- /dev/null +++ b/third_party/WebKit/LayoutTests/virtual/picture-in-picture/media/picture-in-picture/README.txt
@@ -0,0 +1 @@ +This suite runs Picture-in-Picture tests with PictureInPicture and UseSurfaceLayerForVideo features enabled.
diff --git a/third_party/WebKit/Source/core/BUILD.gn b/third_party/WebKit/Source/core/BUILD.gn index d152f1b2..f74c087 100644 --- a/third_party/WebKit/Source/core/BUILD.gn +++ b/third_party/WebKit/Source/core/BUILD.gn
@@ -2025,6 +2025,7 @@ "paint/BlockPainterTest.cpp", "paint/BoxPaintInvalidatorTest.cpp", "paint/CSSMaskPainterTest.cpp", + "paint/ClipPathClipperTest.cpp", "paint/FirstMeaningfulPaintDetectorTest.cpp", "paint/FragmentDataTest.cpp", "paint/HTMLCanvasPainterTest.cpp",
diff --git a/third_party/WebKit/Source/core/DEPS b/third_party/WebKit/Source/core/DEPS index af0b8cd..44bc5784 100644 --- a/third_party/WebKit/Source/core/DEPS +++ b/third_party/WebKit/Source/core/DEPS
@@ -17,7 +17,6 @@ "+public/common", "+public/mojom", "+public/platform", - "+public/public_features.h", "+public/web", "+services/metrics/public", "+services/network/public/cpp/features.h",
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp index e77e8b9..2628a29 100644 --- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp +++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -1272,9 +1272,9 @@ HTMLElement* CreateDefaultParagraphElement(Document& document) { switch (document.GetFrame()->GetEditor().DefaultParagraphSeparator()) { - case kEditorParagraphSeparatorIsDiv: + case EditorParagraphSeparator::kIsDiv: return HTMLDivElement::Create(document); - case kEditorParagraphSeparatorIsP: + case EditorParagraphSeparator::kIsP: return HTMLParagraphElement::Create(document); }
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.h b/third_party/WebKit/Source/core/editing/EditingUtilities.h index cfd9307..1372329b 100644 --- a/third_party/WebKit/Source/core/editing/EditingUtilities.h +++ b/third_party/WebKit/Source/core/editing/EditingUtilities.h
@@ -340,17 +340,6 @@ return c == ' ' || c == '\n'; } -inline bool IsAmbiguousBoundaryCharacter(UChar character) { - // These are characters that can behave as word boundaries, but can appear - // within words. If they are just typed, i.e. if they are immediately followed - // by a caret, we want to delay text checking until the next character has - // been typed. - // FIXME: this is required until 6853027 is fixed and text checking can do - // this for us. - return character == '\'' || character == kRightSingleQuotationMarkCharacter || - character == kHebrewPunctuationGershayimCharacter; -} - String StringWithRebalancedWhitespace(const String&, bool start_is_start_of_paragraph, bool should_emit_nbs_pbefore_end);
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp index 3051726..7eb62e8 100644 --- a/third_party/WebKit/Source/core/editing/Editor.cpp +++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -462,14 +462,14 @@ should_style_with_css_(false), kill_ring_(WTF::WrapUnique(new KillRing)), are_marked_text_matches_highlighted_(false), - default_paragraph_separator_(kEditorParagraphSeparatorIsDiv), + default_paragraph_separator_(EditorParagraphSeparator::kIsDiv), overwrite_mode_enabled_(false) {} Editor::~Editor() = default; void Editor::Clear() { should_style_with_css_ = false; - default_paragraph_separator_ = kEditorParagraphSeparatorIsDiv; + default_paragraph_separator_ = EditorParagraphSeparator::kIsDiv; last_edit_command_ = nullptr; undo_stack_->Clear(); }
diff --git a/third_party/WebKit/Source/core/editing/Editor.h b/third_party/WebKit/Source/core/editing/Editor.h index ab295bf..08564611 100644 --- a/third_party/WebKit/Source/core/editing/Editor.h +++ b/third_party/WebKit/Source/core/editing/Editor.h
@@ -60,12 +60,9 @@ enum class DeleteMode { kSimple, kSmart }; enum class InsertMode { kSimple, kSmart }; enum class DragSourceType { kHTMLSource, kPlainTextSource }; +enum class EditorParagraphSeparator { kIsDiv, kIsP }; enum EditorCommandSource { kCommandFromMenuOrKeyBinding, kCommandFromDOM }; -enum EditorParagraphSeparator { - kEditorParagraphSeparatorIsDiv, - kEditorParagraphSeparatorIsP -}; class CORE_EXPORT Editor final : public GarbageCollectedFinalized<Editor> { public:
diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp index 88606d4..ed6bbf1d0 100644 --- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp +++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
@@ -949,13 +949,15 @@ Event*, EditorCommandSource, const String& value) { - if (DeprecatedEqualIgnoringCase(value, "div")) + if (DeprecatedEqualIgnoringCase(value, "div")) { frame.GetEditor().SetDefaultParagraphSeparator( - kEditorParagraphSeparatorIsDiv); - else if (DeprecatedEqualIgnoringCase(value, "p")) + EditorParagraphSeparator::kIsDiv); + return true; + } + if (DeprecatedEqualIgnoringCase(value, "p")) { frame.GetEditor().SetDefaultParagraphSeparator( - kEditorParagraphSeparatorIsP); - + EditorParagraphSeparator::kIsP); + } return true; } @@ -2926,9 +2928,9 @@ LocalFrame& frame, Event*) { switch (frame.GetEditor().DefaultParagraphSeparator()) { - case kEditorParagraphSeparatorIsDiv: + case EditorParagraphSeparator::kIsDiv: return divTag.LocalName(); - case kEditorParagraphSeparatorIsP: + case EditorParagraphSeparator::kIsP: return pTag.LocalName(); }
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp index 9c9c691..9632b55 100644 --- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp +++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
@@ -66,6 +66,17 @@ return IsSpaceOrNewline(c) || WTF::Unicode::IsPunct(c); } +bool IsAmbiguousBoundaryCharacter(UChar character) { + // These are characters that can behave as word boundaries, but can appear + // within words. If they are just typed, i.e. if they are immediately followed + // by a caret, we want to delay text checking until the next character has + // been typed. + // FIXME: this is required until 6853027 is fixed and text checking can do + // this for us. + return character == '\'' || character == kRightSingleQuotationMarkCharacter || + character == kHebrewPunctuationGershayimCharacter; +} + } // namespace SpellChecker* SpellChecker::Create(LocalFrame& frame) {
diff --git a/third_party/WebKit/Source/core/exported/BUILD.gn b/third_party/WebKit/Source/core/exported/BUILD.gn index 648eb273..2881e10 100644 --- a/third_party/WebKit/Source/core/exported/BUILD.gn +++ b/third_party/WebKit/Source/core/exported/BUILD.gn
@@ -82,6 +82,7 @@ "WebSharedWorkerImpl.cpp", "WebSharedWorkerImpl.h", "WebSurroundingText.cpp", + "WebTappedInfo.cpp", "WebTextCheckingResult.cpp", "WebUserGestureIndicator.cpp", "WebUserGestureToken.cpp",
diff --git a/third_party/WebKit/Source/core/exported/LocalFrameClientImpl.cpp b/third_party/WebKit/Source/core/exported/LocalFrameClientImpl.cpp index 8553af6..0ee2408 100644 --- a/third_party/WebKit/Source/core/exported/LocalFrameClientImpl.cpp +++ b/third_party/WebKit/Source/core/exported/LocalFrameClientImpl.cpp
@@ -103,10 +103,6 @@ namespace { -// Print up to |kMaxCertificateWarningMessages| console messages per frame -// about certificates that will be distrusted in future. -const uint32_t kMaxCertificateWarningMessages = 10; - // Convenience helper for frame tree helpers in FrameClient to reduce the amount // of null-checking boilerplate code. Since the frame tree is maintained in the // web/ layer, the frame tree helpers often have to deal with null WebFrames: @@ -145,7 +141,7 @@ } // namespace LocalFrameClientImpl::LocalFrameClientImpl(WebLocalFrameImpl* frame) - : web_frame_(frame), num_certificate_warning_messages_(0) {} + : web_frame_(frame) {} LocalFrameClientImpl* LocalFrameClientImpl::Create(WebLocalFrameImpl* frame) { return new LocalFrameClientImpl(frame); @@ -452,10 +448,6 @@ dev_tools->DidCommitLoadForLocalFrame(web_frame_->GetFrame()); virtual_time_pauser_.PauseVirtualTime(false); - - // Reset certificate warning state that prevents log spam. - num_certificate_warning_messages_ = 0; - certificate_warning_hosts_.clear(); } void LocalFrameClientImpl::DispatchDidFailProvisionalLoad( @@ -717,77 +709,8 @@ void LocalFrameClientImpl::ReportLegacySymantecCert(const KURL& url, bool did_fail) { - // To prevent log spam, only log the message once per hostname. - if (certificate_warning_hosts_.Contains(url.Host())) - return; - - // After |kMaxCertificateWarningMessages| warnings, stop printing messages to - // the console. At exactly |kMaxCertificateWarningMessages| warnings, print a - // message that additional resources on the page use legacy certificates - // without specifying which exact resources. Before - // |kMaxCertificateWarningMessages| messages, print the exact resource URL in - // the message to help the developer pinpoint the problematic resources. - - if (num_certificate_warning_messages_ > kMaxCertificateWarningMessages) - return; - - WebString console_message; - - if (num_certificate_warning_messages_ == kMaxCertificateWarningMessages) { - if (did_fail) { - console_message = - WebString(String("Additional resources on this page were loaded with " - "SSL certificates that have been " - "distrusted. See " - "https://g.co/chrome/symantecpkicerts for " - "more information.")); - } else { - console_message = - WebString(String("Additional resources on this page were loaded with " - "SSL certificates that will be " - "distrusted in the future. " - "Once distrusted, users will be prevented from " - "loading these resources. See " - "https://g.co/chrome/symantecpkicerts for " - "more information.")); - } - } else { - // The embedder is given a chance to override the message for certs that - // will be distrusted in future, but not for certs that have already been - // distrusted. (This is because there is no embedder-specific release - // information in the message for certs that have already been distrusted.) - if (did_fail) { - console_message = WebString(String::Format( - "The SSL certificate used to load resources from %s" - " has been distrusted. See " - "https://g.co/chrome/symantecpkicerts for " - "more information.", - SecurityOrigin::Create(url)->ToString().Utf8().data())); - } else if (!web_frame_->Client()->OverrideLegacySymantecCertConsoleMessage( - url, &console_message)) { - console_message = WebString(String::Format( - "The SSL certificate used to load resources from %s" - " will be " - "distrusted in the future. " - "Once distrusted, users will be prevented from " - "loading these resources. See " - "https://g.co/chrome/symantecpkicerts for " - "more information.", - SecurityOrigin::Create(url)->ToString().Utf8().data())); - } - } - num_certificate_warning_messages_++; - certificate_warning_hosts_.insert(url.Host()); - // To avoid spamming the console, use Verbose message level for subframe - // resources for certificates that will be distrusted in future, and only use - // the warning level for main-frame resources or resources that have already - // been distrusted. - web_frame_->GetFrame()->GetDocument()->AddConsoleMessage( - ConsoleMessage::Create(kSecurityMessageSource, - (web_frame_->Parent() && !did_fail) - ? kVerboseMessageLevel - : kWarningMessageLevel, - console_message)); + if (web_frame_->Client()) + web_frame_->Client()->ReportLegacySymantecCert(url, did_fail); } void LocalFrameClientImpl::DidChangePerformanceTiming() {
diff --git a/third_party/WebKit/Source/core/exported/LocalFrameClientImpl.h b/third_party/WebKit/Source/core/exported/LocalFrameClientImpl.h index 897fda8..dad881b 100644 --- a/third_party/WebKit/Source/core/exported/LocalFrameClientImpl.h +++ b/third_party/WebKit/Source/core/exported/LocalFrameClientImpl.h
@@ -286,12 +286,6 @@ String user_agent_; - // Used to cap the number of console messages that are printed to warn about - // legacy certificates that will be distrusted in future. - uint32_t num_certificate_warning_messages_; - // The hosts for which a legacy certificate warning has been printed. - HashSet<String> certificate_warning_hosts_; - mutable WebScopedVirtualTimePauser virtual_time_pauser_; };
diff --git a/third_party/WebKit/Source/core/exported/WebTappedInfo.cpp b/third_party/WebKit/Source/core/exported/WebTappedInfo.cpp new file mode 100644 index 0000000..7e027b2e --- /dev/null +++ b/third_party/WebKit/Source/core/exported/WebTappedInfo.cpp
@@ -0,0 +1,32 @@ +// 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 "public/web/WebTappedInfo.h" + +#include "core/dom/Node.h" + +namespace blink { + +WebTappedInfo::WebTappedInfo(bool dom_tree_changed, + bool style_changed, + Node* tapped_node, + IntPoint tapped_position_in_viewport) + : point_(WebPoint(tapped_position_in_viewport.X(), + tapped_position_in_viewport.Y())), + web_node_(tapped_node), + page_changed_(dom_tree_changed || style_changed) {} + +const WebPoint& WebTappedInfo::Position() const { + return point_; +} + +const WebNode& WebTappedInfo::GetNode() const { + return web_node_; +} + +bool WebTappedInfo::PageChanged() const { + return page_changed_; +} + +} // namespace blink
diff --git a/third_party/WebKit/Source/core/exported/WebViewTest.cpp b/third_party/WebKit/Source/core/exported/WebViewTest.cpp index 81f929f6..55aebc5 100644 --- a/third_party/WebKit/Source/core/exported/WebViewTest.cpp +++ b/third_party/WebKit/Source/core/exported/WebViewTest.cpp
@@ -102,7 +102,6 @@ #include "public/platform/WebSize.h" #include "public/platform/WebThread.h" #include "public/platform/WebURLLoaderMockFactory.h" -#include "public/public_features.h" #include "public/web/WebAutofillClient.h" #include "public/web/WebConsoleMessage.h" #include "public/web/WebDateTimeChooserCompletion.h" @@ -117,6 +116,7 @@ #include "public/web/WebPrintParams.h" #include "public/web/WebScriptSource.h" #include "public/web/WebSettings.h" +#include "public/web/WebTappedInfo.h" #include "public/web/WebTreeScopeType.h" #include "public/web/WebViewClient.h" #include "public/web/WebWidget.h" @@ -131,12 +131,6 @@ #include "public/web/mac/WebSubstringUtil.h" #endif -#if BUILDFLAG(ENABLE_UNHANDLED_TAP) -#include "mojo/public/cpp/bindings/strong_binding.h" -#include "platform/testing/TestingPlatformSupport.h" -#include "public/platform/unhandled_tap_notifier.mojom-blink.h" -#endif // BUILDFLAG(ENABLE_UNHANDLED_TAP) - using blink::FrameTestHelpers::LoadFrame; using blink::URLTestHelpers::ToKURL; using blink::URLTestHelpers::RegisterMockedURLLoad; @@ -4330,199 +4324,187 @@ EXPECT_EQ(200, size.width); } -#if BUILDFLAG(ENABLE_UNHANDLED_TAP) - -// Helps set up any test that uses a mock Mojo implementation. -class MojoTestHelper { +class UnhandledTapWebViewClient : public FrameTestHelpers::TestWebViewClient { public: - MojoTestHelper(const String& test_file, - FrameTestHelpers::WebViewHelper& web_view_helper) - : web_view_helper_(web_view_helper) { - web_view_ = web_view_helper.InitializeAndLoad( - WebString(test_file).Utf8(), &web_frame_client_, &web_view_client_); + void ShowUnhandledTapUIIfNeeded(const WebTappedInfo& tapped_info) override { + was_called_ = true; + tapped_position_ = tapped_info.Position(); + tapped_node_ = tapped_info.GetNode(); + page_changed_ = tapped_info.PageChanged(); } - ~MojoTestHelper() { - web_view_helper_.Reset(); // Remove dependency on locally scoped client. - } - // Bind the test API to a service with the given |name| and repeating Bind - // method given by |callback|. - void BindTestApi( - const String& name, - base::RepeatingCallback<void(mojo::ScopedMessagePipeHandle)> callback) { - // Set up our Mock Mojo API. - test_api_.reset(new service_manager::InterfaceProvider::TestApi( - web_frame_client_.GetInterfaceProvider())); - test_api_->SetBinderForName(WebString(name).Utf8(), callback); - } - WebViewImpl* WebView() const { return web_view_; } - - private: - WebViewImpl* web_view_; - FrameTestHelpers::WebViewHelper& web_view_helper_; - FrameTestHelpers::TestWebFrameClient web_frame_client_; - FrameTestHelpers::TestWebViewClient web_view_client_; - std::unique_ptr<service_manager::InterfaceProvider::TestApi> test_api_; -}; - -// Mock implementation of the UnhandledTapNotifier Mojo receiver, for testing -// the ShowUnhandledTapUIIfNeeded notification. -class MockUnhandledTapNotifierImpl : public mojom::blink::UnhandledTapNotifier { - public: - MockUnhandledTapNotifierImpl() : binding_(this) {} - ~MockUnhandledTapNotifierImpl() = default; - - void Bind(mojo::ScopedMessagePipeHandle handle) { - binding_.Bind(mojom::blink::UnhandledTapNotifierRequest(std::move(handle))); - } - - void ShowUnhandledTapUIIfNeeded( - mojom::blink::UnhandledTapInfoPtr unhandled_tap_info) override { - was_unhandled_tap_ = true; - tapped_position_ = unhandled_tap_info->tapped_position_in_viewport; - } - bool WasUnhandledTap() const { return was_unhandled_tap_; } + bool GetWasCalled() const { return was_called_; } int GetTappedXPos() const { return tapped_position_.X(); } int GetTappedYPos() const { return tapped_position_.Y(); } + bool IsTappedNodeNull() const { return tapped_node_.IsNull(); } + const WebNode& GetWebNode() const { return tapped_node_; } + bool GetPageChanged() const { return page_changed_; } void Reset() { - was_unhandled_tap_ = false; + was_called_ = false; tapped_position_ = IntPoint(); - binding_.Close(); + tapped_node_ = WebNode(); + page_changed_ = false; } private: - bool was_unhandled_tap_ = false; + bool was_called_ = false; IntPoint tapped_position_; - - mojo::Binding<mojom::blink::UnhandledTapNotifier> binding_; + WebNode tapped_node_; + bool page_changed_ = false; }; -// A Test Fixture for testing ShowUnhandledTapUIIfNeeded usages. -class ShowUnhandledTapTest : public WebViewTest { - public: - void SetUp() override { - WebViewTest::SetUp(); - std::string test_file = "show_unhandled_tap.html"; - RegisterMockedHttpURLLoad("Ahem.ttf"); - RegisterMockedHttpURLLoad(test_file); +TEST_P(WebViewTest, ShowUnhandledTapUIIfNeeded) { + std::string test_file = "show_unhandled_tap.html"; + RegisterMockedHttpURLLoad("Ahem.ttf"); + RegisterMockedHttpURLLoad(test_file); + UnhandledTapWebViewClient client; + WebViewImpl* web_view = web_view_helper_.InitializeAndLoad( + base_url_ + test_file, nullptr, &client); + web_view->Resize(WebSize(500, 300)); + web_view->UpdateAllLifecyclePhases(); + RunPendingTasks(); - mojo_test_helper_.reset(new MojoTestHelper( - WebString::FromUTF8(base_url_ + test_file), web_view_helper_)); - - web_view_ = mojo_test_helper_->WebView(); - web_view_->Resize(WebSize(500, 300)); - web_view_->UpdateAllLifecyclePhases(); - RunPendingTasks(); - - mojo_test_helper_->BindTestApi( - mojom::blink::UnhandledTapNotifier::Name_, - WTF::BindRepeating(&MockUnhandledTapNotifierImpl::Bind, - WTF::Unretained(&mock_notifier_))); - } - - protected: - // Tap on the given element by ID. - void Tap(const String& element_id) { - mock_notifier_.Reset(); - EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, element_id)); - } - - // Set up a test script for the given |operation| with the given |handler|. - void SetTestScript(const String& operation, const String& handler) { - String test_key = operation + "-" + handler; - web_view_->MainFrameImpl()->ExecuteScript( - WebScriptSource(String("setTest('" + test_key + "');"))); - } - - // Test each mouse event combination with the given |handler|, and verify the - // |expected| outcome. - void TestEachMouseEvent(const String& handler, bool expected) { - SetTestScript("mousedown", handler); - Tap("target"); - EXPECT_EQ(expected, mock_notifier_.WasUnhandledTap()); - - SetTestScript("mouseup", handler); - Tap("target"); - EXPECT_EQ(expected, mock_notifier_.WasUnhandledTap()); - - SetTestScript("click", handler); - Tap("target"); - EXPECT_EQ(expected, mock_notifier_.WasUnhandledTap()); - } - - WebViewImpl* web_view_; - MockUnhandledTapNotifierImpl mock_notifier_; - - private: - std::unique_ptr<MojoTestHelper> mojo_test_helper_; -}; - -INSTANTIATE_TEST_CASE_P(All, ShowUnhandledTapTest, ::testing::Bool()); - -TEST_P(ShowUnhandledTapTest, ShowUnhandledTapUIIfNeeded) { // Scroll the bottom into view so we can distinguish window coordinates from // document coordinates. - Tap("bottom"); - EXPECT_TRUE(mock_notifier_.WasUnhandledTap()); - EXPECT_EQ(64, mock_notifier_.GetTappedXPos()); - EXPECT_EQ(278, mock_notifier_.GetTappedYPos()); + EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, + WebString::FromUTF8("bottom"))); + EXPECT_TRUE(client.GetWasCalled()); + EXPECT_EQ(64, client.GetTappedXPos()); + EXPECT_EQ(278, client.GetTappedYPos()); + EXPECT_FALSE(client.IsTappedNodeNull()); + EXPECT_TRUE(client.GetWebNode().IsTextNode()); // Test basic tap handling and notification. - Tap("target"); - EXPECT_TRUE(mock_notifier_.WasUnhandledTap()); - EXPECT_EQ(144, mock_notifier_.GetTappedXPos()); - EXPECT_EQ(82, mock_notifier_.GetTappedYPos()); + client.Reset(); + EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, + WebString::FromUTF8("target"))); + EXPECT_TRUE(client.GetWasCalled()); + EXPECT_EQ(144, client.GetTappedXPos()); + EXPECT_EQ(82, client.GetTappedYPos()); + EXPECT_FALSE(client.IsTappedNodeNull()); + EXPECT_TRUE(client.GetWebNode().IsTextNode()); + // Make sure the returned text node has the parent element that was our + // target. + EXPECT_EQ(web_view->MainFrameImpl()->GetDocument().GetElementById("target"), + client.GetWebNode().ParentNode()); // Test correct conversion of coordinates to viewport space under pinch-zoom. - web_view_->SetPageScaleFactor(2); - web_view_->SetVisualViewportOffset(WebFloatPoint(50, 20)); + web_view->SetPageScaleFactor(2); + web_view->SetVisualViewportOffset(WebFloatPoint(50, 20)); + client.Reset(); + EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, + WebString::FromUTF8("target"))); + EXPECT_TRUE(client.GetWasCalled()); + EXPECT_EQ(188, client.GetTappedXPos()); + EXPECT_EQ(124, client.GetTappedYPos()); - Tap("target"); - EXPECT_TRUE(mock_notifier_.WasUnhandledTap()); - EXPECT_EQ(188, mock_notifier_.GetTappedXPos()); - EXPECT_EQ(124, mock_notifier_.GetTappedYPos()); + web_view_helper_.Reset(); // Remove dependency on locally scoped client. } -TEST_P(ShowUnhandledTapTest, ShowUnhandledTapUIIfNeededWithMutateDom) { +#define TEST_EACH_MOUSEEVENT(handler, EXPECT) \ + frame->ExecuteScript(WebScriptSource("setTest('mousedown-" handler "');")); \ + EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, \ + WebString::FromUTF8("target"))); \ + EXPECT_##EXPECT(client.GetPageChanged()); \ + client.Reset(); \ + frame->ExecuteScript(WebScriptSource("setTest('mouseup-" handler "');")); \ + EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, \ + WebString::FromUTF8("target"))); \ + EXPECT_##EXPECT(client.GetPageChanged()); \ + client.Reset(); \ + frame->ExecuteScript(WebScriptSource("setTest('mousemove-" handler "');")); \ + EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, \ + WebString::FromUTF8("target"))); \ + EXPECT_##EXPECT(client.GetPageChanged()); \ + client.Reset(); \ + frame->ExecuteScript(WebScriptSource("setTest('click-" handler "');")); \ + EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, \ + WebString::FromUTF8("target"))); \ + EXPECT_##EXPECT(client.GetPageChanged()); + +TEST_P(WebViewTest, ShowUnhandledTapUIIfNeededWithMutateDom) { + std::string test_file = "show_unhandled_tap.html"; + RegisterMockedHttpURLLoad("Ahem.ttf"); + RegisterMockedHttpURLLoad(test_file); + UnhandledTapWebViewClient client; + WebViewImpl* web_view = web_view_helper_.InitializeAndLoad( + base_url_ + test_file, nullptr, &client); + web_view->Resize(WebSize(500, 300)); + web_view->UpdateAllLifecyclePhases(); + RunPendingTasks(); + WebLocalFrameImpl* frame = web_view->MainFrameImpl(); + // Test dom mutation. - TestEachMouseEvent("mutateDom", FALSE); + TEST_EACH_MOUSEEVENT("mutateDom", TRUE); // Test without any DOM mutation. - TestEachMouseEvent("none", TRUE); + client.Reset(); + frame->ExecuteScript(WebScriptSource("setTest('none');")); + EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, + WebString::FromUTF8("target"))); + EXPECT_FALSE(client.GetPageChanged()); + + web_view_helper_.Reset(); // Remove dependency on locally scoped client. } -TEST_P(ShowUnhandledTapTest, ShowUnhandledTapUIIfNeededWithMutateStyle) { +TEST_P(WebViewTest, ShowUnhandledTapUIIfNeededWithMutateStyle) { + std::string test_file = "show_unhandled_tap.html"; + RegisterMockedHttpURLLoad("Ahem.ttf"); + RegisterMockedHttpURLLoad(test_file); + UnhandledTapWebViewClient client; + WebViewImpl* web_view = web_view_helper_.InitializeAndLoad( + base_url_ + test_file, nullptr, &client); + web_view->Resize(WebSize(500, 300)); + web_view->UpdateAllLifecyclePhases(); + RunPendingTasks(); + WebLocalFrameImpl* frame = web_view->MainFrameImpl(); + // Test style mutation. - TestEachMouseEvent("mutateStyle", FALSE); + TEST_EACH_MOUSEEVENT("mutateStyle", TRUE); // Test checkbox:indeterminate style mutation. - TestEachMouseEvent("mutateIndeterminate", FALSE); + TEST_EACH_MOUSEEVENT("mutateIndeterminate", TRUE); - // Test click div with :active style. - Tap("style_active"); - EXPECT_FALSE(mock_notifier_.WasUnhandledTap()); + // Test click div with :active style but it is not covered for now. + client.Reset(); + EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, + WebString::FromUTF8("style_active"))); + EXPECT_FALSE(client.GetPageChanged()); + + // Test without any style mutation. + client.Reset(); + frame->ExecuteScript(WebScriptSource("setTest('none');")); + EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, + WebString::FromUTF8("target"))); + EXPECT_FALSE(client.GetPageChanged()); + + web_view_helper_.Reset(); // Remove dependency on locally scoped client. } -TEST_P(ShowUnhandledTapTest, ShowUnhandledTapUIIfNeededWithPreventDefault) { - // Test swallowing. - TestEachMouseEvent("preventDefault", FALSE); +TEST_P(WebViewTest, ShowUnhandledTapUIIfNeededWithPreventDefault) { + std::string test_file = "show_unhandled_tap.html"; + RegisterMockedHttpURLLoad("Ahem.ttf"); + RegisterMockedHttpURLLoad(test_file); + UnhandledTapWebViewClient client; + WebViewImpl* web_view = web_view_helper_.InitializeAndLoad( + base_url_ + test_file, nullptr, &client); + web_view->Resize(WebSize(500, 300)); + web_view->UpdateAllLifecyclePhases(); + RunPendingTasks(); + WebLocalFrameImpl* frame = web_view->MainFrameImpl(); + + // Testswallowing. + TEST_EACH_MOUSEEVENT("preventDefault", FALSE); // Test without any preventDefault. - TestEachMouseEvent("none", TRUE); + client.Reset(); + frame->ExecuteScript(WebScriptSource("setTest('none');")); + EXPECT_TRUE(TapElementById(WebInputEvent::kGestureTap, + WebString::FromUTF8("target"))); + EXPECT_TRUE(client.GetWasCalled()); + + web_view_helper_.Reset(); // Remove dependency on locally scoped client. } -TEST_P(ShowUnhandledTapTest, ShowUnhandledTapUIIfNeededWithNonTriggeringNodes) { - Tap("checkbox"); - EXPECT_FALSE(mock_notifier_.WasUnhandledTap()); - - Tap("editable"); - EXPECT_FALSE(mock_notifier_.WasUnhandledTap()); - - Tap("focusable"); - EXPECT_FALSE(mock_notifier_.WasUnhandledTap()); -} - -#endif // BUILDFLAG(ENABLE_UNHANDLED_TAP) - TEST_P(WebViewTest, StopLoadingIfJavaScriptURLReturnsNoStringResult) { ViewCreatingWebViewClient client; FrameTestHelpers::WebViewHelper main_web_view;
diff --git a/third_party/WebKit/Source/core/input/EventHandlerTest.cpp b/third_party/WebKit/Source/core/input/EventHandlerTest.cpp index 49decb1..dc00bfd 100644 --- a/third_party/WebKit/Source/core/input/EventHandlerTest.cpp +++ b/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
@@ -37,7 +37,7 @@ ShadowRoot* SetShadowContent(const char* shadow_content, const char* host); }; -class EventHandlerIFrameTest : public SimTest {}; +class EventHandlerSimTest : public SimTest {}; class TapEventBuilder : public WebGestureEvent { public: @@ -1047,7 +1047,7 @@ // Test that leaving an iframe sets the mouse position to unknown on that // iframe. -TEST_F(EventHandlerIFrameTest, MouseLeaveResets) { +TEST_F(EventHandlerSimTest, MouseLeaveIFrameResets) { WebView().Resize(WebSize(800, 600)); SimRequest main_resource("https://example.com/test.html", "text/html"); @@ -1110,4 +1110,47 @@ .IsMousePositionUnknown()); } +// Test that mouse down and move a small distance on a draggable element will +// not change cursor style. +TEST_F(EventHandlerSimTest, CursorStyleBeforeStartDragging) { + WebView().Resize(WebSize(800, 600)); + SimRequest request("https://example.com/test.html", "text/html"); + LoadURL("https://example.com/test.html"); + request.Complete(R"HTML( + <!DOCTYPE html> + <style> + div { + width: 300px; + height: 100px; + cursor: help; + } + </style> + <div draggable='true'>foo</div> + )HTML"); + Compositor().BeginFrame(); + + WebMouseEvent mouse_down_event(WebMouseEvent::kMouseDown, + WebFloatPoint(150, 50), WebFloatPoint(150, 50), + WebPointerProperties::Button::kLeft, 1, + WebInputEvent::Modifiers::kLeftButtonDown, + WebInputEvent::GetStaticTimeStampForTests()); + mouse_down_event.SetFrameScale(1); + GetDocument().GetFrame()->GetEventHandler().HandleMousePressEvent( + mouse_down_event); + + WebMouseEvent mouse_move_event(WebMouseEvent::kMouseMove, + WebFloatPoint(151, 50), WebFloatPoint(151, 50), + WebPointerProperties::Button::kLeft, 1, + WebInputEvent::Modifiers::kLeftButtonDown, + WebInputEvent::GetStaticTimeStampForTests()); + mouse_move_event.SetFrameScale(1); + GetDocument().GetFrame()->GetEventHandler().HandleMouseMoveEvent( + mouse_move_event, Vector<WebMouseEvent>()); + EXPECT_EQ(Cursor::Type::kHelp, GetDocument() + .GetFrame() + ->GetChromeClient() + .LastSetCursorForTesting() + .GetType()); +} + } // namespace blink
diff --git a/third_party/WebKit/Source/core/input/GestureManager.cpp b/third_party/WebKit/Source/core/input/GestureManager.cpp index 7d88b7b6..830072a 100644 --- a/third_party/WebKit/Source/core/input/GestureManager.cpp +++ b/third_party/WebKit/Source/core/input/GestureManager.cpp
@@ -18,14 +18,7 @@ #include "core/input/InputDeviceCapabilities.h" #include "core/page/ChromeClient.h" #include "core/page/Page.h" -#include "public/public_features.h" - -#if BUILDFLAG(ENABLE_UNHANDLED_TAP) -#include "core/frame/LocalFrameClient.h" -#include "public/platform/unhandled_tap_notifier.mojom-blink.h" -#include "public/web/WebNode.h" -#include "services/service_manager/public/cpp/interface_provider.h" -#endif // BUILDFLAG(ENABLE_UNHANDLED_TAP) +#include "public/web/WebTappedInfo.h" namespace blink { @@ -309,8 +302,9 @@ IntPoint tapped_position_in_viewport = frame_->GetPage()->GetVisualViewport().RootFrameToViewport( tapped_position); - ShowUnhandledTapUIIfNeeded(dom_tree_changed, style_changed, tapped_node, - tapped_position_in_viewport); + WebTappedInfo tapped_info(dom_tree_changed, style_changed, tapped_node, + tapped_position_in_viewport); + frame_->GetChromeClient().ShowUnhandledTapUIIfNeeded(tapped_info); } return event_result; } @@ -443,29 +437,4 @@ return last_show_press_timestamp_; } -void GestureManager::ShowUnhandledTapUIIfNeeded( - bool dom_tree_changed, - bool style_changed, - Node* tapped_node, - const IntPoint& tapped_position_in_viewport) { -#if BUILDFLAG(ENABLE_UNHANDLED_TAP) - WebNode web_node(tapped_node); - bool should_trigger = !dom_tree_changed && !style_changed && - tapped_node->IsTextNode() && - !web_node.IsContentEditable() && - !web_node.IsInsideFocusableElementOrARIAWidget(); - // Renderer-side trigger-filtering to minimize messaging. - // The Browser may do additional trigger-filtering. - if (should_trigger) { - WebPoint point(tapped_position_in_viewport.X(), - tapped_position_in_viewport.Y()); - auto tapped_info = mojom::blink::UnhandledTapInfo::New(point); - mojom::blink::UnhandledTapNotifierPtr provider; - frame_->Client()->GetInterfaceProvider()->GetInterface( - mojo::MakeRequest(&provider)); - provider->ShowUnhandledTapUIIfNeeded(std::move(tapped_info)); - } -#endif // BUILDFLAG(ENABLE_UNHANDLED_TAP) -} - } // namespace blink
diff --git a/third_party/WebKit/Source/core/input/GestureManager.h b/third_party/WebKit/Source/core/input/GestureManager.h index e14889d7..b4f5b84 100644 --- a/third_party/WebKit/Source/core/input/GestureManager.h +++ b/third_party/WebKit/Source/core/input/GestureManager.h
@@ -16,7 +16,6 @@ namespace blink { -class IntPoint; class ScrollManager; class SelectionController; class PointerEventManager; @@ -60,11 +59,6 @@ WebInputEventResult SendContextMenuEventForGesture( const GestureEventWithHitTestResults&); - // Shows the Unhandled Tap UI if needed. - void ShowUnhandledTapUIIfNeeded(bool dom_tree_changed, - bool style_changed, - Node* tapped_node, - const IntPoint& tapped_position_in_viewport); // NOTE: If adding a new field to this class please ensure that it is // cleared if needed in |GestureManager::clear()|.
diff --git a/third_party/WebKit/Source/core/input/MouseEventManager.cpp b/third_party/WebKit/Source/core/input/MouseEventManager.cpp index 447d623c..c4c6526 100644 --- a/third_party/WebKit/Source/core/input/MouseEventManager.cpp +++ b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
@@ -889,11 +889,6 @@ !mouse_down_may_start_autoscroll_; } - // We are starting a text/image/url drag, so the cursor should be an arrow - // FIXME <rdar://7577595>: Custom cursors aren't supported during drag and - // drop (default to pointer). - frame_->View()->SetCursor(PointerCursor()); - if (initiator == DragInitiator::kMouse && !DragThresholdExceeded( FlooredIntPoint(event.Event().PositionInRootFrame()))) {
diff --git a/third_party/WebKit/Source/core/inspector/browser_protocol.json b/third_party/WebKit/Source/core/inspector/browser_protocol.json index 6b409ec1..c67b21d 100644 --- a/third_party/WebKit/Source/core/inspector/browser_protocol.json +++ b/third_party/WebKit/Source/core/inspector/browser_protocol.json
@@ -5344,6 +5344,18 @@ ] }, { + "name": "enterDeterministicMode", + "description": "Puts the browser into deterministic mode. Only effective for subsequently created web contents.\nOnly supported in headless mode. Once set there's no way of leaving deterministic mode.", + "parameters": [ + { + "name": "initialDate", + "description": "Number of seconds since the Epoch", + "optional": true, + "type": "number" + } + ] + }, + { "name": "disable", "description": "Disables headless events for the target." }, @@ -12424,4 +12436,4 @@ ] } ] -} \ No newline at end of file +}
diff --git a/third_party/WebKit/Source/core/inspector/browser_protocol.pdl b/third_party/WebKit/Source/core/inspector/browser_protocol.pdl index e6af0ff5..d5f1c36 100644 --- a/third_party/WebKit/Source/core/inspector/browser_protocol.pdl +++ b/third_party/WebKit/Source/core/inspector/browser_protocol.pdl
@@ -2441,6 +2441,13 @@ # Base64-encoded image data of the screenshot, if one was requested and successfully taken. optional string screenshotData + # Puts the browser into deterministic mode. Only effective for subsequently created web contents. + # Only supported in headless mode. Once set there's no way of leaving deterministic mode. + command enterDeterministicMode + parameters + # Number of seconds since the Epoch + optional number initialDate + # Disables headless events for the target. command disable
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp index bf2e665..a72cf3d 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -6012,8 +6012,8 @@ auto& rare_data = GetLayoutBox().EnsureRareData(); rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true; rare_data.previous_content_box_size_ = GetLayoutBox().ContentSize(); - rare_data.previous_layout_overflow_rect_ = - GetLayoutBox().LayoutOverflowRect(); + rare_data.previous_physical_layout_overflow_rect_ = + GetLayoutBox().PhysicalLayoutOverflowRect(); } } // namespace blink
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.h b/third_party/WebKit/Source/core/layout/LayoutBox.h index c6c5b26d..714c1af9 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBox.h +++ b/third_party/WebKit/Source/core/layout/LayoutBox.h
@@ -110,7 +110,7 @@ // layout overflow rect after the last paint invalidation. They are valid if // m_hasPreviousContentBoxSizeAndLayoutOverflowRect is true. LayoutSize previous_content_box_size_; - LayoutRect previous_layout_overflow_rect_; + LayoutRect previous_physical_layout_overflow_rect_; // Used by LocalFrameView::ScrollIntoView. When the scroll is sequenced // rather than instantly performed, we need the pending_offset_to_scroll @@ -466,6 +466,11 @@ LayoutRect LayoutOverflowRect() const { return overflow_ ? overflow_->LayoutOverflowRect() : NoOverflowRect(); } + LayoutRect PhysicalLayoutOverflowRect() const { + LayoutRect overflow_rect = LayoutOverflowRect(); + FlipForWritingMode(overflow_rect); + return overflow_rect; + } IntRect PixelSnappedLayoutOverflowRect() const { return PixelSnappedIntRect(LayoutOverflowRect()); } @@ -1393,11 +1398,11 @@ ? rare_data_->previous_content_box_size_ : PreviousSize(); } - LayoutRect PreviousLayoutOverflowRect() const { + LayoutRect PreviousPhysicalLayoutOverflowRect() const { return rare_data_ && rare_data_ ->has_previous_content_box_size_and_layout_overflow_rect_ - ? rare_data_->previous_layout_overflow_rect_ + ? rare_data_->previous_physical_layout_overflow_rect_ : LayoutRect(LayoutPoint(), PreviousSize()); }
diff --git a/third_party/WebKit/Source/core/loader/EmptyClients.cpp b/third_party/WebKit/Source/core/loader/EmptyClients.cpp index 32b83ddb..f4a685d 100644 --- a/third_party/WebKit/Source/core/loader/EmptyClients.cpp +++ b/third_party/WebKit/Source/core/loader/EmptyClients.cpp
@@ -76,7 +76,6 @@ } void SetFrameVisible(bool) override {} bool IsFrameVisible() const override { return false; } - void SetPageVisible(bool) override {} bool IsPageVisible() const override { return false; } void SetPaused(bool) override {} void SetCrossOrigin(bool) override {}
diff --git a/third_party/WebKit/Source/core/page/ChromeClient.h b/third_party/WebKit/Source/core/page/ChromeClient.h index a0a9686..45368d7 100644 --- a/third_party/WebKit/Source/core/page/ChromeClient.h +++ b/third_party/WebKit/Source/core/page/ChromeClient.h
@@ -80,6 +80,7 @@ class WebImage; class WebLayer; class WebLayerTreeView; +class WebTappedInfo; class WebViewImpl; struct CompositedSelection; @@ -323,6 +324,8 @@ virtual void RegisterViewportLayers() const {} + virtual void ShowUnhandledTapUIIfNeeded(WebTappedInfo&) {} + virtual void OnMouseDown(Node&) {} virtual void DidUpdateBrowserControls() const {}
diff --git a/third_party/WebKit/Source/core/page/ChromeClientImpl.cpp b/third_party/WebKit/Source/core/page/ChromeClientImpl.cpp index 3aa220ca..75f7320 100644 --- a/third_party/WebKit/Source/core/page/ChromeClientImpl.cpp +++ b/third_party/WebKit/Source/core/page/ChromeClientImpl.cpp
@@ -993,6 +993,15 @@ ->ShowVirtualKeyboardOnElementFocus(); } +void ChromeClientImpl::ShowUnhandledTapUIIfNeeded(WebTappedInfo& tapped_info) { + // Node* node = tapped_info.RawNode(); + // web_node(WebNode(node)); + // tapped_info.SetNode(web_node); + if (web_view_->Client()) { + web_view_->Client()->ShowUnhandledTapUIIfNeeded(tapped_info); + } +} + void ChromeClientImpl::OnMouseDown(Node& mouse_down_node) { if (auto* fill_client = AutofillClientFromFrame(mouse_down_node.GetDocument().GetFrame())) {
diff --git a/third_party/WebKit/Source/core/page/ChromeClientImpl.h b/third_party/WebKit/Source/core/page/ChromeClientImpl.h index ccafeb4e..1a67569 100644 --- a/third_party/WebKit/Source/core/page/ChromeClientImpl.h +++ b/third_party/WebKit/Source/core/page/ChromeClientImpl.h
@@ -213,6 +213,7 @@ void RegisterViewportLayers() const override; + void ShowUnhandledTapUIIfNeeded(WebTappedInfo&) override; void OnMouseDown(Node&) override; void DidUpdateBrowserControls() const override; void SetOverscrollBehavior(const WebOverscrollBehavior&) override;
diff --git a/third_party/WebKit/Source/core/page/DragController.cpp b/third_party/WebKit/Source/core/page/DragController.cpp index ef39afb..42108c7 100644 --- a/third_party/WebKit/Source/core/page/DragController.cpp +++ b/third_party/WebKit/Source/core/page/DragController.cpp
@@ -1148,9 +1148,18 @@ PaintRecordBuilder builder; frame.View()->PaintContents(builder.Context(), paint_flags, EnclosingIntRect(painting_rect)); + + PropertyTreeState property_tree_state = PropertyTreeState::Root(); + if (RuntimeEnabledFeatures::SlimmingPaintV175Enabled()) { + property_tree_state = frame.View() + ->GetLayoutView() + ->FirstFragment() + .LocalBorderBoxProperties(); + } + return DataTransfer::CreateDragImageForFrame( frame, opacity, kDoNotRespectImageOrientation, painting_rect.Size(), - painting_rect.Location(), builder, PropertyTreeState::Root()); + painting_rect.Location(), builder, property_tree_state); } bool DragController::StartDrag(LocalFrame* src,
diff --git a/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp index 9cf6418d..df64ed9 100644 --- a/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp +++ b/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
@@ -236,8 +236,8 @@ if (document_background && document_background->IsBox()) { const auto* document_background_box = ToLayoutBox(document_background); if (ShouldFullyInvalidateBackgroundOnLayoutOverflowChange( - document_background_box->PreviousLayoutOverflowRect(), - document_background_box->LayoutOverflowRect())) { + document_background_box->PreviousPhysicalLayoutOverflowRect(), + document_background_box->PhysicalLayoutOverflowRect())) { return true; } } @@ -261,8 +261,9 @@ if (!layout_overflow_change_causes_invalidation) return BackgroundInvalidationType::kNone; - const LayoutRect& old_layout_overflow = box_.PreviousLayoutOverflowRect(); - LayoutRect new_layout_overflow = box_.LayoutOverflowRect(); + const LayoutRect& old_layout_overflow = + box_.PreviousPhysicalLayoutOverflowRect(); + LayoutRect new_layout_overflow = box_.PhysicalLayoutOverflowRect(); if (ShouldFullyInvalidateBackgroundOnLayoutOverflowChange( old_layout_overflow, new_layout_overflow)) return BackgroundInvalidationType::kFull; @@ -293,8 +294,9 @@ // to let ObjectPaintInvalidator::SetBackingNeedsPaintInvalidationInRect() // know we are invalidating on the scrolling contents backing. reason = PaintInvalidationReason::kBackgroundOnScrollingContentsLayer; - const LayoutRect& old_layout_overflow = box_.PreviousLayoutOverflowRect(); - LayoutRect new_layout_overflow = box_.LayoutOverflowRect(); + const LayoutRect& old_layout_overflow = + box_.PreviousPhysicalLayoutOverflowRect(); + LayoutRect new_layout_overflow = box_.PhysicalLayoutOverflowRect(); if (background_invalidation_type == BackgroundInvalidationType::kFull) { ObjectPaintInvalidatorWithContext(box_, context_) .FullyInvalidatePaint(reason, old_layout_overflow,
diff --git a/third_party/WebKit/Source/core/paint/BoxPainter.cpp b/third_party/WebKit/Source/core/paint/BoxPainter.cpp index 1aaae51..d52c6920 100644 --- a/third_party/WebKit/Source/core/paint/BoxPainter.cpp +++ b/third_party/WebKit/Source/core/paint/BoxPainter.cpp
@@ -56,7 +56,7 @@ // For the case where we are painting the background into the scrolling // contents layer of a composited scroller we need to include the entire // overflow rect. - paint_rect = layout_box_.LayoutOverflowRect(); + paint_rect = layout_box_.PhysicalLayoutOverflowRect(); scroll_recorder.emplace(paint_info.context, layout_box_, paint_info.phase, layout_box_.ScrolledContentOffset());
diff --git a/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp b/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp index 5148fd9..595e3b1 100644 --- a/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp +++ b/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp
@@ -93,7 +93,9 @@ ShapeClipPathOperation& shape = ToShapeClipPathOperation(clip_path); if (!shape.IsValid()) return WTF::nullopt; - return shape.GetPath(reference_box).BoundingRect(); + FloatRect bounding_box = shape.GetPath(reference_box).BoundingRect(); + bounding_box.Intersect(LayoutRect::InfiniteIntRect()); + return bounding_box; } DCHECK_EQ(clip_path.GetType(), ClipPathOperation::REFERENCE); @@ -112,6 +114,7 @@ // local space is shifted by paint offset. bounding_box.MoveBy(reference_box.Location()); } + bounding_box.Intersect(LayoutRect::InfiniteIntRect()); return bounding_box; }
diff --git a/third_party/WebKit/Source/core/paint/ClipPathClipper.h b/third_party/WebKit/Source/core/paint/ClipPathClipper.h index f801059..470a857 100644 --- a/third_party/WebKit/Source/core/paint/ClipPathClipper.h +++ b/third_party/WebKit/Source/core/paint/ClipPathClipper.h
@@ -5,6 +5,7 @@ #ifndef ClipPathClipper_h #define ClipPathClipper_h +#include "core/CoreExport.h" #include "core/paint/FloatClipRecorder.h" #include "platform/geometry/FloatRect.h" #include "platform/graphics/paint/ClipPathRecorder.h" @@ -16,7 +17,7 @@ class GraphicsContext; class LayoutObject; -class ClipPathClipper { +class CORE_EXPORT ClipPathClipper { DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); public:
diff --git a/third_party/WebKit/Source/core/paint/ClipPathClipperTest.cpp b/third_party/WebKit/Source/core/paint/ClipPathClipperTest.cpp new file mode 100644 index 0000000..6d72ef8 --- /dev/null +++ b/third_party/WebKit/Source/core/paint/ClipPathClipperTest.cpp
@@ -0,0 +1,30 @@ +// Copyright 2018 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/paint/ClipPathClipper.h" + +#include <gtest/gtest.h> +#include "core/layout/LayoutTestHelper.h" + +namespace blink { +namespace { + +using ClipPathClipperTest = RenderingTest; + +TEST_F(ClipPathClipperTest, ClipPathBoundingBoxClamped) { + SetBodyInnerHTML(R"HTML( + <!DOCTYPE html> + <div id="e" style="width:1000px; height:1000px; will-change:transform; + clip-path:circle(1000000000%);"> + </div> + )HTML"); + auto& object = *GetLayoutObjectByElementId("e"); + Optional<FloatRect> bounding_box = + ClipPathClipper::LocalClipPathBoundingBox(object); + ASSERT_TRUE(bounding_box.has_value()); + EXPECT_EQ(LayoutRect::InfiniteIntRect(), *bounding_box); +} + +} // unnamed namespace +} // namespace blink
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp index 31375fb..0e5a303 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -2091,10 +2091,17 @@ if (UsesCompositedScrolling()) { DCHECK(Layer()->HasCompositedLayerMapping()); - Layer()->GetCompositedLayerMapping()->SetNeedsGraphicsLayerUpdate( - kGraphicsLayerUpdateSubtree); - compositor->SetNeedsCompositingUpdate( - kCompositingUpdateAfterGeometryChange); + ScrollingCoordinator* scrolling_coordinator = GetScrollingCoordinator(); + bool handled_scroll = + Layer()->IsRootLayer() && scrolling_coordinator && + scrolling_coordinator->ScrollableAreaScrollLayerDidChange(this); + + if (!handled_scroll) { + Layer()->GetCompositedLayerMapping()->SetNeedsGraphicsLayerUpdate( + kGraphicsLayerUpdateSubtree); + compositor->SetNeedsCompositingUpdate( + kCompositingUpdateAfterGeometryChange); + } // If we have fixed elements and we scroll the root layer in RLS we might // change compositing since the fixed elements might now overlap a
diff --git a/third_party/WebKit/Source/core/testing/data/show_unhandled_tap.html b/third_party/WebKit/Source/core/testing/data/show_unhandled_tap.html index fca4d227432..9ca6c0f 100644 --- a/third_party/WebKit/Source/core/testing/data/show_unhandled_tap.html +++ b/third_party/WebKit/Source/core/testing/data/show_unhandled_tap.html
@@ -24,8 +24,6 @@ <div id="mutate">This block gets mutated to change the DOM.</div> <div id="style_active">This block gets red if active</div> <input id="checkbox" type="checkbox"><span>indeterminate checkbox</span> -<input id="editable" type="text" value="editable"> -<div id="focusable" tabindex="1">focusable</div> </div> <p style="position: absolute; left: 8px; top: 400px; width: 400px; height: 30px;"><span id="bottom">Bottom.</span></p> @@ -57,6 +55,7 @@ var t = document.getElementById('target'); t.addEventListener('mousedown', handle); t.addEventListener('mouseup', handle); +t.addEventListener('mousemove', handle); t.addEventListener('click', handle); </script> </body>
diff --git a/third_party/WebKit/Source/platform/WebFrameScheduler.h b/third_party/WebKit/Source/platform/WebFrameScheduler.h index 50a11ab..b56a1a7 100644 --- a/third_party/WebKit/Source/platform/WebFrameScheduler.h +++ b/third_party/WebKit/Source/platform/WebFrameScheduler.h
@@ -76,10 +76,9 @@ virtual void SetFrameVisible(bool) = 0; virtual bool IsFrameVisible() const = 0; - // Tells the scheduler that the page this frame belongs to is not visible. + // Query the page visibility state for the page associated with this frame. // The scheduler may throttle tasks associated with pages that are not // visible. - virtual void SetPageVisible(bool) = 0; virtual bool IsPageVisible() const = 0; // Set whether this frame is suspended. Only unthrottledTaskRunner tasks are
diff --git a/third_party/WebKit/Source/platform/heap/HeapAllocator.h b/third_party/WebKit/Source/platform/heap/HeapAllocator.h index aa69fe9b..85b3488 100644 --- a/third_party/WebKit/Source/platform/heap/HeapAllocator.h +++ b/third_party/WebKit/Source/platform/heap/HeapAllocator.h
@@ -8,6 +8,7 @@ #include "build/build_config.h" #include "platform/heap/Heap.h" #include "platform/heap/HeapFlags.h" +#include "platform/heap/MarkingVisitor.h" #include "platform/heap/Persistent.h" #include "platform/heap/TraceTraits.h" #include "platform/wtf/Allocator.h"
diff --git a/third_party/WebKit/Source/platform/runtime_enabled_features.json5 b/third_party/WebKit/Source/platform/runtime_enabled_features.json5 index f301592..4e20e9d 100644 --- a/third_party/WebKit/Source/platform/runtime_enabled_features.json5 +++ b/third_party/WebKit/Source/platform/runtime_enabled_features.json5
@@ -1036,7 +1036,7 @@ }, { name: "SlotInFlatTree", - status: "experimental", + status: "stable", }, { name: "SMIL",
diff --git a/third_party/WebKit/Source/platform/scheduler/base/work_queue.cc b/third_party/WebKit/Source/platform/scheduler/base/work_queue.cc index 20f4207a..abac08f4 100644 --- a/third_party/WebKit/Source/platform/scheduler/base/work_queue.cc +++ b/third_party/WebKit/Source/platform/scheduler/base/work_queue.cc
@@ -17,7 +17,7 @@ void WorkQueue::AsValueInto(base::TimeTicks now, base::trace_event::TracedValue* state) const { - for (const TaskQueueImpl::Task& task : work_queue_) { + for (const TaskQueueImpl::Task& task : tasks_) { TaskQueueImpl::TaskAsValueInto(task, now, state); } } @@ -28,15 +28,15 @@ } const TaskQueueImpl::Task* WorkQueue::GetFrontTask() const { - if (work_queue_.empty()) + if (tasks_.empty()) return nullptr; - return &work_queue_.front(); + return &tasks_.front(); } const TaskQueueImpl::Task* WorkQueue::GetBackTask() const { - if (work_queue_.empty()) + if (tasks_.empty()) return nullptr; - return &work_queue_.back(); + return &tasks_.back(); } bool WorkQueue::BlockedByFence() const { @@ -46,33 +46,31 @@ // If the queue is empty then any future tasks will have a higher enqueue // order and will be blocked. The queue is also blocked if the head is past // the fence. - return work_queue_.empty() || work_queue_.front().enqueue_order() >= fence_; + return tasks_.empty() || tasks_.front().enqueue_order() >= fence_; } bool WorkQueue::GetFrontTaskEnqueueOrder(EnqueueOrder* enqueue_order) const { - if (work_queue_.empty() || BlockedByFence()) + if (tasks_.empty() || BlockedByFence()) return false; // Quick sanity check. - DCHECK_LE(work_queue_.front().enqueue_order(), - work_queue_.back().enqueue_order()) + DCHECK_LE(tasks_.front().enqueue_order(), tasks_.back().enqueue_order()) << task_queue_->GetName() << " : " << work_queue_sets_->GetName() << " : " << name_; - *enqueue_order = work_queue_.front().enqueue_order(); + *enqueue_order = tasks_.front().enqueue_order(); return true; } void WorkQueue::Push(TaskQueueImpl::Task task) { - bool was_empty = work_queue_.empty(); + bool was_empty = tasks_.empty(); #ifndef NDEBUG DCHECK(task.enqueue_order_set()); #endif // Make sure the |enqueue_order()| is monotonically increasing. - DCHECK(was_empty || - work_queue_.rbegin()->enqueue_order() < task.enqueue_order()); + DCHECK(was_empty || tasks_.rbegin()->enqueue_order() < task.enqueue_order()); // Amoritized O(1). - work_queue_.push_back(std::move(task)); + tasks_.push_back(std::move(task)); if (!was_empty) return; @@ -85,7 +83,7 @@ void WorkQueue::PushNonNestableTaskToFront(TaskQueueImpl::Task task) { DCHECK(task.nestable == base::Nestable::kNonNestable); - bool was_empty = work_queue_.empty(); + bool was_empty = tasks_.empty(); bool was_blocked = BlockedByFence(); #ifndef NDEBUG DCHECK(task.enqueue_order_set()); @@ -93,13 +91,13 @@ if (!was_empty) { // Make sure the |enqueue_order()| is monotonically increasing. - DCHECK_LE(task.enqueue_order(), work_queue_.front().enqueue_order()) + DCHECK_LE(task.enqueue_order(), tasks_.front().enqueue_order()) << task_queue_->GetName() << " : " << work_queue_sets_->GetName() << " : " << name_; } // Amoritized O(1). - work_queue_.push_front(std::move(task)); + tasks_.push_front(std::move(task)); if (!work_queue_sets_) return; @@ -117,10 +115,10 @@ } void WorkQueue::ReloadEmptyImmediateQueue() { - DCHECK(work_queue_.empty()); + DCHECK(tasks_.empty()); - work_queue_ = task_queue_->TakeImmediateIncomingQueue(); - if (work_queue_.empty()) + tasks_ = task_queue_->TakeImmediateIncomingQueue(); + if (tasks_.empty()) return; // If we hit the fence, pretend to WorkQueueSets that we're empty. @@ -130,13 +128,13 @@ TaskQueueImpl::Task WorkQueue::TakeTaskFromWorkQueue() { DCHECK(work_queue_sets_); - DCHECK(!work_queue_.empty()); + DCHECK(!tasks_.empty()); - TaskQueueImpl::Task pending_task = work_queue_.TakeFirst(); + TaskQueueImpl::Task pending_task = tasks_.TakeFirst(); // NB immediate tasks have a different pipeline to delayed ones. - if (queue_type_ == QueueType::kImmediate && work_queue_.empty()) { + if (queue_type_ == QueueType::kImmediate && tasks_.empty()) { // Short-circuit the queue reload so that OnPopQueue does the right thing. - work_queue_ = task_queue_->TakeImmediateIncomingQueue(); + tasks_ = task_queue_->TakeImmediateIncomingQueue(); } // OnPopQueue calls GetFrontTaskEnqueueOrder which checks BlockedByFence() so // we don't need to here. @@ -148,16 +146,16 @@ bool WorkQueue::RemoveAllCanceledTasksFromFront() { DCHECK(work_queue_sets_); bool task_removed = false; - while (!work_queue_.empty() && (!work_queue_.front().task || - work_queue_.front().task.IsCancelled())) { - work_queue_.pop_front(); + while (!tasks_.empty() && + (!tasks_.front().task || tasks_.front().task.IsCancelled())) { + tasks_.pop_front(); task_removed = true; } if (task_removed) { // NB immediate tasks have a different pipeline to delayed ones. - if (queue_type_ == QueueType::kImmediate && work_queue_.empty()) { + if (queue_type_ == QueueType::kImmediate && tasks_.empty()) { // Short-circuit the queue reload so that OnPopQueue does the right thing. - work_queue_ = task_queue_->TakeImmediateIncomingQueue(); + tasks_ = task_queue_->TakeImmediateIncomingQueue(); } work_queue_sets_->OnPopQueue(this); task_queue_->TraceQueueSize(); @@ -191,7 +189,7 @@ bool was_blocked_by_fence = InsertFenceImpl(fence); // Moving the fence forward may unblock some tasks. - if (work_queue_sets_ && !work_queue_.empty() && was_blocked_by_fence && + if (work_queue_sets_ && !tasks_.empty() && was_blocked_by_fence && !BlockedByFence()) { work_queue_sets_->OnTaskPushedToEmptyQueue(this); return true; @@ -205,7 +203,7 @@ bool WorkQueue::RemoveFence() { bool was_blocked_by_fence = BlockedByFence(); fence_ = 0; - if (work_queue_sets_ && !work_queue_.empty() && was_blocked_by_fence) { + if (work_queue_sets_ && !tasks_.empty() && was_blocked_by_fence) { work_queue_sets_->OnTaskPushedToEmptyQueue(this); return true; } @@ -213,8 +211,8 @@ } bool WorkQueue::ShouldRunBefore(const WorkQueue* other_queue) const { - DCHECK(!work_queue_.empty()); - DCHECK(!other_queue->work_queue_.empty()); + DCHECK(!tasks_.empty()); + DCHECK(!other_queue->tasks_.empty()); EnqueueOrder enqueue_order = 0; EnqueueOrder other_enqueue_order = 0; bool have_task = GetFrontTaskEnqueueOrder(&enqueue_order); @@ -226,9 +224,9 @@ } void WorkQueue::PopTaskForTesting() { - if (work_queue_.empty()) + if (tasks_.empty()) return; - work_queue_.pop_front(); + tasks_.pop_front(); } } // namespace internal
diff --git a/third_party/WebKit/Source/platform/scheduler/base/work_queue.h b/third_party/WebKit/Source/platform/scheduler/base/work_queue.h index 0252908..d8a9d998 100644 --- a/third_party/WebKit/Source/platform/scheduler/base/work_queue.h +++ b/third_party/WebKit/Source/platform/scheduler/base/work_queue.h
@@ -49,10 +49,10 @@ void AsValueInto(base::TimeTicks now, base::trace_event::TracedValue* state) const; - // Returns true if the |work_queue_| is empty. This method ignores any fences. - bool Empty() const { return work_queue_.empty(); } + // Returns true if the |tasks_| is empty. This method ignores any fences. + bool Empty() const { return tasks_.empty(); } - // If the |work_queue_| isn't empty and a fence hasn't been reached, + // If the |tasks_| isn't empty and a fence hasn't been reached, // |enqueue_order| gets set to the enqueue order of the front task and the // function returns true. Otherwise the function returns false. bool GetFrontTaskEnqueueOrder(EnqueueOrder* enqueue_order) const; @@ -65,23 +65,23 @@ // method ignores any fences. const TaskQueueImpl::Task* GetBackTask() const; - // Pushes the task onto the |work_queue_| and if a fence hasn't been reached + // Pushes the task onto the |tasks_| and if a fence hasn't been reached // it informs the WorkQueueSets if the head changed. void Push(TaskQueueImpl::Task task); - // Pushes the task onto the front of the |work_queue_| and if it's before any + // Pushes the task onto the front of the |tasks_| and if it's before any // fence it informs the WorkQueueSets the head changed. Use with caution this // API can easily lead to task starvation if misused. void PushNonNestableTaskToFront(TaskQueueImpl::Task task); - // Reloads the empty |work_queue_| with + // Reloads the empty |tasks_| with // |task_queue_->TakeImmediateIncomingQueue| and if a fence hasn't been // reached it informs the WorkQueueSets if the head changed. void ReloadEmptyImmediateQueue(); - size_t Size() const { return work_queue_.size(); } + size_t Size() const { return tasks_.size(); } - // Pulls a task off the |work_queue_| and informs the WorkQueueSets. If the + // Pulls a task off the |tasks_| and informs the WorkQueueSets. If the // task removed had an enqueue order >= the current fence then WorkQueue // pretends to be empty as far as the WorkQueueSets is concerned. TaskQueueImpl::Task TakeTaskFromWorkQueue(); @@ -137,7 +137,7 @@ private: bool InsertFenceImpl(EnqueueOrder fence); - TaskQueueImpl::TaskDeque work_queue_; + TaskQueueImpl::TaskDeque tasks_; WorkQueueSets* work_queue_sets_ = nullptr; // NOT OWNED. TaskQueueImpl* const task_queue_; // NOT OWNED. size_t work_queue_set_index_ = 0;
diff --git a/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_proxy.cc b/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_proxy.cc index 1b1224e..2d2c5d4b 100644 --- a/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_proxy.cc +++ b/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_proxy.cc
@@ -16,12 +16,12 @@ } WorkerSchedulerProxy::~WorkerSchedulerProxy() { - DCHECK(WTF::IsMainThread()); + DCHECK(IsMainThread()); } void WorkerSchedulerProxy::OnWorkerSchedulerCreated( base::WeakPtr<WorkerSchedulerImpl> worker_scheduler) { - DCHECK(!WTF::IsMainThread()) + DCHECK(!IsMainThread()) << "OnWorkerSchedulerCreated should be called from the worker thread"; DCHECK(!worker_scheduler_) << "OnWorkerSchedulerCreated is called twice"; DCHECK(worker_scheduler) << "WorkerScheduler is expected to exist"; @@ -32,7 +32,7 @@ void WorkerSchedulerProxy::OnThrottlingStateChanged( WebFrameScheduler::ThrottlingState throttling_state) { - DCHECK(WTF::IsMainThread()); + DCHECK(IsMainThread()); if (throttling_state_ == throttling_state) return; throttling_state_ = throttling_state;
diff --git a/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_proxy_unittest.cc b/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_proxy_unittest.cc index 3516f5e..4c6a5c2 100644 --- a/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_proxy_unittest.cc +++ b/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_proxy_unittest.cc
@@ -125,12 +125,12 @@ DCHECK(worker_thread->GetWorkerScheduler()->throttling_state() == WebFrameScheduler::ThrottlingState::kNotThrottled); - frame_scheduler_->SetPageVisible(false); + web_view_scheduler_->SetPageVisible(false); throtting_state_changed.Wait(); DCHECK(worker_thread->GetWorkerScheduler()->throttling_state() == WebFrameScheduler::ThrottlingState::kThrottled); - frame_scheduler_->SetPageVisible(true); + web_view_scheduler_->SetPageVisible(true); throtting_state_changed.Wait(); DCHECK(worker_thread->GetWorkerScheduler()->throttling_state() == WebFrameScheduler::ThrottlingState::kNotThrottled); @@ -152,7 +152,7 @@ DCHECK(worker_thread->GetWorkerScheduler()->throttling_state() == WebFrameScheduler::ThrottlingState::kNotThrottled); - frame_scheduler_->SetPageVisible(false); + web_view_scheduler_->SetPageVisible(false); throtting_state_changed.Wait(); DCHECK(worker_thread->GetWorkerScheduler()->throttling_state() == WebFrameScheduler::ThrottlingState::kThrottled); @@ -177,7 +177,7 @@ DCHECK(worker_thread->GetWorkerScheduler()->throttling_state() == WebFrameScheduler::ThrottlingState::kNotThrottled); - frame_scheduler_->SetPageVisible(false); + web_view_scheduler_->SetPageVisible(false); throtting_state_changed.Wait(); DCHECK(worker_thread->GetWorkerScheduler()->throttling_state() == WebFrameScheduler::ThrottlingState::kThrottled); @@ -186,7 +186,7 @@ proxy.reset(); mock_main_thread_task_runner_->RunUntilIdle(); - frame_scheduler_->SetPageVisible(true); + web_view_scheduler_->SetPageVisible(true); mock_main_thread_task_runner_->RunUntilIdle(); frame_scheduler_.reset();
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc b/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc index 79daf73..d36288b 100644 --- a/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc +++ b/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc
@@ -103,7 +103,7 @@ &tracing_controller_, VisibilityStateToString), page_visibility_(kDefaultPageVisibility, - "WebFrameScheduler.PageVisible", + "WebFrameScheduler.PageVisibility", this, &tracing_controller_, PageVisibilityStateToString), @@ -481,11 +481,9 @@ } } -void WebFrameSchedulerImpl::SetPageVisible(bool page_visible) { +void WebFrameSchedulerImpl::SetPageVisibility( + PageVisibilityState page_visibility) { DCHECK(parent_web_view_scheduler_); - PageVisibilityState page_visibility = page_visible - ? PageVisibilityState::kVisible - : PageVisibilityState::kHidden; if (page_visibility_ == page_visibility) return; bool was_throttled = ShouldThrottleTimers();
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h b/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h index 170a12f..742a584 100644 --- a/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h +++ b/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h
@@ -61,7 +61,6 @@ Observer*) override; void SetFrameVisible(bool frame_visible) override; bool IsFrameVisible() const override; - void SetPageVisible(bool page_visible) override; bool IsPageVisible() const override; void SetPaused(bool frame_paused) override; void SetPageFrozen(bool) override; @@ -83,6 +82,7 @@ bool IsExemptFromBudgetBasedThrottling() const override; scoped_refptr<TaskQueue> ControlTaskQueue(); + void SetPageVisibility(PageVisibilityState page_visibility); bool has_active_connection() const { return active_connection_count_; }
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc b/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc index 6b2d1e6..528950b5 100644 --- a/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc +++ b/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc
@@ -100,7 +100,7 @@ bool disable_background_timer_throttling) : intervention_reporter_(intervention_reporter), renderer_scheduler_(renderer_scheduler), - page_visible_(kDefaultPageVisibility == PageVisibilityState::kVisible), + page_visibility_(kDefaultPageVisibility), disable_background_timer_throttling_(disable_background_timer_throttling), is_audio_playing_(false), reported_background_throttling_since_navigation_(false), @@ -125,10 +125,15 @@ } void WebViewSchedulerImpl::SetPageVisible(bool page_visible) { - if (disable_background_timer_throttling_ || page_visible_ == page_visible) + PageVisibilityState page_visibility = page_visible + ? PageVisibilityState::kVisible + : PageVisibilityState::kHidden; + + if (disable_background_timer_throttling_ || + page_visibility_ == page_visibility) return; - page_visible_ = page_visible; + page_visibility_ = page_visibility; UpdateBackgroundThrottlingState(); } @@ -148,7 +153,7 @@ std::unique_ptr<WebFrameSchedulerImpl> frame_scheduler( new WebFrameSchedulerImpl(renderer_scheduler_, this, blame_context, frame_type)); - frame_scheduler->SetPageVisible(page_visible_); + frame_scheduler->SetPageVisibility(page_visibility_); frame_schedulers_.insert(frame_scheduler.get()); return frame_scheduler; } @@ -257,7 +262,8 @@ void WebViewSchedulerImpl::AsValueInto( base::trace_event::TracedValue* state) const { - state->SetBoolean("page_visible", page_visible_); + state->SetBoolean("page_visible", + page_visibility_ == PageVisibilityState::kVisible); state->SetBoolean("disable_background_timer_throttling", disable_background_timer_throttling_); state->SetBoolean("is_audio_playing", is_audio_playing_); @@ -330,7 +336,7 @@ void WebViewSchedulerImpl::UpdateBackgroundThrottlingState() { for (WebFrameSchedulerImpl* frame_scheduler : frame_schedulers_) - frame_scheduler->SetPageVisible(page_visible_); + frame_scheduler->SetPageVisibility(page_visibility_); UpdateBackgroundBudgetPoolThrottlingState(); } @@ -339,7 +345,8 @@ return; LazyNow lazy_now(renderer_scheduler_->tick_clock()); - if (page_visible_ || has_active_connection_) { + if (page_visibility_ == PageVisibilityState::kVisible || + has_active_connection_) { background_time_budget_pool_->DisableThrottling(&lazy_now); } else { background_time_budget_pool_->EnableThrottling(&lazy_now);
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.h b/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.h index 11e9528..94fa7df4 100644 --- a/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.h +++ b/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.h
@@ -14,6 +14,7 @@ #include "base/observer_list.h" #include "platform/PlatformExport.h" #include "platform/scheduler/base/task_queue.h" +#include "platform/scheduler/child/page_visibility_state.h" #include "platform/scheduler/child/web_scheduler.h" #include "platform/scheduler/renderer/task_queue_throttler.h" #include "platform/scheduler/renderer/web_view_scheduler.h" @@ -112,7 +113,7 @@ WebScheduler::InterventionReporter* intervention_reporter_; // Not owned. RendererSchedulerImpl* renderer_scheduler_; - bool page_visible_; + PageVisibilityState page_visibility_; bool disable_background_timer_throttling_; bool is_audio_playing_; bool reported_background_throttling_since_navigation_;
diff --git a/third_party/WebKit/Source/platform/scheduler/test/fake_web_frame_scheduler.h b/third_party/WebKit/Source/platform/scheduler/test/fake_web_frame_scheduler.h index 86f3563..fb35c7de 100644 --- a/third_party/WebKit/Source/platform/scheduler/test/fake_web_frame_scheduler.h +++ b/third_party/WebKit/Source/platform/scheduler/test/fake_web_frame_scheduler.h
@@ -109,7 +109,6 @@ } void SetFrameVisible(bool) override {} bool IsFrameVisible() const override { return is_frame_visible_; } - void SetPageVisible(bool) override {} bool IsPageVisible() const override { return is_page_visible_; } void SetPaused(bool) override {} void SetCrossOrigin(bool) override {}
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py b/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py index 5727ab4b..0aa2b31 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py
@@ -1489,8 +1489,10 @@ # Used to detect cases like ec for ExceptionCode. acronym = _create_acronym(text).lower() if canonical_text.find(canonical_parameter_name) != -1 or acronym.find(canonical_parameter_name) != -1: + info_url = 'https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/blink-c++.md' + \ + '#Leave-obvious-parameter-names-out-of-function-declarations' error(parameter.row, 'readability/parameter_name', 5, - 'The parameter name "%s" adds no information, so it should be removed.' % parameter.name) + 'The parameter name "%s" adds no information, so it should be removed. See %s.' % (parameter.name, info_url)) return False return True
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py index 4beeed82..4ea1ede 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
@@ -212,7 +212,9 @@ self.assertFalse(cpp_style._check_parameter_name_against_text(parameter, 'FooF', error_collector)) self.assertEqual( error_collector.results(), - 'The parameter name "ooF" adds no information, so it should be removed. [readability/parameter_name] [5]') + 'The parameter name "ooF" adds no information, so it should be removed. ' + 'See https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/blink-c++.md' + '#Leave-obvious-parameter-names-out-of-function-declarations. [readability/parameter_name] [5]') class CppStyleTestBase(unittest.TestCase): @@ -2905,8 +2907,10 @@ def test_parameter_names(self): # Leave meaningless variable names out of function declarations. # This variable name is very long. # pylint: disable=invalid-name - meaningless_variable_name_error_message = ('The parameter name "%s" adds no information, ' - 'so it should be removed. [readability/parameter_name] [5]') + meaningless_variable_name_error_message = ( + 'The parameter name "%s" adds no information, so it should be removed. ' + 'See https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/blink-c++.md' + '#Leave-obvious-parameter-names-out-of-function-declarations. [readability/parameter_name] [5]') parameter_error_rules = ('-', '+readability/parameter_name') # No variable name, so no error.
diff --git a/third_party/WebKit/public/BUILD.gn b/third_party/WebKit/public/BUILD.gn index 023132e..4de35c0 100644 --- a/third_party/WebKit/public/BUILD.gn +++ b/third_party/WebKit/public/BUILD.gn
@@ -67,7 +67,6 @@ "DEBUG_DEVTOOLS=$debug_devtools", "USE_DEFAULT_RENDER_THEME=$use_default_render_theme", "USE_MINIKIN_HYPHENATION=$use_minikin_hyphenation", - "ENABLE_UNHANDLED_TAP=$enable_unhandled_tap", ] } @@ -842,11 +841,6 @@ "//url/mojom:url_mojom_gurl", ] - # This Android unhandled-tap feature uses another mojo source, add it in. - if (enable_unhandled_tap) { - sources += [ "platform/unhandled_tap_notifier.mojom" ] - } - component_output_prefix = "blink_android_mojo_bindings" # See comment above.
diff --git a/third_party/WebKit/public/platform/unhandled_tap_notifier.mojom b/third_party/WebKit/public/platform/unhandled_tap_notifier.mojom deleted file mode 100644 index d1d852f..0000000 --- a/third_party/WebKit/public/platform/unhandled_tap_notifier.mojom +++ /dev/null
@@ -1,18 +0,0 @@ -// Copyright 2018 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. - -[JavaPackage="org.chromium.blink.mojom"] -module blink.mojom; - -import "ui/gfx/geometry/mojo/geometry.mojom"; - -// Mojom representation of some information about a recent unhandled tap in text. -// This data is used to notifying the Browser to show UI for an unhandled tap if needed. -struct UnhandledTapInfo { - gfx.mojom.Point tapped_position_in_viewport; -}; - -interface UnhandledTapNotifier { - ShowUnhandledTapUIIfNeeded(UnhandledTapInfo unhandled_tap_info); -};
diff --git a/third_party/WebKit/public/public_features.gni b/third_party/WebKit/public/public_features.gni index 31312dd8..8dbec604 100644 --- a/third_party/WebKit/public/public_features.gni +++ b/third_party/WebKit/public/public_features.gni
@@ -12,9 +12,6 @@ debug_devtools = false } -# Unhandled Tap enable means Contextual Search aka Touch to Search. -enable_unhandled_tap = is_android - use_default_render_theme = use_aura # Use Minikin hyphenation engine.
diff --git a/third_party/WebKit/public/web/WebFrameClient.h b/third_party/WebKit/public/web/WebFrameClient.h index 2f2be1f..db4d478c 100644 --- a/third_party/WebKit/public/web/WebFrameClient.h +++ b/third_party/WebKit/public/web/WebFrameClient.h
@@ -646,14 +646,9 @@ virtual void DidRunContentWithCertificateErrors() {} // This frame loaded a resource with an otherwise-valid legacy Symantec - // certificate that is slated for distrust. Returns true and populates - // |console_message| to override the console message warning that is printed - // about the certificate. If it returns false, a generic warning will be - // printed. - virtual bool OverrideLegacySymantecCertConsoleMessage(const WebURL&, - WebString*) { - return false; - } + // certificate that is slated for distrust (|did_fail|=false) or has already + // been distrusted (|did_fail|=true). + virtual void ReportLegacySymantecCert(const WebURL&, bool did_fail) {} // A performance timing event (e.g. first paint) occurred virtual void DidChangePerformanceTiming() {}
diff --git a/third_party/WebKit/public/web/WebTappedInfo.h b/third_party/WebKit/public/web/WebTappedInfo.h new file mode 100644 index 0000000..7366273 --- /dev/null +++ b/third_party/WebKit/public/web/WebTappedInfo.h
@@ -0,0 +1,48 @@ +// 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 WebTappedInfo_h +#define WebTappedInfo_h + +#ifdef INSIDE_BLINK +#include "platform/geometry/IntPoint.h" +#endif // INSIDE_BLINK +#include "public/platform/WebCommon.h" +#include "public/platform/WebPoint.h" +#include "public/web/WebNode.h" + +namespace blink { + +struct WebPoint; + +#ifdef INSIDE_BLINK +class Node; +#endif // INSIDE_BLINK + +/* + * Encapsulates information needed by ShowUnhandledTapUIIfNeeded to describe + * the tap. + */ +class WebTappedInfo { + public: +#ifdef INSIDE_BLINK + WebTappedInfo(bool dom_tree_changed, + bool style_changed, + Node* tapped_node, + IntPoint tapped_position_in_viewport); +#endif // INSIDE_BLINK + + BLINK_EXPORT const WebPoint& Position() const; + BLINK_EXPORT const WebNode& GetNode() const; + BLINK_EXPORT bool PageChanged() const; + + private: + const WebPoint point_; + const WebNode web_node_; + bool page_changed_; +}; + +} // namespace blink + +#endif
diff --git a/third_party/WebKit/public/web/WebViewClient.h b/third_party/WebKit/public/web/WebViewClient.h index 298c9467..bba6485 100644 --- a/third_party/WebKit/public/web/WebViewClient.h +++ b/third_party/WebKit/public/web/WebViewClient.h
@@ -226,6 +226,7 @@ WebLayerTreeView* InitializeLayerTreeView() override { return nullptr; } WebScreenInfo GetScreenInfo() override { return WebScreenInfo(); } void SetTouchAction(WebTouchAction touch_action) override {} + void ShowUnhandledTapUIIfNeeded(const WebTappedInfo& tapped_info) override {} void Show(WebNavigationPolicy) override {} virtual WebWidgetClient* WidgetClient() { return this; }
diff --git a/third_party/WebKit/public/web/WebWidgetClient.h b/third_party/WebKit/public/web/WebWidgetClient.h index 971ffcb3..8efdb2a5 100644 --- a/third_party/WebKit/public/web/WebWidgetClient.h +++ b/third_party/WebKit/public/web/WebWidgetClient.h
@@ -50,6 +50,7 @@ class WebGestureEvent; class WebImage; class WebString; +class WebTappedInfo; class WebWidget; struct WebCursorInfo; struct WebFloatPoint; @@ -160,6 +161,13 @@ // Request the browser to show virtual keyboard for current input type. virtual void ShowVirtualKeyboardOnElementFocus() {} + // Request that the browser show a UI for an unhandled tap, if needed. + // Invoked during the handling of a GestureTap input event whenever the + // event is not consumed. + // |tappedInfo| has all the details about what was tapped and where the tap + // occurred. + virtual void ShowUnhandledTapUIIfNeeded(const WebTappedInfo& tappedInfo) {} + // Converts the |rect| from Blink's Viewport coordinates to the // coordinates in the native window used to display the content, in // DIP. They're identical in tradional world, but will differ when
diff --git a/third_party/WebKit/public/web/remote_objects.mojom b/third_party/WebKit/public/web/remote_objects.mojom index ccb0f24..753c1fa 100644 --- a/third_party/WebKit/public/web/remote_objects.mojom +++ b/third_party/WebKit/public/web/remote_objects.mojom
@@ -31,6 +31,7 @@ bool boolean_value; mojo_base.mojom.String16 string_value; SingletonJavaScriptValue singleton_value; + array<RemoteInvocationArgument> array_value; }; enum RemoteInvocationError {
diff --git a/third_party/closure_compiler/externs/file_manager_private.js b/third_party/closure_compiler/externs/file_manager_private.js index e9ccc9b..732f2cff2 100644 --- a/third_party/closure_compiler/externs/file_manager_private.js +++ b/third_party/closure_compiler/externs/file_manager_private.js
@@ -392,6 +392,19 @@ chrome.fileManagerPrivate.removeMount = function(volumeId) {}; /** + * Marks a cache file of Drive as mounted or unmounted. + * Does nothing if the file is not under Drive directory. + * @param {string} sourcePath Mounted source file. Relative file path within + * external file system. + * @param {boolean} isMounted Mark as mounted if true. Mark as unmounted + * otherwise. + * @param {function()} callback Completion callback. runtime.lastError will be + * set if there was an error. + */ +chrome.fileManagerPrivate.markCacheAsMounted = function( + sourcePath, isMounted, callback) {}; + +/** * Get the list of mounted volumes. |callback| * @param {function((!Array<!VolumeMetadata>|undefined))} callback Callback with * the list of VolumeMetadata representing mounted volumes.
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 7636aeb..3308a02 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -12632,6 +12632,7 @@ <int value="427" label="DeviceRollbackToTargetVersion"/> <int value="428" label="MachineLevelUserCloudPolicyEnrollmentToken"/> <int value="429" label="SafeBrowsingExtendedReportingEnabled"/> + <int value="430" label="AutoplayAllowed"/> </enum> <enum name="EnterprisePolicyInvalidations"> @@ -14777,6 +14778,7 @@ <int value="1221" label="ENTERPRISE_DEVICEATTRIBUTES_GETDEVICEANNOTATEDLOCATION"/> <int value="1222" label="PASSWORDSPRIVATE_CANCELEXPORTPASSWORDS"/> + <int value="1223" label="FILEMANAGERPRIVATE_MARKCACHEASMOUNTED"/> </enum> <enum name="ExtensionIconState">
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 78ee2639..d5095cd3 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -41170,6 +41170,9 @@ </histogram> <histogram name="Navigation.IsMobileOptimized" enum="BooleanIsMobileOptimized"> + <obsolete> + Removed from code March 2018. + </obsolete> <owner>cjhopman@chromium.org</owner> <owner>nyquist@chromium.org</owner> <summary>
diff --git a/tools/metrics/ukm/ukm.xml b/tools/metrics/ukm/ukm.xml index 979eb64..27c51b3 100644 --- a/tools/metrics/ukm/ukm.xml +++ b/tools/metrics/ukm/ukm.xml
@@ -1420,6 +1420,7 @@ <event name="Memory.Experimental"> <owner>erikchen@chromium.org</owner> + <owner>ssid@chromium.org</owner> <summary> Metrics associated with memory consumption, in MB. </summary> @@ -1433,20 +1434,61 @@ Measure of memory consumed by Oilpan. </summary> </metric> + <metric name="BlinkGC.AllocatedObjects"> + <summary> + Measure of memory consumed by live allocations made from Oilpan. + </summary> + </metric> <metric name="CommandBuffer"> <summary> Measure of memory consumed by GL command buffer. </summary> </metric> + <metric name="Discardable"> + <summary> + Measure of memory consumed by Discardable memory service. + </summary> + </metric> + <metric name="Extensions.ValueStore"> + <summary> + Measure of memory consumed by Key Value Store databases of extensions. + </summary> + </metric> + <metric name="History"> + <summary> + Approximate measure of memory consumed by History service. + </summary> + </metric> <metric name="IsVisible"> <summary> Indicates whether the tab is visible or not at the time of metric collection. </summary> </metric> + <metric name="JavaHeap"> + <summary> + Measure of memory consumed by java heap on Android. + </summary> + </metric> + <metric name="LevelDatabase"> + <summary> + Measure of memory consumed by unaccounted level databases. + </summary> + </metric> <metric name="Malloc"> <summary> - Measure of memory allocated by malloc. + Measure of memory allocated by malloc, that is not classified by other + metrics. + </summary> + </metric> + <metric name="Net"> + <summary> + Measure of memory allocated by network sockets and caches. + </summary> + </metric> + <metric name="Net.UrlRequestContext"> + <summary> + Measure of memory allocated by all network requests. </summary> </metric> <metric name="NumberOfDocuments"> @@ -1470,6 +1512,11 @@ The number of layout objects that the associated renderer owns. </summary> </metric> + <metric name="NumberOfMojoHandles"> + <summary> + The number of mojo handles stored in HandleTable. + </summary> + </metric> <metric name="NumberOfNodes"> <summary> The number of nodes that the associated renderer owns. @@ -1477,7 +1524,32 @@ </metric> <metric name="PartitionAlloc"> <summary> - Measure of memory allocated by PartitionAlloc. + Measure of memory allocated by PartitionAlloc allocator. + </summary> + </metric> + <metric name="PartitionAlloc.AllocatedObjects"> + <summary> + Measure of total memory used by objects allocated using PartitionAlloc. + </summary> + </metric> + <metric name="PartitionAlloc.Partitions.ArrayBuffer"> + <summary> + Measure of memory used by Array Buffer partition in PartitionAlloc. + </summary> + </metric> + <metric name="PartitionAlloc.Partitions.Buffer"> + <summary> + Measure of memory used by Buffer partition in PartitionAlloc. + </summary> + </metric> + <metric name="PartitionAlloc.Partitions.FastMalloc"> + <summary> + Measure of memory used by Fast Malloc partition in PartitionAlloc. + </summary> + </metric> + <metric name="PartitionAlloc.Partitions.Layout"> + <summary> + Measure of memory used by Layout partition in PartitionAlloc. </summary> </metric> <metric name="PrivateMemoryFootprint"> @@ -1508,6 +1580,56 @@ Measure of total shared memory consumed by process. </summary> </metric> + <metric name="SiteStorage"> + <summary> + Measure of memory used due to web storage APIs in browser process. + </summary> + </metric> + <metric name="SiteStorage.IndexDB"> + <summary> + Measure of memory used due to IndexedDB API in browser process. + </summary> + </metric> + <metric name="SiteStorage.LocalStorage"> + <summary> + Measure of memory used due to Local Storage API in browser process. + </summary> + </metric> + <metric name="SiteStorage.SessionStorage"> + <summary> + Measure of memory used due to Session Storage API in browser process. + </summary> + </metric> + <metric name="Skia"> + <summary> + Measure of memory used by Skia. + </summary> + </metric> + <metric name="Skia.SkGlyphCache"> + <summary> + Measure of memory used by Skia Glyph Cache. + </summary> + </metric> + <metric name="Skia.SkResourceCache"> + <summary> + Measure of memory used by Skia Resource Cache. + </summary> + </metric> + <metric name="Sqlite"> + <summary> + Measure of memory used by all sqlite databases. + </summary> + </metric> + <metric name="Sync"> + <summary> + Measure of memory used by Sync storage. + </summary> + </metric> + <metric name="TabRestore"> + <summary> + Approximate measure of memory used by Tab restore service. + </summary> + </metric> <metric name="TimeSinceLastNavigation"> <summary> The time in seconds since the Tab navigated. Only emitted for tabs that @@ -1530,6 +1652,11 @@ Measure of total shared memory consumed by all processes. </summary> </metric> + <metric name="UI"> + <summary> + Measure of memory used by Android UI bitmaps. + </summary> + </metric> <metric name="Uptime"> <summary> Process uptime. @@ -1540,6 +1667,41 @@ Measure of memory consumed by V8. </summary> </metric> + <metric name="WebCache"> + <summary> + Measure of memory consumed by all resources in Blink Web Cache. + </summary> + </metric> + <metric name="WebCache.CSSStylesheetResources"> + <summary> + Measure of memory consumed by CSS Stylesheet resources in Blink Web Cache. + </summary> + </metric> + <metric name="WebCache.FontResources"> + <summary> + Measure of memory consumed by Font resources in Blink Web Cache. + </summary> + </metric> + <metric name="WebCache.ImageResources"> + <summary> + Measure of memory consumed by Image resources in Blink Web Cache. + </summary> + </metric> + <metric name="WebCache.OtherResources"> + <summary> + Measure of memory consumed by other resources in Blink Web Cache. + </summary> + </metric> + <metric name="WebCache.ScriptResources"> + <summary> + Measure of memory consumed by Script resources in Blink Web Cache. + </summary> + </metric> + <metric name="WebCache.XSLStylesheetResources"> + <summary> + Measure of memory consumed by XSL Stylesheet resources in Blink Web Cache. + </summary> + </metric> </event> <event name="OfflinePages.SavePageRequested">
diff --git a/tools/perf/contrib/dromaeo_extras/OWNERS b/tools/perf/contrib/dromaeo_extras/OWNERS deleted file mode 100644 index a8a19a7..0000000 --- a/tools/perf/contrib/dromaeo_extras/OWNERS +++ /dev/null
@@ -1,3 +0,0 @@ -haraken@chromium.org -bashi@chromium.org -yukishiino@chromium.org
diff --git a/tools/perf/contrib/dromaeo_extras/__init__.py b/tools/perf/contrib/dromaeo_extras/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/tools/perf/contrib/dromaeo_extras/__init__.py +++ /dev/null
diff --git a/tools/perf/contrib/dromaeo_extras/dromaeo_extras.py b/tools/perf/contrib/dromaeo_extras/dromaeo_extras.py deleted file mode 100644 index a470075..0000000 --- a/tools/perf/contrib/dromaeo_extras/dromaeo_extras.py +++ /dev/null
@@ -1,198 +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. - -from telemetry import benchmark - -from benchmarks import dromaeo - - -# pylint: disable=protected-access -_BaseDromaeoBenchmark = dromaeo._DromaeoBenchmark -# pylint: enable=protected-access - - -@benchmark.Owner(emails=['yukishiino@chromium.org', - 'bashi@chromium.org', - 'haraken@chromium.org']) -class DromaeoJslibAttrJquery(_BaseDromaeoBenchmark): - """Dromaeo JSLib attr jquery JavaScript benchmark. - - Tests setting and getting DOM node attributes using the jQuery JavaScript - Library. - """ - tag = 'jslibattrjquery' - query_param = 'jslib-attr-jquery' - - @classmethod - def Name(cls): - return 'dromaeo.jslibattrjquery' - - -@benchmark.Owner(emails=['yukishiino@chromium.org', - 'bashi@chromium.org', - 'haraken@chromium.org']) -class DromaeoJslibAttrPrototype(_BaseDromaeoBenchmark): - """Dromaeo JSLib attr prototype JavaScript benchmark. - - Tests setting and getting DOM node attributes using the jQuery JavaScript - Library. - """ - tag = 'jslibattrprototype' - query_param = 'jslib-attr-prototype' - - @classmethod - def Name(cls): - return 'dromaeo.jslibattrprototype' - - -@benchmark.Owner(emails=['yukishiino@chromium.org', - 'bashi@chromium.org', - 'haraken@chromium.org']) -class DromaeoJslibEventJquery(_BaseDromaeoBenchmark): - """Dromaeo JSLib event jquery JavaScript benchmark. - - Tests binding, removing, and triggering DOM events using the jQuery JavaScript - Library. - """ - tag = 'jslibeventjquery' - query_param = 'jslib-event-jquery' - - @classmethod - def Name(cls): - return 'dromaeo.jslibeventjquery' - - -@benchmark.Owner(emails=['yukishiino@chromium.org', - 'bashi@chromium.org', - 'haraken@chromium.org']) -class DromaeoJslibEventPrototype(_BaseDromaeoBenchmark): - """Dromaeo JSLib event prototype JavaScript benchmark. - - Tests binding, removing, and triggering DOM events using the Prototype - JavaScript Library. - """ - tag = 'jslibeventprototype' - query_param = 'jslib-event-prototype' - - @classmethod - def Name(cls): - return 'dromaeo.jslibeventprototype' - - -# win-ref: http://crbug.com/598705 -# android: http://crbug.com/503138 -# linux: http://crbug.com/583075 -@benchmark.Owner(emails=['yukishiino@chromium.org', - 'bashi@chromium.org', - 'haraken@chromium.org']) -class DromaeoJslibModifyJquery(_BaseDromaeoBenchmark): - """Dromaeo JSLib modify jquery JavaScript benchmark. - - Tests creating and injecting DOM nodes into a document using the jQuery - JavaScript Library. - """ - tag = 'jslibmodifyjquery' - query_param = 'jslib-modify-jquery' - - @classmethod - def Name(cls): - return 'dromaeo.jslibmodifyjquery' - - -@benchmark.Owner(emails=['yukishiino@chromium.org', - 'bashi@chromium.org', - 'haraken@chromium.org']) -class DromaeoJslibModifyPrototype(_BaseDromaeoBenchmark): - """Dromaeo JSLib modify prototype JavaScript benchmark. - - Tests creating and injecting DOM nodes into a document using the Prototype - JavaScript Library. - """ - tag = 'jslibmodifyprototype' - query_param = 'jslib-modify-prototype' - - @classmethod - def Name(cls): - return 'dromaeo.jslibmodifyprototype' - - -@benchmark.Owner(emails=['yukishiino@chromium.org', - 'bashi@chromium.org', - 'haraken@chromium.org']) -class DromaeoJslibStyleJquery(_BaseDromaeoBenchmark): - """Dromaeo JSLib style jquery JavaScript benchmark. - - Tests getting and setting CSS information on DOM elements using the jQuery - JavaScript Library. - """ - tag = 'jslibstylejquery' - query_param = 'jslib-style-jquery' - - @classmethod - def Name(cls): - return 'dromaeo.jslibstylejquery' - - -@benchmark.Owner(emails=['yukishiino@chromium.org', - 'bashi@chromium.org', - 'haraken@chromium.org']) -class DromaeoJslibStylePrototype(_BaseDromaeoBenchmark): - """Dromaeo JSLib style prototype JavaScript benchmark. - - Tests getting and setting CSS information on DOM elements using the jQuery - JavaScript Library. - """ - tag = 'jslibstyleprototype' - query_param = 'jslib-style-prototype' - - @classmethod - def Name(cls): - return 'dromaeo.jslibstyleprototype' - - -@benchmark.Owner(emails=['yukishiino@chromium.org', - 'bashi@chromium.org', - 'haraken@chromium.org']) -class DromaeoJslibTraverseJquery(_BaseDromaeoBenchmark): - """Dromaeo JSLib traverse jquery JavaScript benchmark. - - - Tests getting and setting CSS information on DOM elements using the Prototype - JavaScript Library. - """ - tag = 'jslibtraversejquery' - query_param = 'jslib-traverse-jquery' - - @classmethod - def Name(cls): - return 'dromaeo.jslibtraversejquery' - - -@benchmark.Owner(emails=['yukishiino@chromium.org', - 'bashi@chromium.org', - 'haraken@chromium.org']) -class DromaeoJslibTraversePrototype(_BaseDromaeoBenchmark): - """Dromaeo JSLib traverse prototype JavaScript benchmark. - - Tests traversing a DOM structure using the jQuery JavaScript Library. - """ - tag = 'jslibtraverseprototype' - query_param = 'jslib-traverse-prototype' - - @classmethod - def Name(cls): - return 'dromaeo.jslibtraverseprototype' - - -class DromaeoCSSQueryJquery(_BaseDromaeoBenchmark): - """Dromaeo CSS Query jquery JavaScript benchmark. - - Tests traversing a DOM structure using the Prototype JavaScript Library. - """ - tag = 'cssqueryjquery' - query_param = 'cssquery-jquery' - - @classmethod - def Name(cls): - return 'dromaeo.cssqueryjquery'
diff --git a/tools/perf/core/find_dependencies_unittest.py b/tools/perf/core/find_dependencies_unittest.py index b0de972..3fbb41c4 100644 --- a/tools/perf/core/find_dependencies_unittest.py +++ b/tools/perf/core/find_dependencies_unittest.py
@@ -5,6 +5,7 @@ import os import unittest +from telemetry import decorators from telemetry.core import util from core import find_dependencies @@ -12,6 +13,7 @@ class FindDependenciesTest(unittest.TestCase): + @decorators.Disabled('chromeos') # crbug.com/818230 def testFindPythonDependencies(self): try: dog_object_path = os.path.join( @@ -30,6 +32,7 @@ except ImportError: # crbug.com/559527 pass + @decorators.Disabled('chromeos') # crbug.com/818230 def testFindPythonDependenciesWithNestedImport(self): try: moose_module_path = os.path.join(
diff --git a/tools/perf/core/upload_results_to_perf_dashboard.py b/tools/perf/core/upload_results_to_perf_dashboard.py index 9645cc9..db7b06b 100755 --- a/tools/perf/core/upload_results_to_perf_dashboard.py +++ b/tools/perf/core/upload_results_to_perf_dashboard.py
@@ -34,6 +34,7 @@ reference_build = 'reference' in options.name stripped_test_name = options.name.replace('.reference', '') results = {} + print 'Opening results file %s' % options.results_file with open(options.results_file) as f: results = json.load(f) dashboard_json = {}
diff --git a/tools/perf/process_perf_results.py b/tools/perf/process_perf_results.py index 5ff6b23..1bd7bbd6 100755 --- a/tools/perf/process_perf_results.py +++ b/tools/perf/process_perf_results.py
@@ -104,6 +104,7 @@ with oauth_api.with_access_token(service_account_file) as oauth_file: for directory in benchmark_directory_list: + print 'Uploading perf results from %s benchmark' % directory _upload_perf_results(join(directory, 'perf_results.json'), directory, configuration_name, build_properties, oauth_file, tmpfile_dir)
diff --git a/tools/v8_context_snapshot/BUILD.gn b/tools/v8_context_snapshot/BUILD.gn index d6691a5..37622d67 100644 --- a/tools/v8_context_snapshot/BUILD.gn +++ b/tools/v8_context_snapshot/BUILD.gn
@@ -17,26 +17,16 @@ import("//build/config/android/rules.gni") } -if (is_android) { - android_assets("v8_context_snapshot_assets") { - deps = [ - ":v8_context_snapshot", - ] - sources = [ - "$root_out_dir/v8_context_snapshot.bin", - ] - disable_compression = true - } -} - group("v8_context_snapshot") { if (use_v8_context_snapshot) { public_deps = [ ":generate_v8_context_snapshot", ] - data = [ - "$root_out_dir/v8_context_snapshot.bin", - ] + if (!is_android) { + data = [ + "$root_out_dir/v8_context_snapshot.bin", + ] + } } } @@ -47,6 +37,25 @@ } if (use_v8_context_snapshot) { + if (is_android && enable_java_templates) { + android_assets("v8_context_snapshot_assets") { + deps = [ + ":v8_context_snapshot", + ] + sources = [ + "$root_out_dir/natives_blob.bin", + ] + renaming_sources = [ "$root_out_dir/v8_context_snapshot.bin" ] + if (current_cpu == "arm" || current_cpu == "x86" || + current_cpu == "mipsel") { + renaming_destinations = [ "v8_context_snapshot_32.bin" ] + } else { + renaming_destinations = [ "v8_context_snapshot_64.bin" ] + } + disable_compression = true + } + } + action("generate_v8_context_snapshot") { script = "//build/gn_run_binary.py" output_file = "$root_out_dir/v8_context_snapshot.bin"
diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc index a75ee12..d737bb0 100644 --- a/ui/aura/mus/window_tree_client.cc +++ b/ui/aura/mus/window_tree_client.cc
@@ -176,64 +176,77 @@ } // namespace -WindowTreeClient::WindowTreeClient( +// static +std::unique_ptr<WindowTreeClient> WindowTreeClient::CreateForWindowManager( service_manager::Connector* connector, WindowTreeClientDelegate* delegate, WindowManagerDelegate* window_manager_delegate, - mojo::InterfaceRequest<ui::mojom::WindowTreeClient> request, - scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, - bool create_discardable_memory) - : connector_(connector), - next_window_id_(1), - next_change_id_(1), - delegate_(delegate), - window_manager_delegate_(window_manager_delegate), - binding_(this), - tree_(nullptr), - in_destructor_(false), - weak_factory_(this) { - DCHECK(delegate_); - // Allow for a null request in tests. - if (request.is_pending()) - binding_.Bind(std::move(request)); - // Some tests may not create a TransientWindowClient. - if (client::GetTransientWindowClient()) - client::GetTransientWindowClient()->AddObserver(this); - if (window_manager_delegate) - window_manager_delegate->SetWindowManagerClient(this); - if (connector) { // |connector| can be null in tests. - if (!io_task_runner) { - // |io_task_runner| is null in most case. But for the browser process, - // the |io_task_runner| is the browser's IO thread. - io_thread_ = std::make_unique<base::Thread>("IOThread"); - base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0); - thread_options.priority = base::ThreadPriority::NORMAL; - CHECK(io_thread_->StartWithOptions(thread_options)); - io_task_runner = io_thread_->task_runner(); - } + bool automatically_create_display_roots, + bool create_discardable_memory) { + std::unique_ptr<WindowTreeClient> wtc( + new WindowTreeClient(connector, delegate, window_manager_delegate, + nullptr, nullptr, create_discardable_memory)); - if (base::FeatureList::IsEnabled(features::kMash)) { - gpu_ = - ui::Gpu::Create(connector, ui::mojom::kServiceName, io_task_runner); - compositor_context_factory_ = - std::make_unique<MusContextFactory>(gpu_.get()); - initial_context_factory_ = Env::GetInstance()->context_factory(); - Env::GetInstance()->set_context_factory( - compositor_context_factory_.get()); - } + ui::mojom::WindowManagerWindowTreeFactoryPtr factory; + connector->BindInterface(ui::mojom::kServiceName, &factory); + ui::mojom::WindowTreePtr window_tree; + ui::mojom::WindowTreeClientPtr client; + wtc->binding_.Bind(MakeRequest(&client)); + factory->CreateWindowTree(MakeRequest(&window_tree), std::move(client), + automatically_create_display_roots); + wtc->SetWindowTree(std::move(window_tree)); + return wtc; +} - // WindowServerTest will create more than one WindowTreeClient. We will not - // create the discardable memory manager for those tests. - if (create_discardable_memory) { - discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; - connector->BindInterface(ui::mojom::kServiceName, &manager_ptr); - discardable_shared_memory_manager_ = std::make_unique< - discardable_memory::ClientDiscardableSharedMemoryManager>( - std::move(manager_ptr), std::move(io_task_runner)); - base::DiscardableMemoryAllocator::SetInstance( - discardable_shared_memory_manager_.get()); - } - } +// static +std::unique_ptr<WindowTreeClient> WindowTreeClient::CreateForEmbedding( + service_manager::Connector* connector, + WindowTreeClientDelegate* delegate, + ui::mojom::WindowTreeClientRequest request, + bool create_discardable_memory) { + std::unique_ptr<WindowTreeClient> wtc( + new WindowTreeClient(connector, delegate, nullptr, std::move(request), + nullptr, create_discardable_memory)); + return wtc; +} + +// static +std::unique_ptr<WindowTreeClient> WindowTreeClient::CreateForWindowTreeFactory( + service_manager::Connector* connector, + WindowTreeClientDelegate* delegate, + bool create_discardable_memory, + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner) { + std::unique_ptr<WindowTreeClient> wtc( + new WindowTreeClient(connector, delegate, nullptr, nullptr, nullptr, + create_discardable_memory)); + ui::mojom::WindowTreeFactoryPtr factory; + connector->BindInterface(ui::mojom::kServiceName, &factory); + ui::mojom::WindowTreePtr window_tree; + ui::mojom::WindowTreeClientPtr client; + wtc->binding_.Bind(MakeRequest(&client)); + factory->CreateWindowTree(MakeRequest(&window_tree), std::move(client)); + wtc->SetWindowTree(std::move(window_tree)); + return wtc; +} + +// static +std::unique_ptr<WindowTreeClient> +WindowTreeClient::CreateForWindowTreeHostFactory( + service_manager::Connector* connector, + WindowTreeClientDelegate* delegate, + bool create_discardable_memory) { + std::unique_ptr<WindowTreeClient> wtc( + new WindowTreeClient(connector, delegate, nullptr, nullptr, nullptr, + create_discardable_memory)); + ui::mojom::WindowTreeHostFactoryPtr factory; + connector->BindInterface(ui::mojom::kServiceName, &factory); + + ui::mojom::WindowTreeHostPtr window_tree_host; + ui::mojom::WindowTreeClientPtr client; + wtc->binding_.Bind(MakeRequest(&client)); + factory->CreateWindowTreeHost(MakeRequest(&window_tree_host), + std::move(client)); + return wtc; } WindowTreeClient::~WindowTreeClient() { @@ -282,42 +295,6 @@ CHECK(windows_.empty()); } -void WindowTreeClient::ConnectViaWindowTreeFactory() { - ui::mojom::WindowTreeFactoryPtr factory; - connector_->BindInterface(ui::mojom::kServiceName, &factory); - ui::mojom::WindowTreePtr window_tree; - ui::mojom::WindowTreeClientPtr client; - binding_.Bind(MakeRequest(&client)); - factory->CreateWindowTree(MakeRequest(&window_tree), std::move(client)); - SetWindowTree(std::move(window_tree)); -} - -void WindowTreeClient::ConnectAsWindowManager( - bool automatically_create_display_roots) { - DCHECK(window_manager_delegate_); - - ui::mojom::WindowManagerWindowTreeFactoryPtr factory; - connector_->BindInterface(ui::mojom::kServiceName, &factory); - ui::mojom::WindowTreePtr window_tree; - ui::mojom::WindowTreeClientPtr client; - binding_.Bind(MakeRequest(&client)); - factory->CreateWindowTree(MakeRequest(&window_tree), std::move(client), - automatically_create_display_roots); - SetWindowTree(std::move(window_tree)); -} - -void WindowTreeClient::ConnectViaWindowTreeHostFactory() { - ui::mojom::WindowTreeHostFactoryPtr factory; - connector_->BindInterface(ui::mojom::kServiceName, &factory); - - ui::mojom::WindowTreeHostPtr window_tree_host; - ui::mojom::WindowTreeClientPtr client; - binding_.Bind(MakeRequest(&client)); - factory->CreateWindowTreeHost(MakeRequest(&window_tree_host), - std::move(client)); - WaitForInitialDisplays(); -} - void WindowTreeClient::SetCanFocus(Window* window, bool can_focus) { DCHECK(tree_); DCHECK(window); @@ -397,6 +374,66 @@ std::move(client)); } +WindowTreeClient::WindowTreeClient( + service_manager::Connector* connector, + WindowTreeClientDelegate* delegate, + WindowManagerDelegate* window_manager_delegate, + mojo::InterfaceRequest<ui::mojom::WindowTreeClient> request, + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, + bool create_discardable_memory) + : connector_(connector), + next_window_id_(1), + next_change_id_(1), + delegate_(delegate), + window_manager_delegate_(window_manager_delegate), + binding_(this), + tree_(nullptr), + in_destructor_(false), + weak_factory_(this) { + DCHECK(delegate_); + // Allow for a null request in tests. + if (request.is_pending()) + binding_.Bind(std::move(request)); + // Some tests may not create a TransientWindowClient. + if (client::GetTransientWindowClient()) + client::GetTransientWindowClient()->AddObserver(this); + if (window_manager_delegate) + window_manager_delegate->SetWindowManagerClient(this); + if (connector) { // |connector| can be null in tests. + if (!io_task_runner) { + // |io_task_runner| is null in most case. But for the browser process, + // the |io_task_runner| is the browser's IO thread. + io_thread_ = std::make_unique<base::Thread>("IOThread"); + base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0); + thread_options.priority = base::ThreadPriority::NORMAL; + CHECK(io_thread_->StartWithOptions(thread_options)); + io_task_runner = io_thread_->task_runner(); + } + + if (base::FeatureList::IsEnabled(features::kMash)) { + gpu_ = + ui::Gpu::Create(connector, ui::mojom::kServiceName, io_task_runner); + compositor_context_factory_ = + std::make_unique<MusContextFactory>(gpu_.get()); + initial_context_factory_ = Env::GetInstance()->context_factory(); + Env::GetInstance()->set_context_factory( + compositor_context_factory_.get()); + } + + // WindowServerTest will create more than one WindowTreeClient. We will not + // create the discardable memory manager for those tests. + if (create_discardable_memory) { + discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; + connector->BindInterface(ui::mojom::kServiceName, &manager_ptr); + discardable_shared_memory_manager_ = std::make_unique< + discardable_memory::ClientDiscardableSharedMemoryManager>( + std::move(manager_ptr), std::move(io_task_runner)); + base::DiscardableMemoryAllocator::SetInstance( + discardable_shared_memory_manager_.get()); + } + } +} + void WindowTreeClient::RegisterWindowMus(WindowMus* window) { DCHECK(windows_.find(window->server_id()) == windows_.end()); windows_[window->server_id()] = window;
diff --git a/ui/aura/mus/window_tree_client.h b/ui/aura/mus/window_tree_client.h index 1a887b9a..decd26be 100644 --- a/ui/aura/mus/window_tree_client.h +++ b/ui/aura/mus/window_tree_client.h
@@ -81,11 +81,13 @@ using EventResultCallback = base::Callback<void(ui::mojom::EventResult)>; -// Manages the connection with mus. +// Used to enable Aura to act as the client-library for the Window Service. // -// WindowTreeClient is owned by the creator. Generally when the delegate gets -// one of OnEmbedRootDestroyed() or OnLostConnection() it should delete the -// WindowTreeClient. +// WindowTreeClient is created in a handful of distinct ways. See the various +// Create functions for details. +// +// Generally when the delegate gets one of OnEmbedRootDestroyed() or +// OnLostConnection() it should delete the WindowTreeClient. // // When WindowTreeClient is deleted all windows are deleted (and observers // notified). @@ -99,32 +101,39 @@ public WindowTreeHostMusDelegate, public client::TransientWindowClientObserver { public: - // |create_discardable_memory| If it is true, WindowTreeClient will setup the - // dicardable shared memory manager for this process. In some test, more than - // one WindowTreeClient will be created, so we need pass false to avoid - // setup the discardable shared memory manager more than once. - WindowTreeClient( + // Creates a WindowTreeClient to act as the window manager. See mojom for + // details on |automatically_create_display_roots|. + // TODO(sky): move |create_discardable_memory| out of this class. + static std::unique_ptr<WindowTreeClient> CreateForWindowManager( service_manager::Connector* connector, WindowTreeClientDelegate* delegate, - WindowManagerDelegate* window_manager_delegate = nullptr, - ui::mojom::WindowTreeClientRequest request = nullptr, - scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr, + WindowManagerDelegate* window_manager_delegate, + bool automatically_create_display_roots = true, bool create_discardable_memory = true); + + // Creates a WindowTreeClient for use in embedding. + static std::unique_ptr<WindowTreeClient> CreateForEmbedding( + service_manager::Connector* connector, + WindowTreeClientDelegate* delegate, + ui::mojom::WindowTreeClientRequest request, + bool create_discardable_memory = true); + + // Creates a WindowTreeClient useful for creating top-level windows. + static std::unique_ptr<WindowTreeClient> CreateForWindowTreeFactory( + service_manager::Connector* connector, + WindowTreeClientDelegate* delegate, + bool create_discardable_memory = true, + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr); + + // Creates a WindowTreeClient such that the Window Service creates a single + // WindowTreeHost. This is useful for testing and examples. + static std::unique_ptr<WindowTreeClient> CreateForWindowTreeHostFactory( + service_manager::Connector* connector, + WindowTreeClientDelegate* delegate, + bool create_discardable_memory = true); + ~WindowTreeClient() override; - // Establishes the connection by way of the WindowTreeFactory. - void ConnectViaWindowTreeFactory(); - - // Establishes the connection by way of WindowManagerWindowTreeFactory. - // See mojom for details on |automatically_create_display_roots|. - void ConnectAsWindowManager(bool automatically_create_display_roots = true); - - // Connects to mus such that a single WindowTreeHost is created. This blocks - // until the WindowTreeHost is obtained and calls - // WindowTreeClientDelegate::OnEmbed() with the WindowTreeHost. This entry - // point is mostly useful for testing and examples. - void ConnectViaWindowTreeHostFactory(); - void DisableDragDropClient() { install_drag_drop_client_ = false; } service_manager::Connector* connector() { return connector_; } @@ -212,6 +221,18 @@ // TODO(sky): this assumes change_ids never wrap, which is a bad assumption. using InFlightMap = std::map<uint32_t, std::unique_ptr<InFlightChange>>; + // |create_discardable_memory| specifies whether WindowTreeClient will setup + // the dicardable shared memory manager for this process. In some tests, more + // than one WindowTreeClient will be created, so we need to pass false to + // avoid setting up the discardable shared memory manager more than once. + WindowTreeClient( + service_manager::Connector* connector, + WindowTreeClientDelegate* delegate, + WindowManagerDelegate* window_manager_delegate = nullptr, + ui::mojom::WindowTreeClientRequest request = nullptr, + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr, + bool create_discardable_memory = true); + void RegisterWindowMus(WindowMus* window); WindowMus* GetWindowByServerId(ui::Id id);
diff --git a/ui/aura/test/mus/test_window_tree_client_setup.cc b/ui/aura/test/mus/test_window_tree_client_setup.cc index 581c7c3..aedb921 100644 --- a/ui/aura/test/mus/test_window_tree_client_setup.cc +++ b/ui/aura/test/mus/test_window_tree_client_setup.cc
@@ -61,9 +61,9 @@ void TestWindowTreeClientSetup::CommonInit( WindowTreeClientDelegate* window_tree_delegate, WindowManagerDelegate* window_manager_delegate) { - window_tree_.reset(new TestWindowTree); - window_tree_client_ = std::make_unique<WindowTreeClient>( - nullptr, window_tree_delegate, window_manager_delegate); + window_tree_ = std::make_unique<TestWindowTree>(); + window_tree_client_ = WindowTreeClientPrivate::CreateWindowTreeClient( + window_tree_delegate, window_manager_delegate); window_tree_->set_client(window_tree_client_.get()); }
diff --git a/ui/aura/test/mus/window_tree_client_private.cc b/ui/aura/test/mus/window_tree_client_private.cc index 87f57f0a..6fe5dfa 100644 --- a/ui/aura/test/mus/window_tree_client_private.cc +++ b/ui/aura/test/mus/window_tree_client_private.cc
@@ -23,6 +23,16 @@ WindowTreeClientPrivate::~WindowTreeClientPrivate() {} +// static +std::unique_ptr<WindowTreeClient> +WindowTreeClientPrivate::CreateWindowTreeClient( + WindowTreeClientDelegate* window_tree_delegate, + WindowManagerDelegate* window_manager_delegate) { + std::unique_ptr<WindowTreeClient> wtc(new WindowTreeClient( + nullptr, window_tree_delegate, window_manager_delegate)); + return wtc; +} + void WindowTreeClientPrivate::OnEmbed(ui::mojom::WindowTree* window_tree) { ui::mojom::WindowDataPtr root_data(ui::mojom::WindowData::New()); root_data->parent_id = 0; @@ -117,4 +127,8 @@ return false; } +void WindowTreeClientPrivate::WaitForInitialDisplays() { + tree_client_impl_->WaitForInitialDisplays(); +} + } // namespace aura
diff --git a/ui/aura/test/mus/window_tree_client_private.h b/ui/aura/test/mus/window_tree_client_private.h index e4526ed..3504ae8 100644 --- a/ui/aura/test/mus/window_tree_client_private.h +++ b/ui/aura/test/mus/window_tree_client_private.h
@@ -29,7 +29,9 @@ namespace aura { class Window; +class WindowManagerDelegate; class WindowMus; +class WindowTreeClientDelegate; class WindowTreeClient; class WindowTreeHostMus; @@ -44,6 +46,10 @@ explicit WindowTreeClientPrivate(Window* window); ~WindowTreeClientPrivate(); + static std::unique_ptr<WindowTreeClient> CreateWindowTreeClient( + WindowTreeClientDelegate* window_tree_delegate, + WindowManagerDelegate* window_manager_delegate); + // Calls OnEmbed() on the WindowTreeClient. void OnEmbed(ui::mojom::WindowTree* window_tree); @@ -78,6 +84,8 @@ bool HasChangeInFlightOfType(ChangeType type); + void WaitForInitialDisplays(); + private: WindowTreeClient* tree_client_impl_; uint16_t next_window_id_ = 1u;
diff --git a/ui/base/clipboard/clipboard_mac_unittest.mm b/ui/base/clipboard/clipboard_mac_unittest.mm index 9367e97..b196332a 100644 --- a/ui/base/clipboard/clipboard_mac_unittest.mm +++ b/ui/base/clipboard/clipboard_mac_unittest.mm
@@ -58,7 +58,7 @@ } }; -#if defined(MEMORY_SANITIZER) +#if defined(MEMORY_SANITIZER) || defined(ADDRESS_SANITIZER) #define MAYBE_ReadImageRetina DISABLED_ReadImageRetina #else #define MAYBE_ReadImageRetina ReadImageRetina @@ -79,7 +79,7 @@ EXPECT_EQ(2 * height, bitmap.height()); } -#if defined(MEMORY_SANITIZER) +#if defined(MEMORY_SANITIZER) || defined(ADDRESS_SANITIZER) #define MAYBE_ReadImageNonRetina DISABLED_ReadImageNonRetina #else #define MAYBE_ReadImageNonRetina ReadImageNonRetina
diff --git a/ui/views/controls/native/native_view_host_aura.cc b/ui/views/controls/native/native_view_host_aura.cc index 28033ad9..fb04f31f 100644 --- a/ui/views/controls/native/native_view_host_aura.cc +++ b/ui/views/controls/native/native_view_host_aura.cc
@@ -10,7 +10,6 @@ #include "ui/aura/client/focus_client.h" #include "ui/aura/window.h" #include "ui/aura/window_delegate.h" -#include "ui/aura/window_occlusion_tracker.h" #include "ui/base/cursor/cursor.h" #include "ui/base/hit_test.h" #include "ui/compositor/paint_recorder.h" @@ -107,11 +106,6 @@ } void NativeViewHostAura::NativeViewDetaching(bool destroyed) { - // This method causes a succession of window tree changes. - // ScopedPauseOcclusionTracking ensures that occlusion is recomputed at the - // end of the method instead of after each change. - aura::WindowOcclusionTracker::ScopedPauseOcclusionTracking pause_occlusion; - clipping_window_delegate_->set_native_view(NULL); RemoveClippingWindow(); if (!destroyed) {
diff --git a/ui/views/controls/webview/webview_unittest.cc b/ui/views/controls/webview/webview_unittest.cc index 741321e..b3c8673 100644 --- a/ui/views/controls/webview/webview_unittest.cc +++ b/ui/views/controls/webview/webview_unittest.cc
@@ -8,12 +8,10 @@ #include <memory> -#include "base/command_line.h" #include "base/macros.h" #include "base/memory/ptr_util.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_observer.h" -#include "content/public/common/content_switches.h" #include "content/public/test/test_browser_context.h" #include "content/public/test/test_browser_thread_bundle.h" #include "content/public/test/web_contents_tester.h" @@ -153,9 +151,6 @@ // dependencies from content. SetBrowserClientForTesting(&test_browser_client_); - base::CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kDisableBackgroundingOccludedWindowsForTesting); - // Create a top level widget and add a child, and give it a WebView as a // child. top_level_widget_ = CreateTopLevelFramelessPlatformWidget();
diff --git a/ui/views/mus/mus_client.cc b/ui/views/mus/mus_client.cc index 9399f82..738bcbc 100644 --- a/ui/views/mus/mus_client.cc +++ b/ui/views/mus/mus_client.cc
@@ -108,11 +108,9 @@ &remote_event_dispatcher_ptr_); } - window_tree_client_ = std::make_unique<aura::WindowTreeClient>( - connector, this, nullptr /* window_manager_delegate */, - nullptr /* window_tree_client_request */, std::move(io_task_runner)); + window_tree_client_ = aura::WindowTreeClient::CreateForWindowTreeFactory( + connector, this, true, std::move(io_task_runner)); aura::Env::GetInstance()->SetWindowTreeClient(window_tree_client_.get()); - window_tree_client_->ConnectViaWindowTreeFactory(); pointer_watcher_event_router_ = std::make_unique<PointerWatcherEventRouter>(window_tree_client_.get());
diff --git a/ui/wm/test/wm_test_helper.cc b/ui/wm/test/wm_test_helper.cc index 50fce07..ee54d37 100644 --- a/ui/wm/test/wm_test_helper.cc +++ b/ui/wm/test/wm_test_helper.cc
@@ -15,6 +15,7 @@ #include "ui/aura/mus/property_converter.h" #include "ui/aura/mus/window_tree_client.h" #include "ui/aura/mus/window_tree_host_mus.h" +#include "ui/aura/test/mus/window_tree_client_private.h" #include "ui/aura/test/test_focus_client.h" #include "ui/aura/window.h" #include "ui/wm/core/compound_event_filter.h" @@ -71,10 +72,11 @@ property_converter_ = std::make_unique<aura::PropertyConverter>(); const bool create_discardable_memory = false; - window_tree_client_ = std::make_unique<aura::WindowTreeClient>( - connector, this, nullptr, nullptr, nullptr, create_discardable_memory); + window_tree_client_ = aura::WindowTreeClient::CreateForWindowTreeHostFactory( + connector, this, create_discardable_memory); aura::Env::GetInstance()->SetWindowTreeClient(window_tree_client_.get()); - window_tree_client_->ConnectViaWindowTreeHostFactory(); + aura::WindowTreeClientPrivate(window_tree_client_.get()) + .WaitForInitialDisplays(); // ConnectViaWindowTreeHostFactory() should callback to OnEmbed() and set // |host_|.
diff --git a/url/features.gni b/url/features.gni index 3b55cc7..3e0b75b 100644 --- a/url/features.gni +++ b/url/features.gni
@@ -5,7 +5,12 @@ # Features used by targets inside and outside of |url|. # For details see declare_args() in build/config/BUILDCONFIG.gn. declare_args() { - # Enables the use of ICU alternatives in lieu of ICU. The flag is used - # for Cronet to reduce the size of the Cronet binary. + # Enables the use of ICU alternatives in lieu of ICU for the target toolchain. + # The flag is used for Cronet to reduce the size of the Cronet binary. use_platform_icu_alternatives = false } + +# Never use platform icu for host toolchain. +# E.g. Don't apply this for host binaries when target_os = "android". +use_platform_icu_alternatives = + use_platform_icu_alternatives && current_toolchain == default_toolchain